summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/BrowserRun.java
diff options
context:
space:
mode:
Diffstat (limited to 'tdejava/koala/org/trinitydesktop/koala/BrowserRun.java')
-rw-r--r--tdejava/koala/org/trinitydesktop/koala/BrowserRun.java143
1 files changed, 143 insertions, 0 deletions
diff --git a/tdejava/koala/org/trinitydesktop/koala/BrowserRun.java b/tdejava/koala/org/trinitydesktop/koala/BrowserRun.java
new file mode 100644
index 00000000..e80cf3f8
--- /dev/null
+++ b/tdejava/koala/org/trinitydesktop/koala/BrowserRun.java
@@ -0,0 +1,143 @@
+//Auto-generated by kalyptus. DO NOT EDIT.
+package org.trinitydesktop.koala;
+
+import org.trinitydesktop.qt.Qt;
+import org.trinitydesktop.qt.TQMetaObject;
+import org.trinitydesktop.qt.QtSupport;
+import org.trinitydesktop.qt.TQWidget;
+
+/**
+
+ This class extends KRun to provide additional functionality for browsers:
+ <ul>
+ <li>"save or open" dialog boxes
+ <li>"save" functionality
+ <li>support for HTTP POST (including saving the result to a temp file if
+ opening a separate application)
+ <li>warning before launching executables off the web
+ <li>custom error handling (i.e. treating errors as HTML pages)
+ <li>generation of SSL metadata depending on the previous URL shown by the part
+ </ul>
+ @author David Faure <faure@kde.org>
+
+ @short This class extends KRun to provide additional functionality for browsers: <ul> <li>"save or open" dialog boxes <li>"save" functionality <li>support for HTTP POST (including saving the result to a temp file if opening a separate application) <li>warning before launching executables off the web <li>custom error handling (i.
+
+*/
+public class BrowserRun extends KRun {
+ protected BrowserRun(Class dummy){super((Class) null);}
+ public native TQMetaObject metaObject();
+ public native String className();
+ /**
+ @param url the URL we're probing
+ @param args URL args - includes data for a HTTP POST, etc.
+ @param part the part going to open this URL - can be null if not created yet
+ @param window the mainwindow - passed to TDEIO.Job.setWindow()
+ @param removeReferrer if true, the "referrer" metadata from <code>args</code> isn't passed on
+ @param trustedSource if false, a warning will be shown before launching an executable
+ Always pass false for <code>trustedSource</code>, except for local directory views.
+ @short
+ */
+ public BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, TQWidget window, boolean removeReferrer, boolean trustedSource) {
+ super((Class) null);
+ newBrowserRun(url,args,part,window,removeReferrer,trustedSource);
+ }
+ private native void newBrowserRun(KURL url, URLArgs args, ReadOnlyPart part, TQWidget window, boolean removeReferrer, boolean trustedSource);
+ /**
+ @param url the URL we're probing
+ @param args URL args - includes data for a HTTP POST, etc.
+ @param part the part going to open this URL - can be null if not created yet
+ @param window the mainwindow - passed to TDEIO.Job.setWindow()
+ @param removeReferrer if true, the "referrer" metadata from <code>args</code> isn't passed on
+ @param trustedSource if false, a warning will be shown before launching an executable
+ @param hideErrorDialog if true, no dialog will be shown in case of errors.
+ Always pass false for <code>trustedSource</code>, except for local directory views.
+ @short
+ */
+ public BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, TQWidget window, boolean removeReferrer, boolean trustedSource, boolean hideErrorDialog) {
+ super((Class) null);
+ newBrowserRun(url,args,part,window,removeReferrer,trustedSource,hideErrorDialog);
+ }
+ private native void newBrowserRun(KURL url, URLArgs args, ReadOnlyPart part, TQWidget window, boolean removeReferrer, boolean trustedSource, boolean hideErrorDialog);
+ /**
+ @return the URL we're probing
+
+ @short
+ */
+ public native KURL url();
+ /**
+ @return true if no dialog will be shown in case of errors
+
+ @short
+ */
+ public native boolean hideErrorDialog();
+ /**
+ @return Suggested filename given by the server (e.g. HTTP content-disposition)
+
+ @short
+ */
+ public native String suggestedFilename();
+ public native void save(KURL url, String suggestedFilename);
+ /**
+ Ask the user whether to save or open a url in another application.
+ @param url the URL in question
+ @param offer the application that will be used to open the URL
+ @param mimeType the mimetype of the URL
+ @param suggestedFilename optional filename suggested by the server
+ @return Save, Open or Cancel.
+
+ @short Ask the user whether to save or open a url in another application.
+ */
+ // KParts::BrowserRun::AskSaveResult askSave(const KURL& arg1,KService::Ptr arg2,const TQString& arg3,const TQString& arg4); >>>> NOT CONVERTED
+ // KParts::BrowserRun::AskSaveResult askSave(const KURL& arg1,KService::Ptr arg2,const TQString& arg3); >>>> NOT CONVERTED
+ /**
+ Similar to askSave() but for the case where the current application is
+ able to embed the url itself (instead of passing it to another app).
+ @param url the URL in question
+ @param mimeType the mimetype of the URL
+ @param suggestedFilename optional filename suggested by the server
+ @param flags reserved for later use
+ @return Save, Open or Cancel.
+
+ @short Similar to askSave() but for the case where the current application is able to embed the url itself (instead of passing it to another app).
+ */
+ // KParts::BrowserRun::AskSaveResult askEmbedOrSave(const KURL& arg1,const TQString& arg2,const TQString& arg3,int arg4); >>>> NOT CONVERTED
+ // KParts::BrowserRun::AskSaveResult askEmbedOrSave(const KURL& arg1,const TQString& arg2,const TQString& arg3); >>>> NOT CONVERTED
+ // KParts::BrowserRun::AskSaveResult askEmbedOrSave(const KURL& arg1,const TQString& arg2); >>>> NOT CONVERTED
+ public static native void simpleSave(KURL url, String suggestedFilename, TQWidget window);
+ /** BIC: Combine with the above function for KDE 4.0. @short BIC: Combine with the above function for KDE 4.
+ */
+ public static native void simpleSave(KURL url, String suggestedFilename);
+ public static native boolean allowExecution(String serviceType, KURL url);
+ /** BIC: Obsoleted by KRun.isExecutable( StringserviceType ); @short BIC: Obsoleted by KRun.isExecutable( StringserviceType );
+ */
+ public static native boolean isExecutable(String serviceType);
+ public static native boolean isTextExecutable(String serviceType);
+ /**
+ Reimplemented from KRun
+ @short Reimplemented from KRun
+ */
+ protected native void scanFile();
+ /**
+ Reimplemented from KRun
+ @short Reimplemented from KRun
+ */
+ protected native void init();
+ /**
+ Called when an error happens.
+ NOTE: <code>job</code> could be null, 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.
+ @short Called when an error happens.
+ */
+ protected native void handleError(Job job);
+ /**
+ Helper for foundMimeType: call this if the mimetype couldn't be embedded
+ @short Helper for foundMimeType: call this if the mimetype couldn't be embedded
+ */
+ // KParts::BrowserRun::NonEmbeddableResult handleNonEmbeddable(const TQString& arg1); >>>> NOT CONVERTED
+ protected native void slotBrowserScanFinished(Job job);
+ protected native void slotBrowserMimetype(Job job, String type);
+ protected native void slotCopyToTempFileResult(Job job);
+ protected native void slotStatResult(Job job);
+}