Bug 438394 ? land workaround patch for unkillable hangs when loading VerifiedDownload...
[wine-gecko.git] / xpcom / io / nsIDirectoryService.idl
blobc18a7d084960ff517a021cfc1763b6f5971f7897
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
39 #include "nsIFile.idl"
41 /**
42 * nsIDirectoryServiceProvider
44 * Used by Directory Service to get file locations.
46 * @status FROZEN
49 [scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)]
50 interface nsIDirectoryServiceProvider: nsISupports
52 /**
53 * getFile
55 * Directory Service calls this when it gets the first request for
56 * a prop or on every request if the prop is not persistent.
58 * @param prop The symbolic name of the file.
59 * @param persistent TRUE - The returned file will be cached by Directory
60 * Service. Subsequent requests for this prop will
61 * bypass the provider and use the cache.
62 * FALSE - The provider will be asked for this prop
63 * each time it is requested.
65 * @return The file represented by the property.
67 */
68 nsIFile getFile(in string prop, out PRBool persistent);
71 /**
72 * nsIDirectoryServiceProvider2
74 * An extension of nsIDirectoryServiceProvider which allows
75 * multiple files to be returned for the given key.
77 * @status FROZEN
80 [scriptable, uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2)]
81 interface nsIDirectoryServiceProvider2: nsIDirectoryServiceProvider
83 /**
84 * getFiles
86 * Directory Service calls this when it gets a request for
87 * a prop and the requested type is nsISimpleEnumerator.
89 * @param prop The symbolic name of the file list.
91 * @return An enumerator for a list of file locations.
92 * The elements in the enumeration are nsIFile
93 * @returnCode NS_SUCCESS_AGGREGATE_RESULT if this result should be
94 * aggregated with other "lower" providers.
96 nsISimpleEnumerator getFiles(in string prop);
99 /**
100 * nsIDirectoryService
102 * @status FROZEN
105 [scriptable, uuid(57a66a60-d43a-11d3-8cc2-00609792278c)]
106 interface nsIDirectoryService: nsISupports
109 * init
111 * Must be called. Used internally by XPCOM initialization.
114 void init();
117 * registerProvider
119 * Register a provider with the service.
121 * @param prov The service will keep a strong reference
122 * to this object. It will be released when
123 * the service is released.
126 void registerProvider(in nsIDirectoryServiceProvider prov);
129 * unregisterProvider
131 * Unregister a provider with the service.
133 * @param prov
136 void unregisterProvider(in nsIDirectoryServiceProvider prov);