michael@0: /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [ptr] native const_nsID_ptr(const nsID); michael@0: michael@0: [builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)] michael@0: interface nsIJSID : nsISupports michael@0: { michael@0: readonly attribute string name; michael@0: readonly attribute string number; michael@0: readonly attribute boolean valid; michael@0: michael@0: boolean equals(in nsIJSID other); michael@0: string toString(); michael@0: michael@0: [noscript] void initialize(in string idString); michael@0: michael@0: // returns a pointer to the internal nsID. this pointer is only valid michael@0: // while the nsIJSID object remains alive! michael@0: [notxpcom] const_nsID_ptr getID(); michael@0: }; michael@0: michael@0: [builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)] michael@0: interface nsIJSIID : nsIJSID michael@0: { michael@0: }; michael@0: michael@0: [builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)] michael@0: interface nsIJSCID : nsIJSID michael@0: { michael@0: [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid); michael@0: [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid); michael@0: }; michael@0: michael@0: /* this goes into the C++ header verbatim. */ michael@0: %{ C++ michael@0: /********************************************************/ michael@0: // {F24A14F0-4FA1-11d3-9894-006008962422} michael@0: #define NS_JS_ID_CID \ michael@0: { 0xf24a14f0, 0x4fa1, 0x11d3, \ michael@0: { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } michael@0: %} michael@0: