PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 7ms RepoModel.GetById 33ms app.codeStats 0ms

/gecko_api/include/nsIDirectoryService.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 338 lines | 145 code | 73 blank | 120 comment | 0 complexity | 336fa3b6e87179ac72aaf09056250182 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/io/nsIDirectoryService.idl
  3 */
  4
  5#ifndef __gen_nsIDirectoryService_h__
  6#define __gen_nsIDirectoryService_h__
  7
  8
  9#ifndef __gen_nsISupports_h__
 10#include "nsISupports.h"
 11#endif
 12
 13#ifndef __gen_nsIFile_h__
 14#include "nsIFile.h"
 15#endif
 16
 17/* For IDL files that don't want to include root IDL files. */
 18#ifndef NS_NO_VTABLE
 19#define NS_NO_VTABLE
 20#endif
 21
 22/* starting interface:    nsIDirectoryServiceProvider */
 23#define NS_IDIRECTORYSERVICEPROVIDER_IID_STR "bbf8cab0-d43a-11d3-8cc2-00609792278c"
 24
 25#define NS_IDIRECTORYSERVICEPROVIDER_IID \
 26  {0xbbf8cab0, 0xd43a, 0x11d3, \
 27    { 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c }}
 28
 29/**
 30 * nsIDirectoryServiceProvider
 31 *
 32 * Used by Directory Service to get file locations.
 33 *
 34 * @status FROZEN
 35 */
 36class NS_NO_VTABLE NS_SCRIPTABLE nsIDirectoryServiceProvider : public nsISupports {
 37 public: 
 38
 39  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICEPROVIDER_IID)
 40
 41  /**
 42  * getFile
 43  *
 44  * Directory Service calls this when it gets the first request for
 45  * a prop or on every request if the prop is not persistent.
 46  *
 47  * @param prop         The symbolic name of the file.
 48  * @param persistent   TRUE - The returned file will be cached by Directory
 49  *                     Service. Subsequent requests for this prop will
 50  *                     bypass the provider and use the cache.
 51  *                     FALSE - The provider will be asked for this prop
 52  *                     each time it is requested.
 53  *
 54  * @return             The file represented by the property.
 55  *
 56  */
 57  /* nsIFile getFile (in string prop, out PRBool persistent); */
 58  NS_SCRIPTABLE NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) = 0;
 59
 60};
 61
 62  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDirectoryServiceProvider, NS_IDIRECTORYSERVICEPROVIDER_IID)
 63
 64/* Use this macro when declaring classes that implement this interface. */
 65#define NS_DECL_NSIDIRECTORYSERVICEPROVIDER \
 66  NS_SCRIPTABLE NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval); 
 67
 68/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 69#define NS_FORWARD_NSIDIRECTORYSERVICEPROVIDER(_to) \
 70  NS_SCRIPTABLE NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) { return _to GetFile(prop, persistent, _retval); } 
 71
 72/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 73#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICEPROVIDER(_to) \
 74  NS_SCRIPTABLE NS_IMETHOD GetFile(const char *prop, PRBool *persistent, nsIFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(prop, persistent, _retval); } 
 75
 76#if 0
 77/* Use the code below as a template for the implementation class for this interface. */
 78
 79/* Header file */
 80class nsDirectoryServiceProvider : public nsIDirectoryServiceProvider
 81{
 82public:
 83  NS_DECL_ISUPPORTS
 84  NS_DECL_NSIDIRECTORYSERVICEPROVIDER
 85
 86  nsDirectoryServiceProvider();
 87
 88private:
 89  ~nsDirectoryServiceProvider();
 90
 91protected:
 92  /* additional members */
 93};
 94
 95/* Implementation file */
 96NS_IMPL_ISUPPORTS1(nsDirectoryServiceProvider, nsIDirectoryServiceProvider)
 97
 98nsDirectoryServiceProvider::nsDirectoryServiceProvider()
 99{
100  /* member initializers and constructor code */
101}
102
103nsDirectoryServiceProvider::~nsDirectoryServiceProvider()
104{
105  /* destructor code */
106}
107
108/* nsIFile getFile (in string prop, out PRBool persistent); */
109NS_IMETHODIMP nsDirectoryServiceProvider::GetFile(const char *prop, PRBool *persistent, nsIFile **_retval)
110{
111    return NS_ERROR_NOT_IMPLEMENTED;
112}
113
114/* End of implementation class template. */
115#endif
116
117
118/* starting interface:    nsIDirectoryServiceProvider2 */
119#define NS_IDIRECTORYSERVICEPROVIDER2_IID_STR "2f977d4b-5485-11d4-87e2-0010a4e75ef2"
120
121#define NS_IDIRECTORYSERVICEPROVIDER2_IID \
122  {0x2f977d4b, 0x5485, 0x11d4, \
123    { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }}
124
125/**
126 * nsIDirectoryServiceProvider2
127 *
128 * An extension of nsIDirectoryServiceProvider which allows
129 * multiple files to be returned for the given key.
130 *
131 * @status FROZEN
132 */
133class NS_NO_VTABLE NS_SCRIPTABLE nsIDirectoryServiceProvider2 : public nsIDirectoryServiceProvider {
134 public: 
135
136  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICEPROVIDER2_IID)
137
138  /**
139  * getFiles
140  *
141  * Directory Service calls this when it gets a request for
142  * a prop and the requested type is nsISimpleEnumerator.
143  *
144  * @param prop         The symbolic name of the file list.
145  *
146  * @return             An enumerator for a list of file locations.
147  *                     The elements in the enumeration are nsIFile
148  * @returnCode         NS_SUCCESS_AGGREGATE_RESULT if this result should be
149  *                     aggregated with other "lower" providers.
150  */
151  /* nsISimpleEnumerator getFiles (in string prop); */
152  NS_SCRIPTABLE NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) = 0;
153
154};
155
156  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDirectoryServiceProvider2, NS_IDIRECTORYSERVICEPROVIDER2_IID)
157
158/* Use this macro when declaring classes that implement this interface. */
159#define NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 \
160  NS_SCRIPTABLE NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval); 
161
162/* Use this macro to declare functions that forward the behavior of this interface to another object. */
163#define NS_FORWARD_NSIDIRECTORYSERVICEPROVIDER2(_to) \
164  NS_SCRIPTABLE NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) { return _to GetFiles(prop, _retval); } 
165
166/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
167#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICEPROVIDER2(_to) \
168  NS_SCRIPTABLE NS_IMETHOD GetFiles(const char *prop, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFiles(prop, _retval); } 
169
170#if 0
171/* Use the code below as a template for the implementation class for this interface. */
172
173/* Header file */
174class nsDirectoryServiceProvider2 : public nsIDirectoryServiceProvider2
175{
176public:
177  NS_DECL_ISUPPORTS
178  NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
179
180  nsDirectoryServiceProvider2();
181
182private:
183  ~nsDirectoryServiceProvider2();
184
185protected:
186  /* additional members */
187};
188
189/* Implementation file */
190NS_IMPL_ISUPPORTS1(nsDirectoryServiceProvider2, nsIDirectoryServiceProvider2)
191
192nsDirectoryServiceProvider2::nsDirectoryServiceProvider2()
193{
194  /* member initializers and constructor code */
195}
196
197nsDirectoryServiceProvider2::~nsDirectoryServiceProvider2()
198{
199  /* destructor code */
200}
201
202/* nsISimpleEnumerator getFiles (in string prop); */
203NS_IMETHODIMP nsDirectoryServiceProvider2::GetFiles(const char *prop, nsISimpleEnumerator **_retval)
204{
205    return NS_ERROR_NOT_IMPLEMENTED;
206}
207
208/* End of implementation class template. */
209#endif
210
211
212/* starting interface:    nsIDirectoryService */
213#define NS_IDIRECTORYSERVICE_IID_STR "57a66a60-d43a-11d3-8cc2-00609792278c"
214
215#define NS_IDIRECTORYSERVICE_IID \
216  {0x57a66a60, 0xd43a, 0x11d3, \
217    { 0x8c, 0xc2, 0x00, 0x60, 0x97, 0x92, 0x27, 0x8c }}
218
219/**
220 * nsIDirectoryService
221 *
222 * @status FROZEN
223 */
224class NS_NO_VTABLE NS_SCRIPTABLE nsIDirectoryService : public nsISupports {
225 public: 
226
227  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDIRECTORYSERVICE_IID)
228
229  /**
230  * init
231  *
232  * Must be called. Used internally by XPCOM initialization.
233  *
234  */
235  /* void init (); */
236  NS_SCRIPTABLE NS_IMETHOD Init(void) = 0;
237
238  /**
239  * registerProvider
240  *
241  * Register a provider with the service.
242  *
243  * @param prov            The service will keep a strong reference
244  *                        to this object. It will be released when
245  *                        the service is released.
246  *
247  */
248  /* void registerProvider (in nsIDirectoryServiceProvider prov); */
249  NS_SCRIPTABLE NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) = 0;
250
251  /**
252  * unregisterProvider
253  *
254  * Unregister a provider with the service.
255  *
256  * @param prov            
257  *
258  */
259  /* void unregisterProvider (in nsIDirectoryServiceProvider prov); */
260  NS_SCRIPTABLE NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) = 0;
261
262};
263
264  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDirectoryService, NS_IDIRECTORYSERVICE_IID)
265
266/* Use this macro when declaring classes that implement this interface. */
267#define NS_DECL_NSIDIRECTORYSERVICE \
268  NS_SCRIPTABLE NS_IMETHOD Init(void); \
269  NS_SCRIPTABLE NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov); \
270  NS_SCRIPTABLE NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov); 
271
272/* Use this macro to declare functions that forward the behavior of this interface to another object. */
273#define NS_FORWARD_NSIDIRECTORYSERVICE(_to) \
274  NS_SCRIPTABLE NS_IMETHOD Init(void) { return _to Init(); } \
275  NS_SCRIPTABLE NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) { return _to RegisterProvider(prov); } \
276  NS_SCRIPTABLE NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) { return _to UnregisterProvider(prov); } 
277
278/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
279#define NS_FORWARD_SAFE_NSIDIRECTORYSERVICE(_to) \
280  NS_SCRIPTABLE NS_IMETHOD Init(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \
281  NS_SCRIPTABLE NS_IMETHOD RegisterProvider(nsIDirectoryServiceProvider *prov) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterProvider(prov); } \
282  NS_SCRIPTABLE NS_IMETHOD UnregisterProvider(nsIDirectoryServiceProvider *prov) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterProvider(prov); } 
283
284#if 0
285/* Use the code below as a template for the implementation class for this interface. */
286
287/* Header file */
288class nsDirectoryService : public nsIDirectoryService
289{
290public:
291  NS_DECL_ISUPPORTS
292  NS_DECL_NSIDIRECTORYSERVICE
293
294  nsDirectoryService();
295
296private:
297  ~nsDirectoryService();
298
299protected:
300  /* additional members */
301};
302
303/* Implementation file */
304NS_IMPL_ISUPPORTS1(nsDirectoryService, nsIDirectoryService)
305
306nsDirectoryService::nsDirectoryService()
307{
308  /* member initializers and constructor code */
309}
310
311nsDirectoryService::~nsDirectoryService()
312{
313  /* destructor code */
314}
315
316/* void init (); */
317NS_IMETHODIMP nsDirectoryService::Init()
318{
319    return NS_ERROR_NOT_IMPLEMENTED;
320}
321
322/* void registerProvider (in nsIDirectoryServiceProvider prov); */
323NS_IMETHODIMP nsDirectoryService::RegisterProvider(nsIDirectoryServiceProvider *prov)
324{
325    return NS_ERROR_NOT_IMPLEMENTED;
326}
327
328/* void unregisterProvider (in nsIDirectoryServiceProvider prov); */
329NS_IMETHODIMP nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider *prov)
330{
331    return NS_ERROR_NOT_IMPLEMENTED;
332}
333
334/* End of implementation class template. */
335#endif
336
337
338#endif /* __gen_nsIDirectoryService_h__ */