PageRenderTime 778ms CodeModel.GetById 762ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsISupports.h

http://firefox-mac-pdf.googlecode.com/
C Header | 125 lines | 68 code | 30 blank | 27 comment | 0 complexity | 03b49ed409322f5f4402cdf5492e9200 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/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 NS_SCRIPTABLE nsISupports {
  23. public:
  24. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
  25. /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  26. NS_SCRIPTABLE 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. NS_DEFINE_STATIC_IID_ACCESSOR(nsISupports, NS_ISUPPORTS_IID)
  33. /* Use this macro when declaring classes that implement this interface. */
  34. #define NS_DECL_NSISUPPORTS \
  35. NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result); \
  36. NS_IMETHOD_(nsrefcnt) AddRef(void); \
  37. NS_IMETHOD_(nsrefcnt) Release(void);
  38. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  39. #define NS_FORWARD_NSISUPPORTS(_to) \
  40. NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return _to QueryInterface(uuid, result); } \
  41. NS_IMETHOD_(nsrefcnt) AddRef(void) { return _to AddRef(); } \
  42. NS_IMETHOD_(nsrefcnt) Release(void) { return _to Release(); }
  43. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  44. #define NS_FORWARD_SAFE_NSISUPPORTS(_to) \
  45. NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(uuid, result); } \
  46. NS_IMETHOD_(nsrefcnt) AddRef(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRef(); } \
  47. NS_IMETHOD_(nsrefcnt) Release(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Release(); }
  48. #if 0
  49. /* Use the code below as a template for the implementation class for this interface. */
  50. /* Header file */
  51. class nsSupports : public nsISupports
  52. {
  53. public:
  54. NS_DECL_ISUPPORTS
  55. NS_DECL_NSISUPPORTS
  56. nsSupports();
  57. private:
  58. ~nsSupports();
  59. protected:
  60. /* additional members */
  61. };
  62. /* Implementation file */
  63. NS_IMPL_ISUPPORTS1(nsSupports, nsISupports)
  64. nsSupports::nsSupports()
  65. {
  66. /* member initializers and constructor code */
  67. }
  68. nsSupports::~nsSupports()
  69. {
  70. /* destructor code */
  71. }
  72. /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
  73. NS_IMETHODIMP nsSupports::QueryInterface(const nsIID & uuid, void * *result)
  74. {
  75. return NS_ERROR_NOT_IMPLEMENTED;
  76. }
  77. /* [noscript, notxpcom] nsrefcnt AddRef (); */
  78. NS_IMETHODIMP_(nsrefcnt) nsSupports::AddRef()
  79. {
  80. return NS_ERROR_NOT_IMPLEMENTED;
  81. }
  82. /* [noscript, notxpcom] nsrefcnt Release (); */
  83. NS_IMETHODIMP_(nsrefcnt) nsSupports::Release()
  84. {
  85. return NS_ERROR_NOT_IMPLEMENTED;
  86. }
  87. /* End of implementation class template. */
  88. #endif
  89. /*
  90. * End commenting out the C++ versions of the above in the output header
  91. */
  92. #endif
  93. #include "nsISupportsBase.h"
  94. #include "nsISupportsUtils.h"
  95. #endif /* __gen_nsISupports_h__ */