/* * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIHelperAppLauncherDialog.idl */ #ifndef __gen_nsIHelperAppLauncherDialog_h__ #define __gen_nsIHelperAppLauncherDialog_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif #ifndef __gen_domstubs_h__ #include "domstubs.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class nsIHelperAppLauncher; /* forward declaration */ class nsILocalFile; /* forward declaration */ /* starting interface: nsIHelperAppLauncherDialog */ #define NS_IHELPERAPPLAUNCHERDIALOG_IID_STR "d7ebddf0-4c84-11d4-807a-00600811a9c3" #define NS_IHELPERAPPLAUNCHERDIALOG_IID \ {0xd7ebddf0, 0x4c84, 0x11d4, \ { 0x80, 0x7a, 0x00, 0x60, 0x08, 0x11, 0xa9, 0xc3 }} /** * nsIHelperAppLauncherDialog * ========================== * This interface is used to display a confirmatino dialog before * launching a "helper app" to handle content not handled by * Mozilla. * * Usage: Clients (of which there is one: the nsIExternalHelperAppService * implementation in mozilla/uriloader/exthandler) create an instance of * this interface (using the contract ID) and then call the show() method. * * The dialog is shown non-modally. The implementation of the dialog * will access methods of the nsIHelperAppLauncher passed in to show() * in order to cause a "save to disk" or "open using" action. * * Note: The promptForSaveToFile and showProgressDialog methods are * obsolescent. Caller(s) will be converted to use specific * file-picker and progress-dialog interfaces. */ class NS_NO_VTABLE nsIHelperAppLauncherDialog : public nsISupports { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHELPERAPPLAUNCHERDIALOG_IID) /* void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */ NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) = 0; /* nsILocalFile promptForSaveToFile (in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */ NS_IMETHOD PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) = 0; /* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */ NS_IMETHOD ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIHELPERAPPLAUNCHERDIALOG \ NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext); \ NS_IMETHOD PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval); \ NS_IMETHOD ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIHELPERAPPLAUNCHERDIALOG(_to) \ NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return _to Show(aLauncher, aContext); } \ NS_IMETHOD PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) { return _to PromptForSaveToFile(aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval); } \ NS_IMETHOD ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return _to ShowProgressDialog(aLauncher, aContext); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIHELPERAPPLAUNCHERDIALOG(_to) \ NS_IMETHOD Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->Show(aLauncher, aContext); } \ NS_IMETHOD PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptForSaveToFile(aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval); } \ NS_IMETHOD ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowProgressDialog(aLauncher, aContext); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsHelperAppLauncherDialog : public nsIHelperAppLauncherDialog { public: NS_DECL_ISUPPORTS NS_DECL_NSIHELPERAPPLAUNCHERDIALOG nsHelperAppLauncherDialog(); virtual ~nsHelperAppLauncherDialog(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsHelperAppLauncherDialog, nsIHelperAppLauncherDialog) nsHelperAppLauncherDialog::nsHelperAppLauncherDialog() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsHelperAppLauncherDialog::~nsHelperAppLauncherDialog() { /* destructor code */ } /* void show (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */ NS_IMETHODIMP nsHelperAppLauncherDialog::Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsILocalFile promptForSaveToFile (in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */ NS_IMETHODIMP nsHelperAppLauncherDialog::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */ NS_IMETHODIMP nsHelperAppLauncherDialog::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #define NS_IHELPERAPPLAUNCHERDLG_CONTRACTID "@mozilla.org/helperapplauncherdialog;1" #define NS_IHELPERAPPLAUNCHERDLG_CLASSNAME "Mozilla Helper App Launcher Confirmation Dialog" #endif /* __gen_nsIHelperAppLauncherDialog_h__ */ .