js/xpconnect/idl/xpcjsid.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/idl/xpcjsid.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +/* -*- Mode: IDL; tab-width: 8; 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 +#include "nsISupports.idl"
    1.10 +
    1.11 +[ptr] native const_nsID_ptr(const nsID);
    1.12 +
    1.13 +[builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)]
    1.14 +interface nsIJSID : nsISupports
    1.15 +{
    1.16 +    readonly attribute string  name;
    1.17 +    readonly attribute string  number;
    1.18 +    readonly attribute boolean valid;
    1.19 +
    1.20 +    boolean equals(in nsIJSID other);
    1.21 +    string toString();
    1.22 +
    1.23 +    [noscript] void initialize(in string idString);
    1.24 +
    1.25 +    // returns a pointer to the internal nsID. this pointer is only valid
    1.26 +    // while the nsIJSID object remains alive!
    1.27 +    [notxpcom] const_nsID_ptr getID();
    1.28 +};
    1.29 +
    1.30 +[builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)]
    1.31 +interface nsIJSIID : nsIJSID
    1.32 +{
    1.33 +};
    1.34 +
    1.35 +[builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)]
    1.36 +interface nsIJSCID : nsIJSID
    1.37 +{
    1.38 +    [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid);
    1.39 +    [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid);
    1.40 +};
    1.41 +
    1.42 +/* this goes into the C++ header verbatim. */
    1.43 +%{ C++
    1.44 +/********************************************************/
    1.45 +// {F24A14F0-4FA1-11d3-9894-006008962422}
    1.46 +#define NS_JS_ID_CID  \
    1.47 +{ 0xf24a14f0, 0x4fa1, 0x11d3, \
    1.48 +    { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }
    1.49 +%}
    1.50 +

mercurial