|
1 /* -*- Mode: C++; tab-width: 4; 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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 /** A class holding information about a directory index. |
|
9 * These have no reference back to their original source - |
|
10 * changing these attributes won't affect the directory |
|
11 */ |
|
12 [scriptable, uuid(23bbabd0-1dd2-11b2-86b7-aad68ae7d7e0)] |
|
13 interface nsIDirIndex : nsISupports |
|
14 { |
|
15 /** |
|
16 * Entry's type is unknown |
|
17 */ |
|
18 const unsigned long TYPE_UNKNOWN = 0; |
|
19 |
|
20 /** |
|
21 * Entry is a directory |
|
22 */ |
|
23 const unsigned long TYPE_DIRECTORY = 1; |
|
24 |
|
25 /** |
|
26 * Entry is a file |
|
27 */ |
|
28 const unsigned long TYPE_FILE = 2; |
|
29 |
|
30 /** |
|
31 * Entry is a symlink |
|
32 */ |
|
33 const unsigned long TYPE_SYMLINK = 3; |
|
34 |
|
35 /** |
|
36 * The type of the entry - one of the constants above |
|
37 */ |
|
38 attribute unsigned long type; |
|
39 |
|
40 /** |
|
41 * The content type - may be null if it is unknown. |
|
42 * Unspecified for directories |
|
43 */ |
|
44 attribute string contentType; |
|
45 |
|
46 /** |
|
47 * The fully qualified filename, expressed as a uri |
|
48 * |
|
49 * This is encoded with the encoding specified in |
|
50 * the nsIDirIndexParser, and is also escaped. |
|
51 */ |
|
52 attribute string location; |
|
53 |
|
54 /** |
|
55 * A description for the filename, which should be |
|
56 * displayed by a viewer |
|
57 */ |
|
58 attribute wstring description; |
|
59 |
|
60 /** |
|
61 * File size, with -1 meaning "unknown" |
|
62 */ |
|
63 attribute long long size; |
|
64 |
|
65 /** |
|
66 * Last-modified time in seconds-since-epoch. |
|
67 * -1 means unknown - this is valid, because there were no |
|
68 * ftp servers in 1969 |
|
69 */ |
|
70 attribute PRTime lastModified; |
|
71 }; |
|
72 |
|
73 %{C++ |
|
74 |
|
75 #define NS_DIRINDEX_CID \ |
|
76 /* { f6913e2e-1dd1-11b2-84be-f455dee342af } */ \ |
|
77 { 0xf6913e2e, \ |
|
78 0x1dd1, \ |
|
79 0x11b2, \ |
|
80 { 0x84, 0xbe, 0xf4, 0x55, 0xde, 0xe3, 0x42, 0xaf } \ |
|
81 } |
|
82 %} |