PageRenderTime 53ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIUnicharStreamListener.h

http://firefox-mac-pdf.googlecode.com/
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. #ifndef __gen_nsIUnicharStreamListener_h__
  5. #define __gen_nsIUnicharStreamListener_h__
  6. #ifndef __gen_nsIRequestObserver_h__
  7. #include "nsIRequestObserver.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIUnicharStreamListener */
  14. #define NS_IUNICHARSTREAMLISTENER_IID_STR "4a7e9b62-fef8-400d-9865-d6820f630b4c"
  15. #define NS_IUNICHARSTREAMLISTENER_IID \
  16. {0x4a7e9b62, 0xfef8, 0x400d, \
  17. { 0x98, 0x65, 0xd6, 0x82, 0x0f, 0x63, 0x0b, 0x4c }}
  18. /**
  19. * nsIUnicharStreamListener is very similar to nsIStreamListener with
  20. * the difference being that this interface gives notifications about
  21. * data being available after the raw data has been converted to
  22. * UTF-16.
  23. *
  24. * nsIUnicharStreamListener
  25. *
  26. * @status FROZEN
  27. */
  28. class NS_NO_VTABLE NS_SCRIPTABLE nsIUnicharStreamListener : public nsIRequestObserver {
  29. public:
  30. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUNICHARSTREAMLISTENER_IID)
  31. /**
  32. * Called when the next chunk of data (corresponding to the
  33. * request) is available.
  34. *
  35. * @param aRequest request corresponding to the source of the data
  36. * @param aContext user defined context
  37. * @param aData the data chunk
  38. *
  39. * An exception thrown from onUnicharDataAvailable has the
  40. * side-effect of causing the request to be canceled.
  41. */
  42. /* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */
  43. NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) = 0;
  44. };
  45. NS_DEFINE_STATIC_IID_ACCESSOR(nsIUnicharStreamListener, NS_IUNICHARSTREAMLISTENER_IID)
  46. /* Use this macro when declaring classes that implement this interface. */
  47. #define NS_DECL_NSIUNICHARSTREAMLISTENER \
  48. NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData);
  49. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  50. #define NS_FORWARD_NSIUNICHARSTREAMLISTENER(_to) \
  51. NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return _to OnUnicharDataAvailable(aRequest, aContext, aData); }
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  53. #define NS_FORWARD_SAFE_NSIUNICHARSTREAMLISTENER(_to) \
  54. NS_SCRIPTABLE NS_IMETHOD OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnicharDataAvailable(aRequest, aContext, aData); }
  55. #if 0
  56. /* Use the code below as a template for the implementation class for this interface. */
  57. /* Header file */
  58. class nsUnicharStreamListener : public nsIUnicharStreamListener
  59. {
  60. public:
  61. NS_DECL_ISUPPORTS
  62. NS_DECL_NSIUNICHARSTREAMLISTENER
  63. nsUnicharStreamListener();
  64. private:
  65. ~nsUnicharStreamListener();
  66. protected:
  67. /* additional members */
  68. };
  69. /* Implementation file */
  70. NS_IMPL_ISUPPORTS1(nsUnicharStreamListener, nsIUnicharStreamListener)
  71. nsUnicharStreamListener::nsUnicharStreamListener()
  72. {
  73. /* member initializers and constructor code */
  74. }
  75. nsUnicharStreamListener::~nsUnicharStreamListener()
  76. {
  77. /* destructor code */
  78. }
  79. /* void onUnicharDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in AString aData); */
  80. NS_IMETHODIMP nsUnicharStreamListener::OnUnicharDataAvailable(nsIRequest *aRequest, nsISupports *aContext, const nsAString & aData)
  81. {
  82. return NS_ERROR_NOT_IMPLEMENTED;
  83. }
  84. /* End of implementation class template. */
  85. #endif
  86. #endif /* __gen_nsIUnicharStreamListener_h__ */