PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 5ms RepoModel.GetById 35ms 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
  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
 17class nsIFile; /* forward declaration */
 18
 19class 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 */
 33class NS_NO_VTABLE NS_SCRIPTABLE nsIModule : public nsISupports {
 34 public: 
 35
 36  NS_DECLARE_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, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
 51  NS_SCRIPTABLE 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, in string aLoaderStr, in string aType); */
 65  NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const 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_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const 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 won't be unloaded.
 93    */
 94  /* boolean canUnload (in nsIComponentManager aCompMgr); */
 95  NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) = 0;
 96
 97};
 98
 99  NS_DEFINE_STATIC_IID_ACCESSOR(nsIModule, NS_IMODULE_IID)
100
101/* Use this macro when declaring classes that implement this interface. */
102#define NS_DECL_NSIMODULE \
103  NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult); \
104  NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType); \
105  NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr); \
106  NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval); 
107
108/* Use this macro to declare functions that forward the behavior of this interface to another object. */
109#define NS_FORWARD_NSIMODULE(_to) \
110  NS_SCRIPTABLE NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult) { return _to GetClassObject(aCompMgr, aClass, aIID, aResult); } \
111  NS_SCRIPTABLE NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType) { return _to RegisterSelf(aCompMgr, aLocation, aLoaderStr, aType); } \
112  NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return _to UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \
113  NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return _to CanUnload(aCompMgr, _retval); } 
114
115/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
116#define NS_FORWARD_SAFE_NSIMODULE(_to) \
117  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); } \
118  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); } \
119  NS_SCRIPTABLE NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSelf(aCompMgr, aLocation, aLoaderStr); } \
120  NS_SCRIPTABLE NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUnload(aCompMgr, _retval); } 
121
122#if 0
123/* Use the code below as a template for the implementation class for this interface. */
124
125/* Header file */
126class nsModule : public nsIModule
127{
128public:
129  NS_DECL_ISUPPORTS
130  NS_DECL_NSIMODULE
131
132  nsModule();
133
134private:
135  ~nsModule();
136
137protected:
138  /* additional members */
139};
140
141/* Implementation file */
142NS_IMPL_ISUPPORTS1(nsModule, nsIModule)
143
144nsModule::nsModule()
145{
146  /* member initializers and constructor code */
147}
148
149nsModule::~nsModule()
150{
151  /* destructor code */
152}
153
154/* void getClassObject (in nsIComponentManager aCompMgr, in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult aResult); */
155NS_IMETHODIMP nsModule::GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult)
156{
157    return NS_ERROR_NOT_IMPLEMENTED;
158}
159
160/* void registerSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr, in string aType); */
161NS_IMETHODIMP nsModule::RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType)
162{
163    return NS_ERROR_NOT_IMPLEMENTED;
164}
165
166/* void unregisterSelf (in nsIComponentManager aCompMgr, in nsIFile aLocation, in string aLoaderStr); */
167NS_IMETHODIMP nsModule::UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr)
168{
169    return NS_ERROR_NOT_IMPLEMENTED;
170}
171
172/* boolean canUnload (in nsIComponentManager aCompMgr); */
173NS_IMETHODIMP nsModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval)
174{
175    return NS_ERROR_NOT_IMPLEMENTED;
176}
177
178/* End of implementation class template. */
179#endif
180
181
182#endif /* __gen_nsIModule_h__ */