nsISupports.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsISupports.idl
  3. */
  4. #ifndef __gen_nsISupports_h__
  5. #define __gen_nsISupports_h__
  6. #ifndef __gen_nsrootidl_h__
  7. #include "nsrootidl.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. /*
  14. * Start commenting out the C++ versions of the below in the output header
  15. */
  16. #if 0
  17. /* starting interface: nsISupports */
  18. #define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046"
  19. #define NS_ISUPPORTS_IID \
  20. {0x00000000, 0x0000, 0x0000, \
  21. { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
  22. class NS_NO_VTABLE nsISupports {
  23. public:
  24. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
  25. /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  26. NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0;
  27. /* [noscript, notxpcom] nsrefcnt AddRef (); */
  28. NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
  29. /* [noscript, notxpcom] nsrefcnt Release (); */
  30. NS_IMETHOD_(nsrefcnt) Release(void) = 0;
  31. };
  32. /* Use this macro when declaring classes that implement this interface. */
  33. #define NS_DECL_NSISUPPORTS \
  34. NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result); \
  35. NS_IMETHOD_(nsrefcnt) AddRef(void); \
  36. NS_IMETHOD_(nsrefcnt) Release(void);
  37. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  38. #define NS_FORWARD_NSISUPPORTS(_to) \
  39. NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return _to QueryInterface(uuid, result); } \
  40. NS_IMETHOD_(nsrefcnt) AddRef(void) { return _to AddRef(); } \
  41. NS_IMETHOD_(nsrefcnt) Release(void) { return _to Release(); }
  42. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  43. #define NS_FORWARD_SAFE_NSISUPPORTS(_to) \
  44. NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(uuid, result); } \
  45. NS_IMETHOD_(nsrefcnt) AddRef(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRef(); } \
  46. NS_IMETHOD_(nsrefcnt) Release(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Release(); }
  47. #if 0
  48. /* Use the code below as a template for the implementation class for this interface. */
  49. /* Header file */
  50. class nsSupports : public nsISupports
  51. {
  52. public:
  53. NS_DECL_ISUPPORTS
  54. NS_DECL_NSISUPPORTS
  55. nsSupports();
  56. private:
  57. ~nsSupports();
  58. protected:
  59. /* additional members */
  60. };
  61. /* Implementation file */
  62. NS_IMPL_ISUPPORTS1(nsSupports, nsISupports)
  63. nsSupports::nsSupports()
  64. {
  65. /* member initializers and constructor code */
  66. }
  67. nsSupports::~nsSupports()
  68. {
  69. /* destructor code */
  70. }
  71. /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  72. NS_IMETHODIMP nsSupports::QueryInterface(const nsIID & uuid, void * *result)
  73. {
  74. return NS_ERROR_NOT_IMPLEMENTED;
  75. }
  76. /* [noscript, notxpcom] nsrefcnt AddRef (); */
  77. NS_IMETHODIMP_(nsrefcnt) nsSupports::AddRef()
  78. {
  79. return NS_ERROR_NOT_IMPLEMENTED;
  80. }
  81. /* [noscript, notxpcom] nsrefcnt Release (); */
  82. NS_IMETHODIMP_(nsrefcnt) nsSupports::Release()
  83. {
  84. return NS_ERROR_NOT_IMPLEMENTED;
  85. }
  86. /* End of implementation class template. */
  87. #endif
  88. /*
  89. * End commenting out the C++ versions of the above in the output header
  90. */
  91. #endif
  92. #include "nsISupportsBase.h"
  93. #include "nsISupportsUtils.h"
  94. #endif /* __gen_nsISupports_h__ */