Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / xpcom / io / nsIDirectoryService.idl
blob99c432478260fc370382231748f94a38ca50c350
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIFile;
9 interface nsISimpleEnumerator;
11 /**
12 * nsIDirectoryServiceProvider
14 * Used by Directory Service to get file locations.
17 [scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)]
18 interface nsIDirectoryServiceProvider: nsISupports
20 /**
21 * getFile
23 * Directory Service calls this when it gets the first request for
24 * a prop or on every request if the prop is not persistent.
26 * @param prop The symbolic name of the file.
27 * @param persistent TRUE - The returned file will be cached by Directory
28 * Service. Subsequent requests for this prop will
29 * bypass the provider and use the cache.
30 * FALSE - The provider will be asked for this prop
31 * each time it is requested.
33 * @return The file represented by the property.
36 nsIFile getFile(in string prop, out boolean persistent);
39 /**
40 * nsIDirectoryServiceProvider2
42 * An extension of nsIDirectoryServiceProvider which allows
43 * multiple files to be returned for the given key.
46 [scriptable, uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2)]
47 interface nsIDirectoryServiceProvider2: nsIDirectoryServiceProvider
49 /**
50 * getFiles
52 * Directory Service calls this when it gets a request for
53 * a prop and the requested type is nsISimpleEnumerator.
55 * @param prop The symbolic name of the file list.
57 * @return An enumerator for a list of file locations.
58 * The elements in the enumeration are nsIFile
59 * @returnCode NS_SUCCESS_AGGREGATE_RESULT if this result should be
60 * aggregated with other "lower" providers.
62 nsISimpleEnumerator getFiles(in string prop);
65 /**
66 * nsIDirectoryService
69 [scriptable, uuid(57a66a60-d43a-11d3-8cc2-00609792278c)]
70 interface nsIDirectoryService: nsISupports
72 /**
73 * init
75 * Must be called. Used internally by XPCOM initialization.
78 void init();
80 /**
81 * registerProvider
83 * Register a provider with the service.
85 * @param prov The service will keep a strong reference
86 * to this object. It will be released when
87 * the service is released.
90 void registerProvider(in nsIDirectoryServiceProvider prov);
92 /**
93 * unregisterProvider
95 * Unregister a provider with the service.
97 * @param prov
100 void unregisterProvider(in nsIDirectoryServiceProvider prov);