Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: gecko-sdk/include/nsILocalFile.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsILoadGroup.h ('k') | gecko-sdk/include/nsIMemory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/xpcom/io/nsILocalFile.idl
3 */
4
5 #ifndef __gen_nsILocalFile_h__
6 #define __gen_nsILocalFile_h__
7
8
9 #ifndef __gen_nsIFile_h__
10 #include "nsIFile.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 #include "prio.h"
18 #include "prlink.h"
19 #include <stdio.h>
20
21 /* starting interface: nsILocalFile */
22 #define NS_ILOCALFILE_IID_STR "aa610f20-a889-11d3-8c81-000064657374"
23
24 #define NS_ILOCALFILE_IID \
25 {0xaa610f20, 0xa889, 0x11d3, \
26 { 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
27
28 /**
29 * This interface adds methods to nsIFile that are particular to a file
30 * that is accessible via the local file system.
31 *
32 * It follows the same string conventions as nsIFile.
33 *
34 * @status FROZEN
35 */
36 class NS_NO_VTABLE nsILocalFile : public nsIFile {
37 public:
38
39 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILOCALFILE_IID)
40
41 /**
42 * initWith[Native]Path
43 *
44 * This function will initialize the nsILocalFile object. Any
45 * internal state information will be reset.
46 *
47 * NOTE: This function has a known bug on the macintosh and
48 * other OSes which do not represent file locations as paths.
49 * If you do use this function, be very aware of this problem!
50 *
51 * @param filePath
52 * A string which specifies a full file path to a
53 * location. Relative paths will be treated as an
54 * error (NS_ERROR_FILE_UNRECOGNIZED_PATH). For
55 * initWithNativePath, the filePath must be in the native
56 * filesystem charset.
57 */
58 /* void initWithPath (in AString filePath); */
59 NS_IMETHOD InitWithPath(const nsAString & filePath) = 0;
60
61 /* [noscript] void initWithNativePath (in ACString filePath); */
62 NS_IMETHOD InitWithNativePath(const nsACString & filePath) = 0;
63
64 /**
65 * initWithFile
66 *
67 * Initialize this object with another file
68 *
69 * @param aFile
70 * the file this becomes equivalent to
71 */
72 /* void initWithFile (in nsILocalFile aFile); */
73 NS_IMETHOD InitWithFile(nsILocalFile *aFile) = 0;
74
75 /**
76 * followLinks
77 *
78 * This attribute will determine if the nsLocalFile will auto
79 * resolve symbolic links. By default, this value will be false
80 * on all non unix systems. On unix, this attribute is effectively
81 * a noop.
82 */
83 /* attribute PRBool followLinks; */
84 NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) = 0;
85 NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) = 0;
86
87 /* [noscript] PRFileDescStar openNSPRFileDesc (in long flags, in long mode); * /
88 NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval ) = 0;
89
90 /* [noscript] FILE openANSIFileDesc (in string mode); */
91 NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) = 0;
92
93 /* [noscript] PRLibraryStar load (); */
94 NS_IMETHOD Load(PRLibrary * *_retval) = 0;
95
96 /* readonly attribute PRInt64 diskSpaceAvailable; */
97 NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) = 0;
98
99 /**
100 * appendRelative[Native]Path
101 *
102 * Append a relative path to the current path of the nsILocalFile object.
103 *
104 * @param relativeFilePath
105 * relativeFilePath is a native relative path. For security reasons,
106 * this cannot contain .. or cannot start with a directory separator.
107 * For the |appendRelativeNativePath| method, the relativeFilePath
108 * must be in the native filesystem charset.
109 */
110 /* void appendRelativePath (in AString relativeFilePath); */
111 NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) = 0;
112
113 /* [noscript] void appendRelativeNativePath (in ACString relativeFilePath); */
114 NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) = 0;
115
116 /**
117 * Accessor to a null terminated string which will specify
118 * the file in a persistent manner for disk storage.
119 *
120 * The character set of this attribute is undefined. DO NOT TRY TO
121 * INTERPRET IT AS HUMAN READABLE TEXT!
122 */
123 /* attribute ACString persistentDescriptor; */
124 NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) = 0;
125 NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) = 0;
126
127 /**
128 * reveal
129 *
130 * Ask the operating system to open the folder which contains
131 * this file or folder. This routine only works on platforms which
132 * support the ability to open a folder...
133 */
134 /* void reveal (); */
135 NS_IMETHOD Reveal(void) = 0;
136
137 /**
138 * launch
139 *
140 * Ask the operating system to attempt to open the file.
141 * this really just simulates "double clicking" the file on your platform.
142 * This routine only works on platforms which support this functionality.
143 */
144 /* void launch (); */
145 NS_IMETHOD Launch(void) = 0;
146
147 /**
148 * getRelativeDescriptor
149 *
150 * Returns a relative file path in an opaque, XP format. It is therefore
151 * not a native path.
152 *
153 * The character set of the string returned from this function is
154 * undefined. DO NOT TRY TO INTERPRET IT AS HUMAN READABLE TEXT!
155 *
156 * @param fromFile
157 * the file from which the descriptor is relative.
158 * There is no defined result if this param is null.
159 */
160 /* ACString getRelativeDescriptor (in nsILocalFile fromFile); */
161 NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) = 0;
162
163 /**
164 * setRelativeDescriptor
165 *
166 * Initializes the file to the location relative to fromFile using
167 * a string returned by getRelativeDescriptor.
168 *
169 * @param fromFile
170 * the file to which the descriptor is relative
171 * @param relative
172 * the relative descriptor obtained from getRelativeDescriptor
173 */
174 /* void setRelativeDescriptor (in nsILocalFile fromFile, in ACString relativeD esc); */
175 NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & re lativeDesc) = 0;
176
177 };
178
179 /* Use this macro when declaring classes that implement this interface. */
180 #define NS_DECL_NSILOCALFILE \
181 NS_IMETHOD InitWithPath(const nsAString & filePath); \
182 NS_IMETHOD InitWithNativePath(const nsACString & filePath); \
183 NS_IMETHOD InitWithFile(nsILocalFile *aFile); \
184 NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks); \
185 NS_IMETHOD SetFollowLinks(PRBool aFollowLinks); \
186 NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval ); \
187 NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval); \
188 NS_IMETHOD Load(PRLibrary * *_retval); \
189 NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable); \
190 NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath); \
191 NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath); \
192 NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor); \
193 NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor); \
194 NS_IMETHOD Reveal(void); \
195 NS_IMETHOD Launch(void); \
196 NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) ; \
197 NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & re lativeDesc);
198
199 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
200 #define NS_FORWARD_NSILOCALFILE(_to) \
201 NS_IMETHOD InitWithPath(const nsAString & filePath) { return _to InitWithPath( filePath); } \
202 NS_IMETHOD InitWithNativePath(const nsACString & filePath) { return _to InitWi thNativePath(filePath); } \
203 NS_IMETHOD InitWithFile(nsILocalFile *aFile) { return _to InitWithFile(aFile); } \
204 NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) { return _to GetFollowLinks(aF ollowLinks); } \
205 NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) { return _to SetFollowLinks(aFo llowLinks); } \
206 NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval ) { return _to OpenNSPRFileDesc(flags, mode, _retval); } \
207 NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) { return _to Op enANSIFileDesc(mode, _retval); } \
208 NS_IMETHOD Load(PRLibrary * *_retval) { return _to Load(_retval); } \
209 NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) { return _to Ge tDiskSpaceAvailable(aDiskSpaceAvailable); } \
210 NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) { return _to AppendRelativePath(relativeFilePath); } \
211 NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) { ret urn _to AppendRelativeNativePath(relativeFilePath); } \
212 NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) { retur n _to GetPersistentDescriptor(aPersistentDescriptor); } \
213 NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) { return _to SetPersistentDescriptor(aPersistentDescriptor); } \
214 NS_IMETHOD Reveal(void) { return _to Reveal(); } \
215 NS_IMETHOD Launch(void) { return _to Launch(); } \
216 NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) { return _to GetRelativeDescriptor(fromFile, _retval); } \
217 NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & re lativeDesc) { return _to SetRelativeDescriptor(fromFile, relativeDesc); }
218
219 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
220 #define NS_FORWARD_SAFE_NSILOCALFILE(_to) \
221 NS_IMETHOD InitWithPath(const nsAString & filePath) { return !_to ? NS_ERROR_N ULL_POINTER : _to->InitWithPath(filePath); } \
222 NS_IMETHOD InitWithNativePath(const nsACString & filePath) { return !_to ? NS_ ERROR_NULL_POINTER : _to->InitWithNativePath(filePath); } \
223 NS_IMETHOD InitWithFile(nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POI NTER : _to->InitWithFile(aFile); } \
224 NS_IMETHOD GetFollowLinks(PRBool *aFollowLinks) { return !_to ? NS_ERROR_NULL_ POINTER : _to->GetFollowLinks(aFollowLinks); } \
225 NS_IMETHOD SetFollowLinks(PRBool aFollowLinks) { return !_to ? NS_ERROR_NULL_P OINTER : _to->SetFollowLinks(aFollowLinks); } \
226 NS_IMETHOD OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval ) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenNSPRFileDesc(flags, mode, _re tval); } \
227 NS_IMETHOD OpenANSIFileDesc(const char *mode, FILE * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenANSIFileDesc(mode, _retval); } \
228 NS_IMETHOD Load(PRLibrary * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Load(_retval); } \
229 NS_IMETHOD GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDiskSpaceAvailable(aDiskSpaceAvailable); } \
230 NS_IMETHOD AppendRelativePath(const nsAString & relativeFilePath) { return !_t o ? NS_ERROR_NULL_POINTER : _to->AppendRelativePath(relativeFilePath); } \
231 NS_IMETHOD AppendRelativeNativePath(const nsACString & relativeFilePath) { ret urn !_to ? NS_ERROR_NULL_POINTER : _to->AppendRelativeNativePath(relativeFilePat h); } \
232 NS_IMETHOD GetPersistentDescriptor(nsACString & aPersistentDescriptor) { retur n !_to ? NS_ERROR_NULL_POINTER : _to->GetPersistentDescriptor(aPersistentDescrip tor); } \
233 NS_IMETHOD SetPersistentDescriptor(const nsACString & aPersistentDescriptor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPersistentDescriptor(aPersistentD escriptor); } \
234 NS_IMETHOD Reveal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reveal(); } \
235 NS_IMETHOD Launch(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Launch(); } \
236 NS_IMETHOD GetRelativeDescriptor(nsILocalFile *fromFile, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRelativeDescriptor(fromFile, _r etval); } \
237 NS_IMETHOD SetRelativeDescriptor(nsILocalFile *fromFile, const nsACString & re lativeDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRelativeDescriptor(f romFile, relativeDesc); }
238
239 #if 0
240 /* Use the code below as a template for the implementation class for this interf ace. */
241
242 /* Header file */
243 class nsLocalFile : public nsILocalFile
244 {
245 public:
246 NS_DECL_ISUPPORTS
247 NS_DECL_NSILOCALFILE
248
249 nsLocalFile();
250
251 private:
252 ~nsLocalFile();
253
254 protected:
255 /* additional members */
256 };
257
258 /* Implementation file */
259 NS_IMPL_ISUPPORTS1(nsLocalFile, nsILocalFile)
260
261 nsLocalFile::nsLocalFile()
262 {
263 /* member initializers and constructor code */
264 }
265
266 nsLocalFile::~nsLocalFile()
267 {
268 /* destructor code */
269 }
270
271 /* void initWithPath (in AString filePath); */
272 NS_IMETHODIMP nsLocalFile::InitWithPath(const nsAString & filePath)
273 {
274 return NS_ERROR_NOT_IMPLEMENTED;
275 }
276
277 /* [noscript] void initWithNativePath (in ACString filePath); */
278 NS_IMETHODIMP nsLocalFile::InitWithNativePath(const nsACString & filePath)
279 {
280 return NS_ERROR_NOT_IMPLEMENTED;
281 }
282
283 /* void initWithFile (in nsILocalFile aFile); */
284 NS_IMETHODIMP nsLocalFile::InitWithFile(nsILocalFile *aFile)
285 {
286 return NS_ERROR_NOT_IMPLEMENTED;
287 }
288
289 /* attribute PRBool followLinks; */
290 NS_IMETHODIMP nsLocalFile::GetFollowLinks(PRBool *aFollowLinks)
291 {
292 return NS_ERROR_NOT_IMPLEMENTED;
293 }
294 NS_IMETHODIMP nsLocalFile::SetFollowLinks(PRBool aFollowLinks)
295 {
296 return NS_ERROR_NOT_IMPLEMENTED;
297 }
298
299 /* [noscript] PRFileDescStar openNSPRFileDesc (in long flags, in long mode); */
300 NS_IMETHODIMP nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileD esc * *_retval)
301 {
302 return NS_ERROR_NOT_IMPLEMENTED;
303 }
304
305 /* [noscript] FILE openANSIFileDesc (in string mode); */
306 NS_IMETHODIMP nsLocalFile::OpenANSIFileDesc(const char *mode, FILE * *_retval)
307 {
308 return NS_ERROR_NOT_IMPLEMENTED;
309 }
310
311 /* [noscript] PRLibraryStar load (); */
312 NS_IMETHODIMP nsLocalFile::Load(PRLibrary * *_retval)
313 {
314 return NS_ERROR_NOT_IMPLEMENTED;
315 }
316
317 /* readonly attribute PRInt64 diskSpaceAvailable; */
318 NS_IMETHODIMP nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
319 {
320 return NS_ERROR_NOT_IMPLEMENTED;
321 }
322
323 /* void appendRelativePath (in AString relativeFilePath); */
324 NS_IMETHODIMP nsLocalFile::AppendRelativePath(const nsAString & relativeFilePath )
325 {
326 return NS_ERROR_NOT_IMPLEMENTED;
327 }
328
329 /* [noscript] void appendRelativeNativePath (in ACString relativeFilePath); */
330 NS_IMETHODIMP nsLocalFile::AppendRelativeNativePath(const nsACString & relativeF ilePath)
331 {
332 return NS_ERROR_NOT_IMPLEMENTED;
333 }
334
335 /* attribute ACString persistentDescriptor; */
336 NS_IMETHODIMP nsLocalFile::GetPersistentDescriptor(nsACString & aPersistentDescr iptor)
337 {
338 return NS_ERROR_NOT_IMPLEMENTED;
339 }
340 NS_IMETHODIMP nsLocalFile::SetPersistentDescriptor(const nsACString & aPersisten tDescriptor)
341 {
342 return NS_ERROR_NOT_IMPLEMENTED;
343 }
344
345 /* void reveal (); */
346 NS_IMETHODIMP nsLocalFile::Reveal()
347 {
348 return NS_ERROR_NOT_IMPLEMENTED;
349 }
350
351 /* void launch (); */
352 NS_IMETHODIMP nsLocalFile::Launch()
353 {
354 return NS_ERROR_NOT_IMPLEMENTED;
355 }
356
357 /* ACString getRelativeDescriptor (in nsILocalFile fromFile); */
358 NS_IMETHODIMP nsLocalFile::GetRelativeDescriptor(nsILocalFile *fromFile, nsACStr ing & _retval)
359 {
360 return NS_ERROR_NOT_IMPLEMENTED;
361 }
362
363 /* void setRelativeDescriptor (in nsILocalFile fromFile, in ACString relativeDes c); */
364 NS_IMETHODIMP nsLocalFile::SetRelativeDescriptor(nsILocalFile *fromFile, const n sACString & relativeDesc)
365 {
366 return NS_ERROR_NOT_IMPLEMENTED;
367 }
368
369 /* End of implementation class template. */
370 #endif
371
372
373 #endif /* __gen_nsILocalFile_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsILoadGroup.h ('k') | gecko-sdk/include/nsIMemory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698