/* * DO NOT EDIT. THIS FILE IS GENERATED FROM nsISimpleStreamProvider.idl */ #ifndef __gen_nsISimpleStreamProvider_h__ #define __gen_nsISimpleStreamProvider_h__ #ifndef __gen_nsIStreamProvider_h__ #include "nsIStreamProvider.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class nsIInputStream; /* forward declaration */ /* starting interface: nsISimpleStreamProvider */ #define NS_ISIMPLESTREAMPROVIDER_IID_STR "c20bb3b9-0755-4eff-9222-3537f9e89082" #define NS_ISIMPLESTREAMPROVIDER_IID \ {0xc20bb3b9, 0x0755, 0x4eff, \ { 0x92, 0x22, 0x35, 0x37, 0xf9, 0xe8, 0x90, 0x82 }} /** * A simple stream provider can be used with AsyncWrite to supply data from * an existing input stream. */ class NS_NO_VTABLE nsISimpleStreamProvider : public nsIStreamProvider { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISIMPLESTREAMPROVIDER_IID) /** * Initialize the simple stream provider. * * @param aSource data will be read from this input stream to the channel * @param aObserver optional stream observer (can be NULL) */ /* void init (in nsIInputStream aSource, in nsIRequestObserver aObserver); */ NS_IMETHOD Init(nsIInputStream *aSource, nsIRequestObserver *aObserver) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSISIMPLESTREAMPROVIDER \ NS_IMETHOD Init(nsIInputStream *aSource, nsIRequestObserver *aObserver); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSISIMPLESTREAMPROVIDER(_to) \ NS_IMETHOD Init(nsIInputStream *aSource, nsIRequestObserver *aObserver) { return _to Init(aSource, aObserver); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSISIMPLESTREAMPROVIDER(_to) \ NS_IMETHOD Init(nsIInputStream *aSource, nsIRequestObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aSource, aObserver); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsSimpleStreamProvider : public nsISimpleStreamProvider { public: NS_DECL_ISUPPORTS NS_DECL_NSISIMPLESTREAMPROVIDER nsSimpleStreamProvider(); virtual ~nsSimpleStreamProvider(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsSimpleStreamProvider, nsISimpleStreamProvider) nsSimpleStreamProvider::nsSimpleStreamProvider() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsSimpleStreamProvider::~nsSimpleStreamProvider() { /* destructor code */ } /* void init (in nsIInputStream aSource, in nsIRequestObserver aObserver); */ NS_IMETHODIMP nsSimpleStreamProvider::Init(nsIInputStream *aSource, nsIRequestObserver *aObserver) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsISimpleStreamProvider_h__ */ .