nsIPropertyBag2 编辑
xpcom/ds/nsIPropertyBag2.idl
Scriptable This interface extends nsIPropertyBag
with some methods for getting properties in specific formats. Inherits from: nsIPropertyBag
Last changed in Gecko 1.0Method 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
.
getPropertyAsAString()
AString getPropertyAsAString( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a String
.
getPropertyAsAUTF8String()
AUTF8String getPropertyAsAUTF8String( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as an AUTF8String
.
getPropertyAsBool()
boolean getPropertyAsBool( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a Boolean
.
getPropertyAsDouble()
double getPropertyAsDouble( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a Double
.
getPropertyAsInt32()
PRInt32 getPropertyAsInt32( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a PRInt32
.
getPropertyAsInt64()
PRInt64 getPropertyAsInt64( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a PRInt64
.
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
.
getPropertyAsUint64()
PRUint64 getPropertyAsUint64( in AString prop );
Parameters
prop
- Property to return the value of.
Return value
The property value as a PRUint64
.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论