nsITraceRefcnt.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsITraceRefcnt.idl
  3. */
  4. #ifndef __gen_nsITraceRefcnt_h__
  5. #define __gen_nsITraceRefcnt_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.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: nsITraceRefcnt */
  14. #define NS_ITRACEREFCNT_IID_STR "273dc92f-0fe6-4545-96a9-21be77828039"
  15. #define NS_ITRACEREFCNT_IID \
  16. {0x273dc92f, 0x0fe6, 0x4545, \
  17. { 0x96, 0xa9, 0x21, 0xbe, 0x77, 0x82, 0x80, 0x39 }}
  18. /**
  19. * nsITraceRefcnt is an interface between XPCOM Glue and XPCOM. Users should
  20. * access the nsITraceRefcnt interface through the static class nsTraceRefcnt.
  21. * @see nsTraceRefcnt.h
  22. *
  23. * @status UNDER_REVIEW
  24. */
  25. class NS_NO_VTABLE nsITraceRefcnt : public nsISupports {
  26. public:
  27. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITRACEREFCNT_IID)
  28. /* void logAddRef (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName, in unsigned long aInstanceSize); */
  29. NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) = 0;
  30. /* void logRelease (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName); */
  31. NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) = 0;
  32. /* void logCtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */
  33. NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) = 0;
  34. /* void logDtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */
  35. NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) = 0;
  36. /* void logAddCOMPtr (in voidPtr aPtr, in nsISupports aObject); */
  37. NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) = 0;
  38. /* void logReleaseCOMPtr (in voidPtr aPtr, in nsISupports aObject); */
  39. NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) = 0;
  40. };
  41. /* Use this macro when declaring classes that implement this interface. */
  42. #define NS_DECL_NSITRACEREFCNT \
  43. NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize); \
  44. NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName); \
  45. NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize); \
  46. NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize); \
  47. NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject); \
  48. NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject);
  49. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  50. #define NS_FORWARD_NSITRACEREFCNT(_to) \
  51. NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogAddRef(aPtr, aNewRefcnt, aTypeName, aInstanceSize); } \
  52. NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) { return _to LogRelease(aPtr, aNewRefcnt, aTypeName); } \
  53. NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogCtor(aPtr, aTypeName, aInstanceSize); } \
  54. NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return _to LogDtor(aPtr, aTypeName, aInstanceSize); } \
  55. NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) { return _to LogAddCOMPtr(aPtr, aObject); } \
  56. NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) { return _to LogReleaseCOMPtr(aPtr, aObject); }
  57. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  58. #define NS_FORWARD_SAFE_NSITRACEREFCNT(_to) \
  59. NS_IMETHOD LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogAddRef(aPtr, aNewRefcnt, aTypeName, aInstanceSize); } \
  60. NS_IMETHOD LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogRelease(aPtr, aNewRefcnt, aTypeName); } \
  61. NS_IMETHOD LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogCtor(aPtr, aTypeName, aInstanceSize); } \
  62. NS_IMETHOD LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogDtor(aPtr, aTypeName, aInstanceSize); } \
  63. NS_IMETHOD LogAddCOMPtr(void * aPtr, nsISupports *aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogAddCOMPtr(aPtr, aObject); } \
  64. NS_IMETHOD LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) { return !_to ? NS_ERROR_NULL_POINTER : _to->LogReleaseCOMPtr(aPtr, aObject); }
  65. #if 0
  66. /* Use the code below as a template for the implementation class for this interface. */
  67. /* Header file */
  68. class nsTraceRefcnt : public nsITraceRefcnt
  69. {
  70. public:
  71. NS_DECL_ISUPPORTS
  72. NS_DECL_NSITRACEREFCNT
  73. nsTraceRefcnt();
  74. private:
  75. ~nsTraceRefcnt();
  76. protected:
  77. /* additional members */
  78. };
  79. /* Implementation file */
  80. NS_IMPL_ISUPPORTS1(nsTraceRefcnt, nsITraceRefcnt)
  81. nsTraceRefcnt::nsTraceRefcnt()
  82. {
  83. /* member initializers and constructor code */
  84. }
  85. nsTraceRefcnt::~nsTraceRefcnt()
  86. {
  87. /* destructor code */
  88. }
  89. /* void logAddRef (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName, in unsigned long aInstanceSize); */
  90. NS_IMETHODIMP nsTraceRefcnt::LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize)
  91. {
  92. return NS_ERROR_NOT_IMPLEMENTED;
  93. }
  94. /* void logRelease (in voidPtr aPtr, in nsrefcnt aNewRefcnt, in string aTypeName); */
  95. NS_IMETHODIMP nsTraceRefcnt::LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName)
  96. {
  97. return NS_ERROR_NOT_IMPLEMENTED;
  98. }
  99. /* void logCtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */
  100. NS_IMETHODIMP nsTraceRefcnt::LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize)
  101. {
  102. return NS_ERROR_NOT_IMPLEMENTED;
  103. }
  104. /* void logDtor (in voidPtr aPtr, in string aTypeName, in unsigned long aInstanceSize); */
  105. NS_IMETHODIMP nsTraceRefcnt::LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize)
  106. {
  107. return NS_ERROR_NOT_IMPLEMENTED;
  108. }
  109. /* void logAddCOMPtr (in voidPtr aPtr, in nsISupports aObject); */
  110. NS_IMETHODIMP nsTraceRefcnt::LogAddCOMPtr(void * aPtr, nsISupports *aObject)
  111. {
  112. return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114. /* void logReleaseCOMPtr (in voidPtr aPtr, in nsISupports aObject); */
  115. NS_IMETHODIMP nsTraceRefcnt::LogReleaseCOMPtr(void * aPtr, nsISupports *aObject)
  116. {
  117. return NS_ERROR_NOT_IMPLEMENTED;
  118. }
  119. /* End of implementation class template. */
  120. #endif
  121. #endif /* __gen_nsITraceRefcnt_h__ */