/gecko_api/include/nsIUnicharStreamListener.h
C++ Header | 112 lines | 48 code | 26 blank | 38 comment | 0 complexity | 9b1bf2a86899ec5863d80c4db7da7175 MD5 | raw file
1/* 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/netwerk/base/public/nsIUnicharStreamListener.idl 3 */ 4 5#ifndef __gen_nsIUnicharStreamListener_h__ 6#define __gen_nsIUnicharStreamListener_h__ 7 8 9#ifndef __gen_nsIRequestObserver_h__ 10#include "nsIRequestObserver.h" 11#endif 12 13/* For IDL files that don't want to include root IDL files. */ 14#ifndef NS_NO_VTABLE 15#define NS_NO_VTABLE 16#endif 17 18/* starting interface: nsIUnicharStreamListener */ 19#define NS_IUNICHARSTREAMLISTENER_IID_STR "4a7e9b62-fef8-400d-9865-d6820f630b4c" 20 21#define NS_IUNICHARSTREAMLISTENER_IID \ 22 {0x4a7e9b62, 0xfef8, 0x400d, \ 23 { 0x98, 0x65, 0xd6, 0x82, 0x0f, 0x63, 0x0b, 0x4c }} 24 25/** 26 * nsIUnicharStreamListener is very similar to nsIStreamListener with 27 * the difference being that this interface gives notifications about 28 * data being available after the raw data has been converted to 29 * UTF-16. 30 * 31 * nsIUnicharStreamListener 32 * 33 * @status FROZEN 34 */ 35class NS_NO_VTABLE NS_SCRIPTABLE nsIUnicharStreamListener : public nsIRequestObserver { 36 public: 37 38 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUNICHARSTREAMLISTENER_IID) 39 40 /** 41 * Called when the next chunk of data (corresponding to the 42 * request) is available. 43 * 44 * @param aRequest request corresponding to the source of the data 45 * @param aContext user defined context 46 * @param aData the data chunk 47 * 48 * An exception thrown from onUnicharDataAvailable has the 49 * side-effect of causing the request to be canceled. 50 */ 51 /* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */ 52 NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) = 0; 53 54}; 55 56 NS_DEFINE_STATIC_IID_ACCESSOR(nsIUnicharStreamListener, NS_IUNICHARSTREAMLISTENER_IID) 57 58/* Use this macro when declaring classes that implement this interface. */ 59#define NS_DECL_NSIUNICHARSTREAMLISTENER \ 60 NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData); 61 62/* Use this macro to declare functions that forward the behavior of this interface to another object. */ 63#define NS_FORWARD_NSIUNICHARSTREAMLISTENER(_to) \ 64 NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return _to OnUnicharDataAvailable(aRequest, aContext, aData); } 65 66/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ 67#define NS_FORWARD_SAFE_NSIUNICHARSTREAMLISTENER(_to) \ 68 NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnicharDataAvailable(aRequest, aContext, aData); } 69 70#if 0 71/* Use the code below as a template for the implementation class for this interface. */ 72 73/* Header file */ 74class nsUnicharStreamListener : public nsIUnicharStreamListener 75{ 76public: 77 NS_DECL_ISUPPORTS 78 NS_DECL_NSIUNICHARSTREAMLISTENER 79 80 nsUnicharStreamListener(); 81 82private: 83 ~nsUnicharStreamListener(); 84 85protected: 86 /* additional members */ 87}; 88 89/* Implementation file */ 90NS_IMPL_ISUPPORTS1(nsUnicharStreamListener, nsIUnicharStreamListener) 91 92nsUnicharStreamListener::nsUnicharStreamListener() 93{ 94 /* member initializers and constructor code */ 95} 96 97nsUnicharStreamListener::~nsUnicharStreamListener() 98{ 99 /* destructor code */ 100} 101 102/* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */ 103NS_IMETHODIMP nsUnicharStreamListener::OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) 104{ 105 return NS_ERROR_NOT_IMPLEMENTED; 106} 107 108/* End of implementation class template. */ 109#endif 110 111 112#endif /* __gen_nsIUnicharStreamListener_h__ */