.TH "KParts::BrowserRun" 3 "28 Jan 2004" "kparts Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KParts::BrowserRun \- This class extends \fBKRun\fP to provide additional functionality for browsers: 'save or open' dialog boxes 'save' functionality support for HTTP POST (including saving the result to a temp file if opening a separate application) warning before launching executables off the web custom error handling (i.e.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <browserrun.h>\fP
.PP
Inherits \fBKRun\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBAskSaveResult\fP { \fBSave\fP, \fBOpen\fP, \fBCancel\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBBrowserRun\fP (const  \fBKURL\fP &url, const  \fBKParts::URLArgs\fP &args, \fBKParts::ReadOnlyPart\fP *part, \fBQWidget\fP *window, bool removeReferrer, bool trustedSource)"
.br
.ti -1c
.RI "\fBBrowserRun\fP (const  \fBKURL\fP &url, const  \fBKParts::URLArgs\fP &args, \fBKParts::ReadOnlyPart\fP *part, \fBQWidget\fP *window, bool removeReferrer, bool trustedSource, bool hideErrorDialog)"
.br
.ti -1c
.RI "\fBKURL\fP \fBurl\fP () const "
.br
.ti -1c
.RI "bool \fBhideErrorDialog\fP () const "
.br
.ti -1c
.RI "virtual void \fBsave\fP (const  \fBKURL\fP &url, const  \fBQString\fP &suggestedFilename)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "AskSaveResult \fBaskSave\fP (const  \fBKURL\fP &url, \fBKService::Ptr\fP offer, const  \fBQString\fP &mimeType, const  \fBQString\fP &suggestedFilename=QString::null)"
.br
.ti -1c
.RI "void \fBsimpleSave\fP (const  \fBKURL\fP &url, const  \fBQString\fP &suggestedFilename)"
.br
.ti -1c
.RI "bool \fBallowExecution\fP (const  \fBQString\fP &serviceType, const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "bool \fBisExecutable\fP (const  \fBQString\fP &serviceType)"
.br
.ti -1c
.RI "bool \fBisTextExecutable\fP (const  \fBQString\fP &serviceType)"
.br
.in -1c
.SS "Protected Types"

.in +1c
.ti -1c
.RI "enum \fBNonEmbeddableResult\fP { \fBHandled\fP, \fBNotHandled\fP, \fBDelayed\fP }"
.br
.RI "\fINotHandled means that foundMimeType should call \fBKRun::foundMimeType\fP, i.e. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotBrowserScanFinished\fP (\fBKIO::Job\fP *job)"
.br
.ti -1c
.RI "void \fBslotBrowserMimetype\fP (\fBKIO::Job\fP *job, const  \fBQString\fP &type)"
.br
.ti -1c
.RI "void \fBslotCopyToTempFileResult\fP (\fBKIO::Job\fP *job)"
.br
.ti -1c
.RI "virtual void \fBslotStatResult\fP (\fBKIO::Job\fP *job)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBscanFile\fP ()"
.br
.RI "\fIReimplemented from \fBKRun\fP. \fP"
.ti -1c
.RI "virtual void \fBinit\fP ()"
.br
.RI "\fIReimplemented from \fBKRun\fP. \fP"
.ti -1c
.RI "virtual void \fBhandleError\fP (\fBKIO::Job\fP *job)"
.br
.RI "\fICalled when an error happens. \fP"
.ti -1c
.RI "\fBNonEmbeddableResult\fP \fBhandleNonEmbeddable\fP (const  \fBQString\fP &mimeType)"
.br
.RI "\fIHelper for foundMimeType: call this if the mimetype couldn't be embedded. \fP"
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKParts::URLArgs\fP \fBm_args\fP"
.br
.ti -1c
.RI "\fBKParts::ReadOnlyPart\fP * \fBm_part\fP"
.br
.ti -1c
.RI "\fBQWidget\fP * \fBm_window\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_suggestedFilename\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_sMimeType\fP"
.br
.ti -1c
.RI "bool \fBm_bRemoveReferrer\fP"
.br
.ti -1c
.RI "bool \fBm_bTrustedSource\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class extends \fBKRun\fP to provide additional functionality for browsers: 'save or open' dialog boxes 'save' functionality support for HTTP POST (including saving the result to a temp file if opening a separate application) warning before launching executables off the web custom error handling (i.e. 

.IP "\(bu" 2
* - * - * - * - treating errors as HTML pages)
.IP "\(bu" 2
generation of SSL metadata depending on the previous URL shown by the part 
.PP
\fBAuthor:\fP
.RS 4
David Faure <faure@kde.org> 
.RE
.PP

.PP

.PP
Definition at line 39 of file browserrun.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKParts::BrowserRun::NonEmbeddableResult\fP\fC [protected]\fP"
.PP
NotHandled means that foundMimeType should call \fBKRun::foundMimeType\fP, i.e. launch an external app. Definition at line 114 of file browserrun.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KParts::BrowserRun::BrowserRun (const \fBKURL\fP & url, const \fBKParts::URLArgs\fP & args, \fBKParts::ReadOnlyPart\fP * part, \fBQWidget\fP * window, bool removeReferrer, bool trustedSource)"
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the URL we're probing 
.br
\fIargs\fP URL args - includes data for a HTTP POST, etc. 
.br
\fIpart\fP the part going to open this URL - can be 0L if not created yet 
.br
\fIwindow\fP the mainwindow - passed to \fBKIO::Job::setWindow()\fP 
.br
\fIremoveReferrer\fP if true, the 'referrer' metadata from \fCargs\fP isn't passed on 
.br
\fItrustedSource\fP if false, a warning will be shown before launching an executable Always pass false for \fCtrustedSource\fP, except for local directory views. 
.RE
.PP

.SS "KParts::BrowserRun::BrowserRun (const \fBKURL\fP & url, const \fBKParts::URLArgs\fP & args, \fBKParts::ReadOnlyPart\fP * part, \fBQWidget\fP * window, bool removeReferrer, bool trustedSource, bool hideErrorDialog)"
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP the URL we're probing 
.br
\fIargs\fP URL args - includes data for a HTTP POST, etc. 
.br
\fIpart\fP the part going to open this URL - can be 0L if not created yet 
.br
\fIwindow\fP the mainwindow - passed to \fBKIO::Job::setWindow()\fP 
.br
\fIremoveReferrer\fP if true, the 'referrer' metadata from \fCargs\fP isn't passed on 
.br
\fItrustedSource\fP if false, a warning will be shown before launching an executable 
.br
\fIhideErrorDialog\fP if true, no dialog will be shown in case of errors. Always pass false for \fCtrustedSource\fP, except for local directory views. 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "virtual void KParts::BrowserRun::scanFile ()\fC [protected, virtual]\fP"
.PP
Reimplemented from \fBKRun\fP. Reimplemented from \fBKRun\fP.
.SS "virtual void KParts::BrowserRun::init ()\fC [protected, virtual]\fP"
.PP
Reimplemented from \fBKRun\fP. Reimplemented from \fBKRun\fP.
.SS "virtual void KParts::BrowserRun::handleError (\fBKIO::Job\fP * job)\fC [protected, virtual]\fP"
.PP
Called when an error happens. NOTE: \fCjob\fP could be 0L, if you passed hideErrorDialog=true. The default implementation shows a message box, but only when job != 0 .... It is strongly recommended to reimplement this method if you passed hideErrorDialog=true. 
.SS "\fBNonEmbeddableResult\fP KParts::BrowserRun::handleNonEmbeddable (const \fBQString\fP & mimeType)\fC [protected]\fP"
.PP
Helper for foundMimeType: call this if the mimetype couldn't be embedded. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kparts Library from the source code.
