nsIClassInfo.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/xpcom/components/nsIClassInfo.idl
  3. */
  4. #ifndef __gen_nsIClassInfo_h__
  5. #define __gen_nsIClassInfo_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_nsIProgrammingLanguage_h__
  10. #include "nsIProgrammingLanguage.h"
  11. #endif
  12. /* For IDL files that don't want to include root IDL files. */
  13. #ifndef NS_NO_VTABLE
  14. #define NS_NO_VTABLE
  15. #endif
  16. /* starting interface: nsIClassInfo */
  17. #define NS_ICLASSINFO_IID_STR "986c11d0-f340-11d4-9075-0010a4e73d9a"
  18. #define NS_ICLASSINFO_IID \
  19. {0x986c11d0, 0xf340, 0x11d4, \
  20. { 0x90, 0x75, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
  21. /**
  22. * Provides information about a specific implementation class
  23. * @status FROZEN
  24. */
  25. class NS_NO_VTABLE nsIClassInfo : public nsISupports {
  26. public:
  27. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLASSINFO_IID)
  28. /**
  29. * Get an ordered list of the interface ids that instances of the class
  30. * promise to implement. Note that nsISupports is an implicit member
  31. * of any such list and need not be included.
  32. *
  33. * Should set *count = 0 and *array = null and return NS_OK if getting the
  34. * list is not supported.
  35. */
  36. /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */
  37. NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) = 0;
  38. /**
  39. * Get a language mapping specific helper object that may assist in using
  40. * objects of this class in a specific lanaguage. For instance, if asked
  41. * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return
  42. * an object that can be QI'd into the nsIXPCScriptable interface to assist
  43. * XPConnect in supplying JavaScript specific behavior to callers of the
  44. * instance object.
  45. *
  46. * see: nsIProgrammingLanguage.idl
  47. *
  48. * Should return null if no helper available for given language.
  49. */
  50. /* nsISupports getHelperForLanguage (in PRUint32 language); */
  51. NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) = 0;
  52. /**
  53. * A contract ID through which an instance of this class can be created
  54. * (or accessed as a service, if |flags & SINGLETON|), or null.
  55. */
  56. /* readonly attribute string contractID; */
  57. NS_IMETHOD GetContractID(char * *aContractID) = 0;
  58. /**
  59. * A human readable string naming the class, or null.
  60. */
  61. /* readonly attribute string classDescription; */
  62. NS_IMETHOD GetClassDescription(char * *aClassDescription) = 0;
  63. /**
  64. * A class ID through which an instance of this class can be created
  65. * (or accessed as a service, if |flags & SINGLETON|), or null.
  66. */
  67. /* readonly attribute nsCIDPtr classID; */
  68. NS_IMETHOD GetClassID(nsCID * *aClassID) = 0;
  69. /**
  70. * Return language type from list in nsIProgrammingLanguage
  71. */
  72. /* readonly attribute PRUint32 implementationLanguage; */
  73. NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) = 0;
  74. /**
  75. * Bitflags for 'flags' attribute.
  76. */
  77. enum { SINGLETON = 1U };
  78. enum { THREADSAFE = 2U };
  79. enum { MAIN_THREAD_ONLY = 4U };
  80. enum { DOM_OBJECT = 8U };
  81. enum { PLUGIN_OBJECT = 16U };
  82. enum { EAGER_CLASSINFO = 32U };
  83. /**
  84. * 'flags' attribute bitflag: whether objects of this type implement
  85. * nsIContent.
  86. */
  87. enum { CONTENT_NODE = 64U };
  88. enum { RESERVED = 2147483648U };
  89. /* readonly attribute PRUint32 flags; */
  90. NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0;
  91. /**
  92. * Also a class ID through which an instance of this class can be created
  93. * (or accessed as a service, if |flags & SINGLETON|). If the class does
  94. * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
  95. * exists so C++ callers can avoid allocating and freeing a CID, as would
  96. * happen if they used classID.
  97. */
  98. /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */
  99. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) = 0;
  100. };
  101. /* Use this macro when declaring classes that implement this interface. */
  102. #define NS_DECL_NSICLASSINFO \
  103. NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array); \
  104. NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval); \
  105. NS_IMETHOD GetContractID(char * *aContractID); \
  106. NS_IMETHOD GetClassDescription(char * *aClassDescription); \
  107. NS_IMETHOD GetClassID(nsCID * *aClassID); \
  108. NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage); \
  109. NS_IMETHOD GetFlags(PRUint32 *aFlags); \
  110. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc);
  111. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  112. #define NS_FORWARD_NSICLASSINFO(_to) \
  113. NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return _to GetInterfaces(count, array); } \
  114. NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return _to GetHelperForLanguage(language, _retval); } \
  115. NS_IMETHOD GetContractID(char * *aContractID) { return _to GetContractID(aContractID); } \
  116. NS_IMETHOD GetClassDescription(char * *aClassDescription) { return _to GetClassDescription(aClassDescription); } \
  117. NS_IMETHOD GetClassID(nsCID * *aClassID) { return _to GetClassID(aClassID); } \
  118. NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return _to GetImplementationLanguage(aImplementationLanguage); } \
  119. NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \
  120. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return _to GetClassIDNoAlloc(aClassIDNoAlloc); }
  121. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  122. #define NS_FORWARD_SAFE_NSICLASSINFO(_to) \
  123. NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaces(count, array); } \
  124. NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelperForLanguage(language, _retval); } \
  125. NS_IMETHOD GetContractID(char * *aContractID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContractID(aContractID); } \
  126. NS_IMETHOD GetClassDescription(char * *aClassDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassDescription(aClassDescription); } \
  127. NS_IMETHOD GetClassID(nsCID * *aClassID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassID(aClassID); } \
  128. NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementationLanguage(aImplementationLanguage); } \
  129. NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  130. NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassIDNoAlloc(aClassIDNoAlloc); }
  131. #if 0
  132. /* Use the code below as a template for the implementation class for this interface. */
  133. /* Header file */
  134. class nsClassInfo : public nsIClassInfo
  135. {
  136. public:
  137. NS_DECL_ISUPPORTS
  138. NS_DECL_NSICLASSINFO
  139. nsClassInfo();
  140. private:
  141. ~nsClassInfo();
  142. protected:
  143. /* additional members */
  144. };
  145. /* Implementation file */
  146. NS_IMPL_ISUPPORTS1(nsClassInfo, nsIClassInfo)
  147. nsClassInfo::nsClassInfo()
  148. {
  149. /* member initializers and constructor code */
  150. }
  151. nsClassInfo::~nsClassInfo()
  152. {
  153. /* destructor code */
  154. }
  155. /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */
  156. NS_IMETHODIMP nsClassInfo::GetInterfaces(PRUint32 *count, nsIID * **array)
  157. {
  158. return NS_ERROR_NOT_IMPLEMENTED;
  159. }
  160. /* nsISupports getHelperForLanguage (in PRUint32 language); */
  161. NS_IMETHODIMP nsClassInfo::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
  162. {
  163. return NS_ERROR_NOT_IMPLEMENTED;
  164. }
  165. /* readonly attribute string contractID; */
  166. NS_IMETHODIMP nsClassInfo::GetContractID(char * *aContractID)
  167. {
  168. return NS_ERROR_NOT_IMPLEMENTED;
  169. }
  170. /* readonly attribute string classDescription; */
  171. NS_IMETHODIMP nsClassInfo::GetClassDescription(char * *aClassDescription)
  172. {
  173. return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175. /* readonly attribute nsCIDPtr classID; */
  176. NS_IMETHODIMP nsClassInfo::GetClassID(nsCID * *aClassID)
  177. {
  178. return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180. /* readonly attribute PRUint32 implementationLanguage; */
  181. NS_IMETHODIMP nsClassInfo::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
  182. {
  183. return NS_ERROR_NOT_IMPLEMENTED;
  184. }
  185. /* readonly attribute PRUint32 flags; */
  186. NS_IMETHODIMP nsClassInfo::GetFlags(PRUint32 *aFlags)
  187. {
  188. return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190. /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */
  191. NS_IMETHODIMP nsClassInfo::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
  192. {
  193. return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195. /* End of implementation class template. */
  196. #endif
  197. #endif /* __gen_nsIClassInfo_h__ */