xpcom/ds/nsISupportsPrimitives.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/ds/nsISupportsPrimitives.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,235 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/* nsISupports wrappers for single primitive pieces of data. */
    1.10 +
    1.11 +#include "nsISupports.idl"
    1.12 +
    1.13 +/**
    1.14 + * Primitive base interface.
    1.15 + *
    1.16 + * These first three are pointer types and do data copying
    1.17 + * using the nsIMemory. Be careful!
    1.18 + */
    1.19 +
    1.20 +[scriptable, uuid(d0d4b136-1dd1-11b2-9371-f0727ef827c0)]
    1.21 +interface nsISupportsPrimitive : nsISupports
    1.22 +{
    1.23 +    const unsigned short TYPE_ID                = 1;
    1.24 +    const unsigned short TYPE_CSTRING           = 2;
    1.25 +    const unsigned short TYPE_STRING            = 3;
    1.26 +    const unsigned short TYPE_PRBOOL            = 4;
    1.27 +    const unsigned short TYPE_PRUINT8           = 5;
    1.28 +    const unsigned short TYPE_PRUINT16          = 6;
    1.29 +    const unsigned short TYPE_PRUINT32          = 7;
    1.30 +    const unsigned short TYPE_PRUINT64          = 8;
    1.31 +    const unsigned short TYPE_PRTIME            = 9;
    1.32 +    const unsigned short TYPE_CHAR              = 10;
    1.33 +    const unsigned short TYPE_PRINT16           = 11;
    1.34 +    const unsigned short TYPE_PRINT32           = 12;
    1.35 +    const unsigned short TYPE_PRINT64           = 13;
    1.36 +    const unsigned short TYPE_FLOAT             = 14;
    1.37 +    const unsigned short TYPE_DOUBLE            = 15;
    1.38 +    const unsigned short TYPE_VOID              = 16;
    1.39 +    const unsigned short TYPE_INTERFACE_POINTER = 17;
    1.40 +
    1.41 +    readonly attribute unsigned short type;
    1.42 +};
    1.43 +
    1.44 +/**
    1.45 + * Scriptable storage for nsID structures
    1.46 + */
    1.47 +
    1.48 +[scriptable, uuid(d18290a0-4a1c-11d3-9890-006008962422)]
    1.49 +interface nsISupportsID : nsISupportsPrimitive
    1.50 +{
    1.51 +    attribute nsIDPtr data;
    1.52 +    string toString();
    1.53 +};
    1.54 +
    1.55 +/**
    1.56 + * Scriptable storage for ASCII strings
    1.57 + */
    1.58 +
    1.59 +[scriptable, uuid(d65ff270-4a1c-11d3-9890-006008962422)]
    1.60 +interface nsISupportsCString : nsISupportsPrimitive
    1.61 +{
    1.62 +    attribute ACString data;
    1.63 +    string toString();
    1.64 +};
    1.65 +
    1.66 +/**
    1.67 + * Scriptable storage for Unicode strings
    1.68 + */
    1.69 +
    1.70 +[scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)]
    1.71 +interface nsISupportsString : nsISupportsPrimitive
    1.72 +{
    1.73 +    attribute AString data;
    1.74 +    wstring toString();
    1.75 +};
    1.76 +
    1.77 +/**
    1.78 + * The rest are truly primitive and are passed by value
    1.79 + */ 
    1.80 +
    1.81 +/**
    1.82 + * Scriptable storage for booleans
    1.83 + */
    1.84 +
    1.85 +[scriptable, uuid(ddc3b490-4a1c-11d3-9890-006008962422)]
    1.86 +interface nsISupportsPRBool : nsISupportsPrimitive
    1.87 +{
    1.88 +    attribute boolean data;
    1.89 +    string toString();
    1.90 +};
    1.91 +
    1.92 +/**
    1.93 + * Scriptable storage for 8-bit integers
    1.94 + */
    1.95 +
    1.96 +[scriptable, uuid(dec2e4e0-4a1c-11d3-9890-006008962422)]
    1.97 +interface nsISupportsPRUint8 : nsISupportsPrimitive
    1.98 +{
    1.99 +    attribute uint8_t data;
   1.100 +    string toString();
   1.101 +};
   1.102 +
   1.103 +/**
   1.104 + * Scriptable storage for unsigned 16-bit integers
   1.105 + */
   1.106 +
   1.107 +[scriptable, uuid(dfacb090-4a1c-11d3-9890-006008962422)]
   1.108 +interface nsISupportsPRUint16 : nsISupportsPrimitive
   1.109 +{
   1.110 +    attribute uint16_t data;
   1.111 +    string toString();
   1.112 +};
   1.113 +
   1.114 +/**
   1.115 + * Scriptable storage for unsigned 32-bit integers
   1.116 + */
   1.117 +
   1.118 +[scriptable, uuid(e01dc470-4a1c-11d3-9890-006008962422)]
   1.119 +interface nsISupportsPRUint32 : nsISupportsPrimitive
   1.120 +{
   1.121 +    attribute uint32_t data;
   1.122 +    string toString();
   1.123 +};
   1.124 +
   1.125 +/**
   1.126 + * Scriptable storage for 64-bit integers
   1.127 + */
   1.128 +
   1.129 +[scriptable, uuid(e13567c0-4a1c-11d3-9890-006008962422)]
   1.130 +interface nsISupportsPRUint64 : nsISupportsPrimitive
   1.131 +{
   1.132 +    attribute uint64_t data;
   1.133 +    string toString();
   1.134 +};
   1.135 +
   1.136 +/**
   1.137 + * Scriptable storage for NSPR date/time values
   1.138 + */
   1.139 +
   1.140 +[scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)]
   1.141 +interface nsISupportsPRTime : nsISupportsPrimitive
   1.142 +{
   1.143 +    attribute PRTime data;
   1.144 +    string toString();
   1.145 +};
   1.146 +
   1.147 +/**
   1.148 + * Scriptable storage for single character values
   1.149 + * (often used to store an ASCII character)
   1.150 + */
   1.151 +
   1.152 +[scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)]
   1.153 +interface nsISupportsChar : nsISupportsPrimitive
   1.154 +{
   1.155 +    attribute char data;
   1.156 +    string toString();
   1.157 +};
   1.158 +
   1.159 +/**
   1.160 + * Scriptable storage for 16-bit integers
   1.161 + */
   1.162 +
   1.163 +[scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)]
   1.164 +interface nsISupportsPRInt16 : nsISupportsPrimitive
   1.165 +{
   1.166 +    attribute int16_t data;
   1.167 +    string toString();
   1.168 +};
   1.169 +
   1.170 +/**
   1.171 + * Scriptable storage for 32-bit integers
   1.172 + */
   1.173 +
   1.174 +[scriptable, uuid(e36c5250-4a1c-11d3-9890-006008962422)]
   1.175 +interface nsISupportsPRInt32 : nsISupportsPrimitive
   1.176 +{
   1.177 +    attribute int32_t data;
   1.178 +    string toString();
   1.179 +};
   1.180 +
   1.181 +/**
   1.182 + * Scriptable storage for 64-bit integers
   1.183 + */
   1.184 +
   1.185 +[scriptable, uuid(e3cb0ff0-4a1c-11d3-9890-006008962422)]
   1.186 +interface nsISupportsPRInt64 : nsISupportsPrimitive
   1.187 +{
   1.188 +    attribute int64_t data;
   1.189 +    string toString();
   1.190 +};
   1.191 +
   1.192 +/**
   1.193 + * Scriptable storage for floating point numbers
   1.194 + */
   1.195 +
   1.196 +[scriptable, uuid(abeaa390-4ac0-11d3-baea-00805f8a5dd7)]
   1.197 +interface nsISupportsFloat : nsISupportsPrimitive
   1.198 +{
   1.199 +    attribute float data;
   1.200 +    string toString();
   1.201 +};
   1.202 +
   1.203 +/**
   1.204 + * Scriptable storage for doubles
   1.205 + */
   1.206 +
   1.207 +[scriptable, uuid(b32523a0-4ac0-11d3-baea-00805f8a5dd7)]
   1.208 +interface nsISupportsDouble : nsISupportsPrimitive
   1.209 +{
   1.210 +    attribute double data;
   1.211 +    string toString();
   1.212 +};
   1.213 +
   1.214 +/**
   1.215 + * Scriptable storage for generic pointers
   1.216 + */
   1.217 +
   1.218 +[scriptable, uuid(464484f0-568d-11d3-baf8-00805f8a5dd7)]
   1.219 +interface nsISupportsVoid : nsISupportsPrimitive
   1.220 +{
   1.221 +    [noscript] attribute voidPtr data;
   1.222 +    string toString();
   1.223 +};
   1.224 +
   1.225 +/**
   1.226 + * Scriptable storage for other XPCOM objects
   1.227 + */
   1.228 +
   1.229 +[scriptable, uuid(995ea724-1dd1-11b2-9211-c21bdd3e7ed0)]
   1.230 +interface nsISupportsInterfacePointer : nsISupportsPrimitive
   1.231 +{
   1.232 +    attribute nsISupports data;
   1.233 +    attribute nsIDPtr dataIID;
   1.234 +
   1.235 +    string toString();
   1.236 +};
   1.237 +
   1.238 +

mercurial