PageRenderTime 83ms CodeModel.GetById 41ms app.highlight 6ms RepoModel.GetById 34ms app.codeStats 0ms

/gecko_api/include/nsIClassInfo.h

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