nsISupportsPrimitives.idl 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /* -*- Mode: IDL; tab-width: 4; 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. * Dan Rosen <[email protected]>
  24. *
  25. * Alternatively, the contents of this file may be used under the terms of
  26. * either of the GNU General Public License Version 2 or later (the "GPL"),
  27. * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28. * in which case the provisions of the GPL or the LGPL are applicable instead
  29. * of those above. If you wish to allow use of your version of this file only
  30. * under the terms of either the GPL or the LGPL, and not to allow others to
  31. * use your version of this file under the terms of the MPL, indicate your
  32. * decision by deleting the provisions above and replace them with the notice
  33. * and other provisions required by the GPL or the LGPL. If you do not delete
  34. * the provisions above, a recipient may use your version of this file under
  35. * the terms of any one of the MPL, the GPL or the LGPL.
  36. *
  37. * ***** END LICENSE BLOCK ***** */
  38. /* nsISupports wrappers for single primitive pieces of data. */
  39. #include "nsISupports.idl"
  40. /**
  41. * Primitive base interface.
  42. *
  43. * These first three are pointer types and do data copying
  44. * using the nsIMemory. Be careful!
  45. *
  46. * @status FROZEN
  47. */
  48. [scriptable, uuid(d0d4b136-1dd1-11b2-9371-f0727ef827c0)]
  49. interface nsISupportsPrimitive : nsISupports
  50. {
  51. const unsigned short TYPE_ID = 1;
  52. const unsigned short TYPE_CSTRING = 2;
  53. const unsigned short TYPE_STRING = 3;
  54. const unsigned short TYPE_PRBOOL = 4;
  55. const unsigned short TYPE_PRUINT8 = 5;
  56. const unsigned short TYPE_PRUINT16 = 6;
  57. const unsigned short TYPE_PRUINT32 = 7;
  58. const unsigned short TYPE_PRUINT64 = 8;
  59. const unsigned short TYPE_PRTIME = 9;
  60. const unsigned short TYPE_CHAR = 10;
  61. const unsigned short TYPE_PRINT16 = 11;
  62. const unsigned short TYPE_PRINT32 = 12;
  63. const unsigned short TYPE_PRINT64 = 13;
  64. const unsigned short TYPE_FLOAT = 14;
  65. const unsigned short TYPE_DOUBLE = 15;
  66. const unsigned short TYPE_VOID = 16;
  67. const unsigned short TYPE_INTERFACE_POINTER = 17;
  68. readonly attribute unsigned short type;
  69. };
  70. /**
  71. * Scriptable storage for nsID structures
  72. *
  73. * @status FROZEN
  74. */
  75. [scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)]
  76. interface nsISupportsID : nsISupportsPrimitive
  77. {
  78. attribute nsIDPtr data;
  79. string toString();
  80. };
  81. /**
  82. * Scriptable storage for ASCII strings
  83. *
  84. * @status FROZEN
  85. */
  86. [scriptable, uuid(d65ff270-4a1c-11d3-9890-006008962422)]
  87. interface nsISupportsCString : nsISupportsPrimitive
  88. {
  89. attribute ACString data;
  90. string toString();
  91. };
  92. /**
  93. * Scriptable storage for Unicode strings
  94. *
  95. * @status FROZEN
  96. */
  97. [scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)]
  98. interface nsISupportsString : nsISupportsPrimitive
  99. {
  100. attribute AString data;
  101. wstring toString();
  102. };
  103. /**
  104. * The rest are truly primitive and are passed by value
  105. */
  106. /**
  107. * Scriptable storage for booleans
  108. *
  109. * @status FROZEN
  110. */
  111. [scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)]
  112. interface nsISupportsPRBool : nsISupportsPrimitive
  113. {
  114. attribute PRBool data;
  115. string toString();
  116. };
  117. /**
  118. * Scriptable storage for 8-bit integers
  119. *
  120. * @status FROZEN
  121. */
  122. [scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)]
  123. interface nsISupportsPRUint8 : nsISupportsPrimitive
  124. {
  125. attribute PRUint8 data;
  126. string toString();
  127. };
  128. /**
  129. * Scriptable storage for unsigned 16-bit integers
  130. *
  131. * @status FROZEN
  132. */
  133. [scriptable, uuid(dfacb090-4a1c-11d3-9890-006008962422)]
  134. interface nsISupportsPRUint16 : nsISupportsPrimitive
  135. {
  136. attribute PRUint16 data;
  137. string toString();
  138. };
  139. /**
  140. * Scriptable storage for unsigned 32-bit integers
  141. *
  142. * @status FROZEN
  143. */
  144. [scriptable, uuid(e01dc470-4a1c-11d3-9890-006008962422)]
  145. interface nsISupportsPRUint32 : nsISupportsPrimitive
  146. {
  147. attribute PRUint32 data;
  148. string toString();
  149. };
  150. /**
  151. * Scriptable storage for 64-bit integers
  152. *
  153. * @status FROZEN
  154. */
  155. [scriptable, uuid(e13567c0-4a1c-11d3-9890-006008962422)]
  156. interface nsISupportsPRUint64 : nsISupportsPrimitive
  157. {
  158. attribute PRUint64 data;
  159. string toString();
  160. };
  161. /**
  162. * Scriptable storage for NSPR date/time values
  163. *
  164. * @status FROZEN
  165. */
  166. [scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)]
  167. interface nsISupportsPRTime : nsISupportsPrimitive
  168. {
  169. attribute PRTime data;
  170. string toString();
  171. };
  172. /**
  173. * Scriptable storage for single character values
  174. * (often used to store an ASCII character)
  175. *
  176. * @status FROZEN
  177. */
  178. [scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)]
  179. interface nsISupportsChar : nsISupportsPrimitive
  180. {
  181. attribute char data;
  182. string toString();
  183. };
  184. /**
  185. * Scriptable storage for 16-bit integers
  186. *
  187. * @status FROZEN
  188. */
  189. [scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)]
  190. interface nsISupportsPRInt16 : nsISupportsPrimitive
  191. {
  192. attribute PRInt16 data;
  193. string toString();
  194. };
  195. /**
  196. * Scriptable storage for 32-bit integers
  197. *
  198. * @status FROZEN
  199. */
  200. [scriptable, uuid(e36c5250-4a1c-11d3-9890-006008962422)]
  201. interface nsISupportsPRInt32 : nsISupportsPrimitive
  202. {
  203. attribute PRInt32 data;
  204. string toString();
  205. };
  206. /**
  207. * Scriptable storage for 64-bit integers
  208. *
  209. * @status FROZEN
  210. */
  211. [scriptable, uuid(e3cb0ff0-4a1c-11d3-9890-006008962422)]
  212. interface nsISupportsPRInt64 : nsISupportsPrimitive
  213. {
  214. attribute PRInt64 data;
  215. string toString();
  216. };
  217. /**
  218. * Scriptable storage for floating point numbers
  219. *
  220. * @status FROZEN
  221. */
  222. [scriptable, uuid(abeaa390-4ac0-11d3-baea-00805f8a5dd7)]
  223. interface nsISupportsFloat : nsISupportsPrimitive
  224. {
  225. attribute float data;
  226. string toString();
  227. };
  228. /**
  229. * Scriptable storage for doubles
  230. *
  231. * @status FROZEN
  232. */
  233. [scriptable, uuid(b32523a0-4ac0-11d3-baea-00805f8a5dd7)]
  234. interface nsISupportsDouble : nsISupportsPrimitive
  235. {
  236. attribute double data;
  237. string toString();
  238. };
  239. /**
  240. * Scriptable storage for generic pointers
  241. *
  242. * @status FROZEN
  243. */
  244. [scriptable, uuid(464484f0-568d-11d3-baf8-00805f8a5dd7)]
  245. interface nsISupportsVoid : nsISupportsPrimitive
  246. {
  247. [noscript] attribute voidPtr data;
  248. string toString();
  249. };
  250. /**
  251. * Scriptable storage for other XPCOM objects
  252. *
  253. * @status FROZEN
  254. */
  255. [scriptable, uuid(995ea724-1dd1-11b2-9211-c21bdd3e7ed0)]
  256. interface nsISupportsInterfacePointer : nsISupportsPrimitive
  257. {
  258. attribute nsISupports data;
  259. attribute nsIDPtr dataIID;
  260. string toString();
  261. };