Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: IDL; 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/. */
6 /* nsISupports wrappers for single primitive pieces of data. */
8 #include "nsISupports.idl"
10 /**
11 * Primitive base interface.
12 *
13 * These first three are pointer types and do data copying
14 * using the nsIMemory. Be careful!
15 */
17 [scriptable, uuid(d0d4b136-1dd1-11b2-9371-f0727ef827c0)]
18 interface nsISupportsPrimitive : nsISupports
19 {
20 const unsigned short TYPE_ID = 1;
21 const unsigned short TYPE_CSTRING = 2;
22 const unsigned short TYPE_STRING = 3;
23 const unsigned short TYPE_PRBOOL = 4;
24 const unsigned short TYPE_PRUINT8 = 5;
25 const unsigned short TYPE_PRUINT16 = 6;
26 const unsigned short TYPE_PRUINT32 = 7;
27 const unsigned short TYPE_PRUINT64 = 8;
28 const unsigned short TYPE_PRTIME = 9;
29 const unsigned short TYPE_CHAR = 10;
30 const unsigned short TYPE_PRINT16 = 11;
31 const unsigned short TYPE_PRINT32 = 12;
32 const unsigned short TYPE_PRINT64 = 13;
33 const unsigned short TYPE_FLOAT = 14;
34 const unsigned short TYPE_DOUBLE = 15;
35 const unsigned short TYPE_VOID = 16;
36 const unsigned short TYPE_INTERFACE_POINTER = 17;
38 readonly attribute unsigned short type;
39 };
41 /**
42 * Scriptable storage for nsID structures
43 */
45 [scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)]
46 interface nsISupportsID : nsISupportsPrimitive
47 {
48 attribute nsIDPtr data;
49 string toString();
50 };
52 /**
53 * Scriptable storage for ASCII strings
54 */
56 [scriptable, uuid(d65ff270-4a1c-11d3-9890-006008962422)]
57 interface nsISupportsCString : nsISupportsPrimitive
58 {
59 attribute ACString data;
60 string toString();
61 };
63 /**
64 * Scriptable storage for Unicode strings
65 */
67 [scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)]
68 interface nsISupportsString : nsISupportsPrimitive
69 {
70 attribute AString data;
71 wstring toString();
72 };
74 /**
75 * The rest are truly primitive and are passed by value
76 */
78 /**
79 * Scriptable storage for booleans
80 */
82 [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)]
83 interface nsISupportsPRBool : nsISupportsPrimitive
84 {
85 attribute boolean data;
86 string toString();
87 };
89 /**
90 * Scriptable storage for 8-bit integers
91 */
93 [scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)]
94 interface nsISupportsPRUint8 : nsISupportsPrimitive
95 {
96 attribute uint8_t data;
97 string toString();
98 };
100 /**
101 * Scriptable storage for unsigned 16-bit integers
102 */
104 [scriptable, uuid(dfacb090-4a1c-11d3-9890-006008962422)]
105 interface nsISupportsPRUint16 : nsISupportsPrimitive
106 {
107 attribute uint16_t data;
108 string toString();
109 };
111 /**
112 * Scriptable storage for unsigned 32-bit integers
113 */
115 [scriptable, uuid(e01dc470-4a1c-11d3-9890-006008962422)]
116 interface nsISupportsPRUint32 : nsISupportsPrimitive
117 {
118 attribute uint32_t data;
119 string toString();
120 };
122 /**
123 * Scriptable storage for 64-bit integers
124 */
126 [scriptable, uuid(e13567c0-4a1c-11d3-9890-006008962422)]
127 interface nsISupportsPRUint64 : nsISupportsPrimitive
128 {
129 attribute uint64_t data;
130 string toString();
131 };
133 /**
134 * Scriptable storage for NSPR date/time values
135 */
137 [scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)]
138 interface nsISupportsPRTime : nsISupportsPrimitive
139 {
140 attribute PRTime data;
141 string toString();
142 };
144 /**
145 * Scriptable storage for single character values
146 * (often used to store an ASCII character)
147 */
149 [scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)]
150 interface nsISupportsChar : nsISupportsPrimitive
151 {
152 attribute char data;
153 string toString();
154 };
156 /**
157 * Scriptable storage for 16-bit integers
158 */
160 [scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)]
161 interface nsISupportsPRInt16 : nsISupportsPrimitive
162 {
163 attribute int16_t data;
164 string toString();
165 };
167 /**
168 * Scriptable storage for 32-bit integers
169 */
171 [scriptable, uuid(e36c5250-4a1c-11d3-9890-006008962422)]
172 interface nsISupportsPRInt32 : nsISupportsPrimitive
173 {
174 attribute int32_t data;
175 string toString();
176 };
178 /**
179 * Scriptable storage for 64-bit integers
180 */
182 [scriptable, uuid(e3cb0ff0-4a1c-11d3-9890-006008962422)]
183 interface nsISupportsPRInt64 : nsISupportsPrimitive
184 {
185 attribute int64_t data;
186 string toString();
187 };
189 /**
190 * Scriptable storage for floating point numbers
191 */
193 [scriptable, uuid(abeaa390-4ac0-11d3-baea-00805f8a5dd7)]
194 interface nsISupportsFloat : nsISupportsPrimitive
195 {
196 attribute float data;
197 string toString();
198 };
200 /**
201 * Scriptable storage for doubles
202 */
204 [scriptable, uuid(b32523a0-4ac0-11d3-baea-00805f8a5dd7)]
205 interface nsISupportsDouble : nsISupportsPrimitive
206 {
207 attribute double data;
208 string toString();
209 };
211 /**
212 * Scriptable storage for generic pointers
213 */
215 [scriptable, uuid(464484f0-568d-11d3-baf8-00805f8a5dd7)]
216 interface nsISupportsVoid : nsISupportsPrimitive
217 {
218 [noscript] attribute voidPtr data;
219 string toString();
220 };
222 /**
223 * Scriptable storage for other XPCOM objects
224 */
226 [scriptable, uuid(995ea724-1dd1-11b2-9211-c21bdd3e7ed0)]
227 interface nsISupportsInterfacePointer : nsISupportsPrimitive
228 {
229 attribute nsISupports data;
230 attribute nsIDPtr dataIID;
232 string toString();
233 };