OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_Depend/mozilla/xpcom/components/nsIModule.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsIModule_h__ |
| 6 #define __gen_nsIModule_h__ |
| 7 |
| 8 |
| 9 #ifndef __gen_nsISupports_h__ |
| 10 #include "nsISupports.h" |
| 11 #endif |
| 12 |
| 13 /* For IDL files that don't want to include root IDL files. */ |
| 14 #ifndef NS_NO_VTABLE |
| 15 #define NS_NO_VTABLE |
| 16 #endif |
| 17 class nsIFile; /* forward declaration */ |
| 18 |
| 19 class nsIComponentManager; /* forward declaration */ |
| 20 |
| 21 |
| 22 /* starting interface: nsIModule */ |
| 23 #define NS_IMODULE_IID_STR "7392d032-5371-11d3-994e-00805fd26fee" |
| 24 |
| 25 #define NS_IMODULE_IID \ |
| 26 {0x7392d032, 0x5371, 0x11d3, \ |
| 27 { 0x99, 0x4e, 0x00, 0x80, 0x5f, 0xd2, 0x6f, 0xee }} |
| 28 |
| 29 /** |
| 30 * The nsIModule interface. |
| 31 * @status FROZEN |
| 32 */ |
| 33 class NS_NO_VTABLE nsIModule : public nsISupports { |
| 34 public: |
| 35 |
| 36 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMODULE_IID) |
| 37 |
| 38 /** |
| 39 * Object Instance Creation |
| 40 * |
| 41 * Obtains a Class Object from a nsIModule for a given CID and IID pair. |
| 42 * This class object can either be query to a nsIFactory or a may be |
| 43 * query to a nsIClassInfo. |
| 44 * |
| 45 * @param aCompMgr : The global component manager |
| 46 * @param aClass : ClassID of object instance requested |
| 47 * @param aIID : IID of interface requested |
| 48 * |
| 49 */ |
| 50 /* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, i
n nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */ |
| 51 NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass,
const nsIID & aIID, void * *aResult) = 0; |
| 52 |
| 53 /** |
| 54 * One time registration callback |
| 55 * |
| 56 * When the nsIModule is discovered, this method will be |
| 57 * called so that any setup registration can be preformed. |
| 58 * |
| 59 * @param aCompMgr : The global component manager |
| 60 * @param aLocation : The location of the nsIModule on disk |
| 61 * @param aLoaderStr: Opaque loader specific string |
| 62 * @param aType : Loader Type being used to load this module |
| 63 */ |
| 64 /* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, i
n string aLoaderStr, in string aType); */ |
| 65 NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, con
st char *aLoaderStr, const char *aType) = 0; |
| 66 |
| 67 /** |
| 68 * One time unregistration callback |
| 69 * |
| 70 * When the nsIModule is being unregistered, this method will be |
| 71 * called so that any unregistration can be preformed |
| 72 * |
| 73 * @param aCompMgr : The global component manager |
| 74 * @param aLocation : The location of the nsIModule on disk |
| 75 * @param aLoaderStr : Opaque loader specific string |
| 76 * |
| 77 */ |
| 78 /* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation,
in string aLoaderStr); */ |
| 79 NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, c
onst char *aLoaderStr) = 0; |
| 80 |
| 81 /** |
| 82 * Module load management |
| 83 * |
| 84 * @param aCompMgr : The global component manager |
| 85 * |
| 86 * @return indicates to the caller if the module can be unloaded. |
| 87 * Returning PR_TRUE isn't a guarantee that the module will be |
| 88 * unloaded. It constitues only willingness of the module to be |
| 89 * unloaded. It is very important to ensure that no outstanding |
| 90 * references to the module's code/data exist before returning |
| 91 * PR_TRUE. |
| 92 * Returning PR_FALSE guaratees that the module wont be unloaded. |
| 93 */ |
| 94 /* boolean canUnload (in nsIComponentManager aCompMgr); */ |
| 95 NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) = 0; |
| 96 |
| 97 }; |
| 98 |
| 99 /* Use this macro when declaring classes that implement this interface. */ |
| 100 #define NS_DECL_NSIMODULE \ |
| 101 NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass,
const nsIID & aIID, void * *aResult); \ |
| 102 NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, con
st char *aLoaderStr, const char *aType); \ |
| 103 NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, c
onst char *aLoaderStr); \ |
| 104 NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval); |
| 105 |
| 106 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 107 #define NS_FORWARD_NSIMODULE(_to) \ |
| 108 NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass,
const nsIID & aIID, void * *aResult) { return _to GetClassObject(aCompMgr, aCla
ss, aIID, aResult); } \ |
| 109 NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, con
st char *aLoaderStr, const char *aType) { return _to RegisterSelf(aCompMgr, aLoc
ation, aLoaderStr, aType); } \ |
| 110 NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, c
onst char *aLoaderStr) { return _to UnregisterSelf(aCompMgr, aLocation, aLoaderS
tr); } \ |
| 111 NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return
_to CanUnload(aCompMgr, _retval); } |
| 112 |
| 113 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 114 #define NS_FORWARD_SAFE_NSIMODULE(_to) \ |
| 115 NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass,
const nsIID & aIID, void * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _t
o->GetClassObject(aCompMgr, aClass, aIID, aResult); } \ |
| 116 NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, con
st char *aLoaderStr, const char *aType) { return !_to ? NS_ERROR_NULL_POINTER :
_to->RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \ |
| 117 NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, c
onst char *aLoaderStr) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSe
lf(aCompMgr, aLocation, aLoaderStr); } \ |
| 118 NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return
!_to ? NS_ERROR_NULL_POINTER : _to->CanUnload(aCompMgr, _retval); } |
| 119 |
| 120 #if 0 |
| 121 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 122 |
| 123 /* Header file */ |
| 124 class nsModule : public nsIModule |
| 125 { |
| 126 public: |
| 127 NS_DECL_ISUPPORTS |
| 128 NS_DECL_NSIMODULE |
| 129 |
| 130 nsModule(); |
| 131 |
| 132 private: |
| 133 ~nsModule(); |
| 134 |
| 135 protected: |
| 136 /* additional members */ |
| 137 }; |
| 138 |
| 139 /* Implementation file */ |
| 140 NS_IMPL_ISUPPORTS1(nsModule, nsIModule) |
| 141 |
| 142 nsModule::nsModule() |
| 143 { |
| 144 /* member initializers and constructor code */ |
| 145 } |
| 146 |
| 147 nsModule::~nsModule() |
| 148 { |
| 149 /* destructor code */ |
| 150 } |
| 151 |
| 152 /* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in
nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */ |
| 153 NS_IMETHODIMP nsModule::GetClassObject(nsIComponentManager *aCompMgr, const nsCI
D & aClass, const nsIID & aIID, void * *aResult) |
| 154 { |
| 155 return NS_ERROR_NOT_IMPLEMENTED; |
| 156 } |
| 157 |
| 158 /* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in
string aLoaderStr, in string aType); */ |
| 159 NS_IMETHODIMP nsModule::RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLo
cation, const char *aLoaderStr, const char *aType) |
| 160 { |
| 161 return NS_ERROR_NOT_IMPLEMENTED; |
| 162 } |
| 163 |
| 164 /* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, i
n string aLoaderStr); */ |
| 165 NS_IMETHODIMP nsModule::UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *a
Location, const char *aLoaderStr) |
| 166 { |
| 167 return NS_ERROR_NOT_IMPLEMENTED; |
| 168 } |
| 169 |
| 170 /* boolean canUnload (in nsIComponentManager aCompMgr); */ |
| 171 NS_IMETHODIMP nsModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval
) |
| 172 { |
| 173 return NS_ERROR_NOT_IMPLEMENTED; |
| 174 } |
| 175 |
| 176 /* End of implementation class template. */ |
| 177 #endif |
| 178 |
| 179 |
| 180 #endif /* __gen_nsIModule_h__ */ |
OLD | NEW |