xpcjsid.idl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* -*- Mode: IDL; tab-width: 8; 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/. */
  5. #include "nsISupports.idl"
  6. [ptr] native const_nsID_ptr(const nsID);
  7. [builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)]
  8. interface nsIJSID : nsISupports
  9. {
  10. readonly attribute string name;
  11. readonly attribute string number;
  12. readonly attribute boolean valid;
  13. boolean equals(in nsIJSID other);
  14. string toString();
  15. [noscript] void initialize(in string idString);
  16. // returns a pointer to the internal nsID. this pointer is only valid
  17. // while the nsIJSID object remains alive!
  18. [notxpcom] const_nsID_ptr getID();
  19. };
  20. [builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)]
  21. interface nsIJSIID : nsIJSID
  22. {
  23. };
  24. [builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)]
  25. interface nsIJSCID : nsIJSID
  26. {
  27. [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid);
  28. [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid);
  29. };
  30. /* this goes into the C++ header verbatim. */
  31. %{ C++
  32. /********************************************************/
  33. // {F24A14F0-4FA1-11d3-9894-006008962422}
  34. #define NS_JS_ID_CID \
  35. { 0xf24a14f0, 0x4fa1, 0x11d3, \
  36. { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }
  37. %}