/* * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIDownloader.idl */ #ifndef __gen_nsIDownloader_h__ #define __gen_nsIDownloader_h__ #ifndef __gen_nsIRequest_h__ #include "nsIRequest.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class nsIURI; /* forward declaration */ class nsILoadGroup; /* forward declaration */ class nsIInterfaceRequestor; /* forward declaration */ class nsIFile; /* forward declaration */ class nsIDownloader; /* forward declaration */ /* starting interface: nsIDownloadObserver */ #define NS_IDOWNLOADOBSERVER_IID_STR "6e0fc962-4a6f-4fa6-831f-8c26c554407f" #define NS_IDOWNLOADOBSERVER_IID \ {0x6e0fc962, 0x4a6f, 0x4fa6, \ { 0x83, 0x1f, 0x8c, 0x26, 0xc5, 0x54, 0x40, 0x7f }} class NS_NO_VTABLE nsIDownloadObserver : public nsISupports { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOWNLOADOBSERVER_IID) /* void onDownloadComplete (in nsIDownloader downloader, in nsISupports ctxt, in nsresult status, in nsIFile result); */ NS_IMETHOD OnDownloadComplete(nsIDownloader *downloader, nsISupports *ctxt, nsresult status, nsIFile *result) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIDOWNLOADOBSERVER \ NS_IMETHOD OnDownloadComplete(nsIDownloader *downloader, nsISupports *ctxt, nsresult status, nsIFile *result); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIDOWNLOADOBSERVER(_to) \ NS_IMETHOD OnDownloadComplete(nsIDownloader *downloader, nsISupports *ctxt, nsresult status, nsIFile *result) { return _to OnDownloadComplete(downloader, ctxt, status, result); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIDOWNLOADOBSERVER(_to) \ NS_IMETHOD OnDownloadComplete(nsIDownloader *downloader, nsISupports *ctxt, nsresult status, nsIFile *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadComplete(downloader, ctxt, status, result); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsDownloadObserver : public nsIDownloadObserver { public: NS_DECL_ISUPPORTS NS_DECL_NSIDOWNLOADOBSERVER nsDownloadObserver(); virtual ~nsDownloadObserver(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsDownloadObserver, nsIDownloadObserver) nsDownloadObserver::nsDownloadObserver() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsDownloadObserver::~nsDownloadObserver() { /* destructor code */ } /* void onDownloadComplete (in nsIDownloader downloader, in nsISupports ctxt, in nsresult status, in nsIFile result); */ NS_IMETHODIMP nsDownloadObserver::OnDownloadComplete(nsIDownloader *downloader, nsISupports *ctxt, nsresult status, nsIFile *result) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif /* starting interface: nsIDownloader */ #define NS_IDOWNLOADER_IID_STR "9632cc0d-864d-4f92-b7e5-bd8097c4e9a5" #define NS_IDOWNLOADER_IID \ {0x9632cc0d, 0x864d, 0x4f92, \ { 0xb7, 0xe5, 0xbd, 0x80, 0x97, 0xc4, 0xe9, 0xa5 }} class NS_NO_VTABLE nsIDownloader : public nsISupports { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOWNLOADER_IID) /* void init (in nsIURI uri, in nsIDownloadObserver completionObserver, in nsISupports ctxt, in boolean synchronous, in nsILoadGroup loadGroup, in nsIInterfaceRequestor notificationCallbacks, in nsLoadFlags loadAttributes); */ NS_IMETHOD Init(nsIURI *uri, nsIDownloadObserver *completionObserver, nsISupports *ctxt, PRBool synchronous, nsILoadGroup *loadGroup, nsIInterfaceRequestor *notificationCallbacks, nsLoadFlags loadAttributes) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIDOWNLOADER \ NS_IMETHOD Init(nsIURI *uri, nsIDownloadObserver *completionObserver, nsISupports *ctxt, PRBool synchronous, nsILoadGroup *loadGroup, nsIInterfaceRequestor *notificationCallbacks, nsLoadFlags loadAttributes); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIDOWNLOADER(_to) \ NS_IMETHOD Init(nsIURI *uri, nsIDownloadObserver *completionObserver, nsISupports *ctxt, PRBool synchronous, nsILoadGroup *loadGroup, nsIInterfaceRequestor *notificationCallbacks, nsLoadFlags loadAttributes) { return _to Init(uri, completionObserver, ctxt, synchronous, loadGroup, notificationCallbacks, loadAttributes); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIDOWNLOADER(_to) \ NS_IMETHOD Init(nsIURI *uri, nsIDownloadObserver *completionObserver, nsISupports *ctxt, PRBool synchronous, nsILoadGroup *loadGroup, nsIInterfaceRequestor *notificationCallbacks, nsLoadFlags loadAttributes) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(uri, completionObserver, ctxt, synchronous, loadGroup, notificationCallbacks, loadAttributes); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsDownloader : public nsIDownloader { public: NS_DECL_ISUPPORTS NS_DECL_NSIDOWNLOADER nsDownloader(); virtual ~nsDownloader(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsDownloader, nsIDownloader) nsDownloader::nsDownloader() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsDownloader::~nsDownloader() { /* destructor code */ } /* void init (in nsIURI uri, in nsIDownloadObserver completionObserver, in nsISupports ctxt, in boolean synchronous, in nsILoadGroup loadGroup, in nsIInterfaceRequestor notificationCallbacks, in nsLoadFlags loadAttributes); */ NS_IMETHODIMP nsDownloader::Init(nsIURI *uri, nsIDownloadObserver *completionObserver, nsISupports *ctxt, PRBool synchronous, nsILoadGroup *loadGroup, nsIInterfaceRequestor *notificationCallbacks, nsLoadFlags loadAttributes) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsIDownloader_h__ */ .