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"
11 * Primitive base interface.
13 * These first three are pointer types and do data copying
14 * using the nsIMemory. Be careful!
17 [scriptable
, builtinclass
, uuid(d0d4b136
-1dd1
-11b2
-9371-f0727ef827c0
)]
18 interface nsISupportsPrimitive
: nsISupports
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 // 16 was for TYPE_VOID
36 const unsigned short TYPE_INTERFACE_POINTER
= 17;
38 readonly attribute
unsigned short type
;
42 * Scriptable storage for nsID structures
45 [scriptable
, builtinclass
, uuid(d18290a0
-4a1c
-11d3
-9890-006008962422)]
46 interface nsISupportsID
: nsISupportsPrimitive
48 attribute nsIDPtr data
;
53 * Scriptable storage for ASCII strings
56 [scriptable
, builtinclass
, uuid(d65ff270
-4a1c
-11d3
-9890-006008962422)]
57 interface nsISupportsCString
: nsISupportsPrimitive
59 attribute ACString data
;
64 * Scriptable storage for Unicode strings
67 [scriptable
, builtinclass
, uuid(d79dc970
-4a1c
-11d3
-9890-006008962422)]
68 interface nsISupportsString
: nsISupportsPrimitive
70 attribute AString data
;
75 * The rest are truly primitive and are passed by value
79 * Scriptable storage for booleans
82 [scriptable
, builtinclass
, uuid(ddc3b490
-4a1c
-11d3
-9890-006008962422)]
83 interface nsISupportsPRBool
: nsISupportsPrimitive
85 attribute
boolean data
;
90 * Scriptable storage for 8-bit integers
93 [scriptable
, builtinclass
, uuid(dec2e4e0
-4a1c
-11d3
-9890-006008962422)]
94 interface nsISupportsPRUint8
: nsISupportsPrimitive
96 attribute uint8_t data
;
101 * Scriptable storage for unsigned 16-bit integers
104 [scriptable
, builtinclass
, uuid(dfacb090
-4a1c
-11d3
-9890-006008962422)]
105 interface nsISupportsPRUint16
: nsISupportsPrimitive
107 attribute uint16_t data
;
112 * Scriptable storage for unsigned 32-bit integers
115 [scriptable
, builtinclass
, uuid(e01dc470
-4a1c
-11d3
-9890-006008962422)]
116 interface nsISupportsPRUint32
: nsISupportsPrimitive
118 attribute uint32_t data
;
123 * Scriptable storage for 64-bit integers
126 [scriptable
, builtinclass
, uuid(e13567c0
-4a1c
-11d3
-9890-006008962422)]
127 interface nsISupportsPRUint64
: nsISupportsPrimitive
129 attribute uint64_t data
;
134 * Scriptable storage for NSPR date/time values
137 [scriptable
, builtinclass
, uuid(e2563630
-4a1c
-11d3
-9890-006008962422)]
138 interface nsISupportsPRTime
: nsISupportsPrimitive
140 attribute PRTime data
;
145 * Scriptable storage for single character values
146 * (often used to store an ASCII character)
149 [scriptable
, builtinclass
, uuid(e2b05e40
-4a1c
-11d3
-9890-006008962422)]
150 interface nsISupportsChar
: nsISupportsPrimitive
157 * Scriptable storage for 16-bit integers
160 [scriptable
, builtinclass
, uuid(e30d94b0
-4a1c
-11d3
-9890-006008962422)]
161 interface nsISupportsPRInt16
: nsISupportsPrimitive
163 attribute int16_t data
;
168 * Scriptable storage for 32-bit integers
171 [scriptable
, builtinclass
, uuid(e36c5250
-4a1c
-11d3
-9890-006008962422)]
172 interface nsISupportsPRInt32
: nsISupportsPrimitive
174 attribute int32_t data
;
179 * Scriptable storage for 64-bit integers
182 [scriptable
, builtinclass
, uuid(e3cb0ff0
-4a1c
-11d3
-9890-006008962422)]
183 interface nsISupportsPRInt64
: nsISupportsPrimitive
185 attribute int64_t data
;
190 * Scriptable storage for floating point numbers
193 [scriptable
, builtinclass
, uuid(abeaa390
-4ac0
-11d3
-baea
-00805f8a5dd7
)]
194 interface nsISupportsFloat
: nsISupportsPrimitive
196 attribute
float data
;
201 * Scriptable storage for doubles
204 [scriptable
, builtinclass
, uuid(b32523a0
-4ac0
-11d3
-baea
-00805f8a5dd7
)]
205 interface nsISupportsDouble
: nsISupportsPrimitive
207 attribute
double data
;
212 * Scriptable storage for other XPCOM objects
215 [scriptable
, builtinclass
, uuid(995ea724
-1dd1
-11b2
-9211-c21bdd3e7ed0
)]
216 interface nsISupportsInterfacePointer
: nsISupportsPrimitive
218 attribute nsISupports data
;
219 attribute nsIDPtr dataIID
;