Backed out changeset 4c2bc5ae8f95 (bug 945562) for device image bustage.
[gecko.git] / xpcom / ds / nsIAtomService.idl
blob37c094e3d93562df91789fbc38b8377a9eb85a84
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"
8 interface nsIAtom;
10 %{C++
11 #define NS_ATOMSERVICE_CID \
12 { /* ed3db3fc-0168-4cab-8818-98f5475a490c */ \
13 0xed3db3fc, \
14 0x0168, \
15 0x4cab, \
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
24 * pointer identity.
27 [scriptable, uuid(9c1f50b9-f9eb-42d4-a8cb-2c7600aeb241)]
28 interface nsIAtomService : nsISupports {
30 /**
31 * Version of NS_NewAtom that doesn't require linking against the
32 * XPCOM library. See nsIAtom.idl.
34 nsIAtom getAtom(in AString value);
36 /**
37 * Version of NS_NewPermanentAtom that doesn't require linking against
38 * the XPCOM library. See nsIAtom.idl.
40 nsIAtom getPermanentAtom(in AString value);
42 /**
43 * Get an atom with a utf8 string.
45 [noscript] nsIAtom getAtomUTF8(in string value);
46 [noscript] nsIAtom getPermanentAtomUTF8(in string value);