19 #ifndef tdeparts_browserrun_h
20 #define tdeparts_browserrun_h
24 #include <tdeparts/browserextension.h>
57 bool removeReferrer,
bool trustedSource );
73 bool removeReferrer,
bool trustedSource,
bool hideErrorDialog );
88 bool hideErrorDialog()
const;
99 TQString contentDisposition()
const;
101 bool serverSuggestsSave()
const {
return contentDisposition() == TQString::fromLatin1(
"attachment"); }
103 enum AskSaveResult { Save, Open, Cancel };
112 static AskSaveResult askSave(
const KURL & url, KService::Ptr offer,
const TQString& mimeType,
const TQString & suggestedFilename = TQString::null );
114 enum AskEmbedOrSaveFlags { InlineDisposition = 0, AttachmentDisposition = 1 };
124 static AskSaveResult askEmbedOrSave(
const KURL & url,
const TQString& mimeType,
const TQString & suggestedFilename = TQString::null,
int flags = 0 );
127 virtual void save(
const KURL & url,
const TQString & suggestedFilename );
130 static void simpleSave(
const KURL & url,
const TQString & suggestedFilename,
134 static void simpleSave(
const KURL & url,
const TQString & suggestedFilename );
136 static bool allowExecution(
const TQString &serviceType,
const KURL &url );
139 static bool isExecutable(
const TQString &serviceType );
140 static bool isTextExecutable(
const TQString &serviceType );
146 virtual void scanFile();
158 virtual void handleError( TDEIO::Job * job );
169 NonEmbeddableResult handleNonEmbeddable(
const TQString& mimeType );
172 void slotBrowserScanFinished(TDEIO::Job *job);
173 void slotBrowserMimetype(TDEIO::Job *job,
const TQString &type);
174 void slotCopyToTempFileResult(TDEIO::Job *job);
175 virtual void slotStatResult( TDEIO::Job *job );
180 TQGuardedPtr<TQWidget> m_window;
183 TQString m_suggestedFilename;
184 TQString m_sMimeType;
185 bool m_bRemoveReferrer;
186 bool m_bTrustedSource;
188 void redirectToError(
int error,
const TQString& errorText );
189 class BrowserRunPrivate;
190 BrowserRunPrivate* d;
This class extends KRun to provide additional functionality for browsers:
TQString suggestedFilename() const
NonEmbeddableResult
NotHandled means that foundMimeType should call KRun::foundMimeType, i.e.
Base class for any "viewer" part.
const TDEShortcut & save()
URLArgs is a set of arguments bundled into a structure, to allow specifying how a URL should be opene...