//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QWidget;

/**

 This class extends KRun 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. treating errors as HTML pages)
 - generation of SSL metadata depending on the previous URL shown by the part
		@author David Faure <faure@kde.org>
     
		@short    This class extends KRun 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.

*/
public class BrowserRun extends KRun  {
	protected BrowserRun(Class dummy){super((Class) null);}
	public native QMetaObject 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, QWidget 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, QWidget 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, QWidget 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, QWidget window, boolean removeReferrer, boolean trustedSource, boolean hideErrorDialog);
	public native KURL url();
	public native boolean hideErrorDialog();
	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 QString& arg3,const QString& arg4); >>>> NOT CONVERTED
	// KParts::BrowserRun::AskSaveResult askSave(const KURL& arg1,KService::Ptr arg2,const QString& 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 QString& arg2,const QString& arg3,int arg4); >>>> NOT CONVERTED
	// KParts::BrowserRun::AskSaveResult askEmbedOrSave(const KURL& arg1,const QString& arg2,const QString& arg3); >>>> NOT CONVERTED
	// KParts::BrowserRun::AskSaveResult askEmbedOrSave(const KURL& arg1,const QString& arg2); >>>> NOT CONVERTED
	public static native void simpleSave(KURL url, String suggestedFilename, QWidget 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 QString& 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);
}
