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: /* nsIVariant based Property Bag support. */ michael@0: michael@0: #include "nsIPropertyBag.idl" michael@0: michael@0: [scriptable, uuid(625cfd1e-da1e-4417-9ee9-dbc8e0b3fd79)] michael@0: interface nsIPropertyBag2 : nsIPropertyBag michael@0: { michael@0: // Accessing a property as a different type may attempt conversion to the michael@0: // requested value michael@0: michael@0: int32_t getPropertyAsInt32 (in AString prop); michael@0: uint32_t getPropertyAsUint32 (in AString prop); michael@0: int64_t getPropertyAsInt64 (in AString prop); michael@0: uint64_t getPropertyAsUint64 (in AString prop); michael@0: double getPropertyAsDouble (in AString prop); michael@0: AString getPropertyAsAString (in AString prop); michael@0: ACString getPropertyAsACString (in AString prop); michael@0: AUTF8String getPropertyAsAUTF8String (in AString prop); michael@0: boolean getPropertyAsBool (in AString prop); michael@0: michael@0: /** michael@0: * This method returns null if the value exists, but is null. michael@0: */ michael@0: void getPropertyAsInterface (in AString prop, michael@0: in nsIIDRef iid, michael@0: [iid_is(iid), retval] out nsQIResult result); michael@0: michael@0: /** michael@0: * This method returns null if the value does not exist, michael@0: * or exists but is null. michael@0: */ michael@0: nsIVariant get (in AString prop); michael@0: michael@0: /** michael@0: * Check for the existence of a key. michael@0: */ michael@0: boolean hasKey (in AString prop); michael@0: };