VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/io/nsIDirectoryService.idl@ 26286

Last change on this file since 26286 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
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
4 *
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/
9 *
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.
14 *
15 * The Original Code is mozilla.org code.
16 *
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.
21 *
22 * Contributor(s):
23 *
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.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38#include "nsISupports.idl"
39#include "nsIFile.idl"
40
41/**
42 * nsIDirectoryServiceProvider
43 *
44 * Used by Directory Service to get file locations.
45 *
46 * @status FROZEN
47 */
48
49[scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)]
50interface nsIDirectoryServiceProvider: nsISupports
51{
52 /**
53 * getFile
54 *
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.
57 *
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.
64 *
65 * @return The file represented by the property.
66 *
67 */
68 nsIFile getFile(in string prop, out PRBool persistent);
69};
70
71/**
72 * nsIDirectoryServiceProvider2
73 *
74 * An extension of nsIDirectoryServiceProvider which allows
75 * multiple files to be returned for the given key.
76 *
77 * @status FROZEN
78 */
79
80[scriptable, uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2)]
81interface nsIDirectoryServiceProvider2: nsIDirectoryServiceProvider
82{
83 /**
84 * getFiles
85 *
86 * Directory Service calls this when it gets a request for
87 * a prop and the requested type is nsISimpleEnumerator.
88 *
89 * @param prop The symbolic name of the file list.
90 *
91 * @return An enumerator for a list of file locations.
92 * The elements in the enumeration are nsIFile
93 *
94 */
95 nsISimpleEnumerator getFiles(in string prop);
96};
97
98/**
99 * nsIDirectoryService
100 *
101 * @status FROZEN
102 */
103
104[scriptable, uuid(57a66a60-d43a-11d3-8cc2-00609792278c)]
105interface nsIDirectoryService: nsISupports
106{
107 /**
108 * init
109 *
110 * Must be called. Used internally by XPCOM initialization.
111 *
112 */
113 void init();
114
115 /**
116 * registerProvider
117 *
118 * Register a provider with the service.
119 *
120 * @param prov The service will keep a strong reference
121 * to this object. It will be released when
122 * the service is released.
123 *
124 */
125 void registerProvider(in nsIDirectoryServiceProvider prov);
126
127 /**
128 * unregisterProvider
129 *
130 * Unregister a provider with the service.
131 *
132 * @param prov
133 *
134 */
135 void unregisterProvider(in nsIDirectoryServiceProvider prov);
136};
137
138
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette