summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/BrowserRun.java
blob: f08dc0b8be9c93013ce7ecec1a9da0d0410595ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.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 KIO.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 KIO.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);
}