PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIModule.h

http://firefox-mac-pdf.googlecode.com/
C Header | 182 lines | 74 code | 34 blank | 74 comment | 0 complexity | c097e7bdf0111e8c6b3d371c00a959fa MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/components/nsIModule.idl
  3. */
  4. #ifndef __gen_nsIModule_h__
  5. #define __gen_nsIModule_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. class nsIFile; /* forward declaration */
  14. class nsIComponentManager; /* forward declaration */
  15. /* starting interface: nsIModule */
  16. #define NS_IMODULE_IID_STR "7392d032-5371-11d3-994e-00805fd26fee"
  17. #define NS_IMODULE_IID \
  18. {0x7392d032, 0x5371, 0x11d3, \
  19. { 0x99, 0x4e, 0x00, 0x80, 0x5f, 0xd2, 0x6f, 0xee }}
  20. /**
  21. * The nsIModule interface.
  22. * @status FROZEN
  23. */
  24. class NS_NO_VTABLE NS_SCRIPTABLE nsIModule : public nsISupports {
  25. public:
  26. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMODULE_IID)
  27. /**
  28. * Object Instance Creation
  29. *
  30. * Obtains a Class Object from a nsIModule for a given CID and IID pair.
  31. * This class object can either be query to a nsIFactory or a may be
  32. * query to a nsIClassInfo.
  33. *
  34. * @param aCompMgr : The global component manager
  35. * @param aClass : ClassID of object instance requested
  36. * @param aIID : IID of interface requested
  37. *
  38. */
  39. /* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
  40. NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) = 0;
  41. /**
  42. * One time registration callback
  43. *
  44. * When the nsIModule is discovered, this method will be
  45. * called so that any setup registration can be preformed.
  46. *
  47. * @param aCompMgr : The global component manager
  48. * @param aLocation : The location of the nsIModule on disk
  49. * @param aLoaderStr: Opaque loader specific string
  50. * @param aType : Loader Type being used to load this module
  51. */
  52. /* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); */
  53. NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) = 0;
  54. /**
  55. * One time unregistration callback
  56. *
  57. * When the nsIModule is being unregistered, this method will be
  58. * called so that any unregistration can be preformed
  59. *
  60. * @param aCompMgr : The global component manager
  61. * @param aLocation : The location of the nsIModule on disk
  62. * @param aLoaderStr : Opaque loader specific string
  63. *
  64. */
  65. /* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); */
  66. NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) = 0;
  67. /**
  68. * Module load management
  69. *
  70. * @param aCompMgr : The global component manager
  71. *
  72. * @return indicates to the caller if the module can be unloaded.
  73. * Returning PR_TRUE isn't a guarantee that the module will be
  74. * unloaded. It constitues only willingness of the module to be
  75. * unloaded. It is very important to ensure that no outstanding
  76. * references to the module's code/data exist before returning
  77. * PR_TRUE.
  78. * Returning PR_FALSE guaratees that the module won't be unloaded.
  79. */
  80. /* boolean canUnload (in nsIComponentManager aCompMgr); */
  81. NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) = 0;
  82. };
  83. NS_DEFINE_STATIC_IID_ACCESSOR(nsIModule, NS_IMODULE_IID)
  84. /* Use this macro when declaring classes that implement this interface. */
  85. #define NS_DECL_NSIMODULE \
  86. NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult); \
  87. NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType); \
  88. NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr); \
  89. NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval);
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  91. #define NS_FORWARD_NSIMODULE(_to) \
  92. NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) { return _to GetClassObject(aCompMgr, aClass, aIID, aResult); } \
  93. NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) { return _to RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \
  94. NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return _to UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \
  95. NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return _to CanUnload(aCompMgr, _retval); }
  96. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  97. #define NS_FORWARD_SAFE_NSIMODULE(_to) \
  98. NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aCompMgr, aClass, aIID, aResult); } \
  99. NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \
  100. NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \
  101. NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUnload(aCompMgr, _retval); }
  102. #if 0
  103. /* Use the code below as a template for the implementation class for this interface. */
  104. /* Header file */
  105. class nsModule : public nsIModule
  106. {
  107. public:
  108. NS_DECL_ISUPPORTS
  109. NS_DECL_NSIMODULE
  110. nsModule();
  111. private:
  112. ~nsModule();
  113. protected:
  114. /* additional members */
  115. };
  116. /* Implementation file */
  117. NS_IMPL_ISUPPORTS1(nsModule, nsIModule)
  118. nsModule::nsModule()
  119. {
  120. /* member initializers and constructor code */
  121. }
  122. nsModule::~nsModule()
  123. {
  124. /* destructor code */
  125. }
  126. /* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
  127. NS_IMETHODIMP nsModule::GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult)
  128. {
  129. return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131. /* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); */
  132. NS_IMETHODIMP nsModule::RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType)
  133. {
  134. return NS_ERROR_NOT_IMPLEMENTED;
  135. }
  136. /* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); */
  137. NS_IMETHODIMP nsModule::UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr)
  138. {
  139. return NS_ERROR_NOT_IMPLEMENTED;
  140. }
  141. /* boolean canUnload (in nsIComponentManager aCompMgr); */
  142. NS_IMETHODIMP nsModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval)
  143. {
  144. return NS_ERROR_NOT_IMPLEMENTED;
  145. }
  146. /* End of implementation class template. */
  147. #endif
  148. #endif /* __gen_nsIModule_h__ */