1 /* -*- Mode: C++; tab-width: 4; 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/. */
6 #include
"nsISupports.idl"
11 #define NS_ATOMSERVICE_CID \
12 { /* ed3db3fc-0168-4cab-8818-98f5475a490c */ \
16 {0x88, 0x18, 0x98, 0xf5, 0x47, 0x5a, 0x49, 0x0c} }
18 #define NS_ATOMSERVICE_CONTRACTID
"@mozilla.org/atom-service;1"
22 * Should this really be scriptable? Using atoms from script or proxies
23 * could be dangerous since double-wrapping could lead to loss of
27 [scriptable
, uuid(9c1f50b9
-f9eb
-42d4
-a8cb
-2c7600aeb241
)]
28 interface nsIAtomService
: nsISupports
{
31 * Version of NS_NewAtom that doesn't require linking against the
32 * XPCOM library. See nsIAtom.idl.
34 nsIAtom getAtom
(in AString value
);
37 * Version of NS_NewPermanentAtom that doesn't require linking against
38 * the XPCOM library. See nsIAtom.idl.
40 nsIAtom getPermanentAtom
(in AString value
);
43 * Get an atom with a utf8 string.
45 [noscript
] nsIAtom getAtomUTF8
(in string value
);
46 [noscript
] nsIAtom getPermanentAtomUTF8
(in string value
);