This interface extends
nsIPropertyBag
with some methods for getting properties in specific formats.
Inherits from:
nsIPropertyBag
Last changed in Gecko 1.0 Method overview
nsIVariant get(in AString prop); |
ACString getPropertyAsACString(in AString prop); |
AString getPropertyAsAString(in AString prop); |
AUTF8String getPropertyAsAUTF8String(in AString prop); |
boolean getPropertyAsBool(in AString prop); |
double getPropertyAsDouble(in AString prop); |
PRInt32 getPropertyAsInt32(in AString prop); |
PRInt64 getPropertyAsInt64(in AString prop); |
void getPropertyAsInterface(in AString prop, in nsIIDRef iid, [iid_is(iid), retval] out nsQIResult result); |
PRUint32 getPropertyAsUint32(in AString prop); |
PRUint64 getPropertyAsUint64(in AString prop); |
PRBool hasKey(in AString prop); |
Methods
get()
This method returns null
if the value does not exist, or exists but is null
.
nsIVariant get( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as an nsIVariant
.
getPropertyAsACString()
ACString getPropertyAsACString( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as an ACString
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsAString()
AString getPropertyAsAString( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a String
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsAUTF8String()
AUTF8String getPropertyAsAUTF8String( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as an AUTF8String
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsBool()
boolean getPropertyAsBool( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a Boolean
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsDouble()
double getPropertyAsDouble( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a Double
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsInt32()
PRInt32 getPropertyAsInt32( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a PRInt32
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsInt64()
PRInt64 getPropertyAsInt64( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a PRInt64
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsInterface()
This method returns null
if the value exists, but is null
.
void getPropertyAsInterface( in AString prop, in nsIIDRef iid, [iid_is(iid), retval] out nsQIResult result );
Parameters
-
prop
- Property to return the value of.
-
iid
- The interface type to be returned.
-
result
- The resulting interface pointer.
getPropertyAsUint32()
PRUint32 getPropertyAsUint32( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a PRUint32
.
Note: Accessing a property of a different type may attempt conversion to this type.
getPropertyAsUint64()
PRUint64 getPropertyAsUint64( in AString prop );
Parameters
-
prop
- Property to return the value of.
Return value
The property value as a PRUint64
.
Note: Accessing a property of a different type may attempt conversion to this type.
hasKey()
Check for the existence of a key.
PRBool hasKey( in AString prop );
Parameters
-
prop
- Property to check for key existence.
Return value
true
if a key for the property exists, false
if it does not.