nsIDebug.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/base/nsIDebug.idl
  3. */
  4. #ifndef __gen_nsIDebug_h__
  5. #define __gen_nsIDebug_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: nsIDebug */
  14. #define NS_IDEBUG_IID_STR "3bf0c3d7-3bd9-4cf2-a971-33572c503e1e"
  15. #define NS_IDEBUG_IID \
  16. {0x3bf0c3d7, 0x3bd9, 0x4cf2, \
  17. { 0xa9, 0x71, 0x33, 0x57, 0x2c, 0x50, 0x3e, 0x1e }}
  18. /**
  19. * nsIDebug is an interface between XPCOM Glue and XPCOM. Users should access
  20. * the nsIDebug interface through the static class nsDebug.
  21. * @see nsDebug.h
  22. *
  23. * @status UNDER_REVIEW
  24. *
  25. */
  26. class NS_NO_VTABLE nsIDebug : public nsISupports {
  27. public:
  28. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEBUG_IID)
  29. /* void assertion (in string aStr, in string aExpr, in string aFile, in long aLine); */
  30. NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) = 0;
  31. /* void warning (in string aStr, in string aFile, in long aLine); */
  32. NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) = 0;
  33. /* void break (in string aFile, in long aLine); */
  34. NS_IMETHOD Break(const char *aFile, PRInt32 aLine) = 0;
  35. /* void abort (in string aFile, in long aLine); */
  36. NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) = 0;
  37. };
  38. /* Use this macro when declaring classes that implement this interface. */
  39. #define NS_DECL_NSIDEBUG \
  40. NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine); \
  41. NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine); \
  42. NS_IMETHOD Break(const char *aFile, PRInt32 aLine); \
  43. NS_IMETHOD Abort(const char *aFile, PRInt32 aLine);
  44. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  45. #define NS_FORWARD_NSIDEBUG(_to) \
  46. NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) { return _to Assertion(aStr, aExpr, aFile, aLine); } \
  47. NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) { return _to Warning(aStr, aFile, aLine); } \
  48. NS_IMETHOD Break(const char *aFile, PRInt32 aLine) { return _to Break(aFile, aLine); } \
  49. NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) { return _to Abort(aFile, aLine); }
  50. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  51. #define NS_FORWARD_SAFE_NSIDEBUG(_to) \
  52. NS_IMETHOD Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Assertion(aStr, aExpr, aFile, aLine); } \
  53. NS_IMETHOD Warning(const char *aStr, const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Warning(aStr, aFile, aLine); } \
  54. NS_IMETHOD Break(const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Break(aFile, aLine); } \
  55. NS_IMETHOD Abort(const char *aFile, PRInt32 aLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->Abort(aFile, aLine); }
  56. #if 0
  57. /* Use the code below as a template for the implementation class for this interface. */
  58. /* Header file */
  59. class nsDebug : public nsIDebug
  60. {
  61. public:
  62. NS_DECL_ISUPPORTS
  63. NS_DECL_NSIDEBUG
  64. nsDebug();
  65. private:
  66. ~nsDebug();
  67. protected:
  68. /* additional members */
  69. };
  70. /* Implementation file */
  71. NS_IMPL_ISUPPORTS1(nsDebug, nsIDebug)
  72. nsDebug::nsDebug()
  73. {
  74. /* member initializers and constructor code */
  75. }
  76. nsDebug::~nsDebug()
  77. {
  78. /* destructor code */
  79. }
  80. /* void assertion (in string aStr, in string aExpr, in string aFile, in long aLine); */
  81. NS_IMETHODIMP nsDebug::Assertion(const char *aStr, const char *aExpr, const char *aFile, PRInt32 aLine)
  82. {
  83. return NS_ERROR_NOT_IMPLEMENTED;
  84. }
  85. /* void warning (in string aStr, in string aFile, in long aLine); */
  86. NS_IMETHODIMP nsDebug::Warning(const char *aStr, const char *aFile, PRInt32 aLine)
  87. {
  88. return NS_ERROR_NOT_IMPLEMENTED;
  89. }
  90. /* void break (in string aFile, in long aLine); */
  91. NS_IMETHODIMP nsDebug::Break(const char *aFile, PRInt32 aLine)
  92. {
  93. return NS_ERROR_NOT_IMPLEMENTED;
  94. }
  95. /* void abort (in string aFile, in long aLine); */
  96. NS_IMETHODIMP nsDebug::Abort(const char *aFile, PRInt32 aLine)
  97. {
  98. return NS_ERROR_NOT_IMPLEMENTED;
  99. }
  100. /* End of implementation class template. */
  101. #endif
  102. #endif /* __gen_nsIDebug_h__ */