1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/ds/nsIPropertyBag2.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +/* nsIVariant based Property Bag support. */ 1.9 + 1.10 +#include "nsIPropertyBag.idl" 1.11 + 1.12 +[scriptable, uuid(625cfd1e-da1e-4417-9ee9-dbc8e0b3fd79)] 1.13 +interface nsIPropertyBag2 : nsIPropertyBag 1.14 +{ 1.15 + // Accessing a property as a different type may attempt conversion to the 1.16 + // requested value 1.17 + 1.18 + int32_t getPropertyAsInt32 (in AString prop); 1.19 + uint32_t getPropertyAsUint32 (in AString prop); 1.20 + int64_t getPropertyAsInt64 (in AString prop); 1.21 + uint64_t getPropertyAsUint64 (in AString prop); 1.22 + double getPropertyAsDouble (in AString prop); 1.23 + AString getPropertyAsAString (in AString prop); 1.24 + ACString getPropertyAsACString (in AString prop); 1.25 + AUTF8String getPropertyAsAUTF8String (in AString prop); 1.26 + boolean getPropertyAsBool (in AString prop); 1.27 + 1.28 + /** 1.29 + * This method returns null if the value exists, but is null. 1.30 + */ 1.31 + void getPropertyAsInterface (in AString prop, 1.32 + in nsIIDRef iid, 1.33 + [iid_is(iid), retval] out nsQIResult result); 1.34 + 1.35 + /** 1.36 + * This method returns null if the value does not exist, 1.37 + * or exists but is null. 1.38 + */ 1.39 + nsIVariant get (in AString prop); 1.40 + 1.41 + /** 1.42 + * Check for the existence of a key. 1.43 + */ 1.44 + boolean hasKey (in AString prop); 1.45 +};