You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


TOC PREV NEXT INDEX

Embedding Gecko API


nsIProperties


This is a simple mapping service interface. It is scriptable.

Methods
get

Gets a property with a given name.

Syntax:

void nsIProperties::get(in string prop, in nsIIDRef iid,
	[iid_is(iid),retval] out nsQIResult result) 

Parameters:

prop: The name of the property of interest.
iid: The IID associated with the property.
result:[out] The property.

nsresult:

NS_OK if successful.
NS_ERROR_FAILURE if a property with that name doesn't exist.
NS_ERROR_NO_INTERFACE if the found property fails to QI to the given IID.
set

Sets a property with a given name to a given value.

Syntax:

void nsIProperties::set(in string prop, 
	in nsISupports value) 

Parameters:

prop: The name of the property.
value: The value to assign.

nsresult:

NS_OK if successful.
has

Checks if a property with a given name exists.

Syntax:

boolean nsIProperties::has(in string prop) 

Parameters:

prop: The name of the property.

Returns:

TRUE if the property exists.
FALSE otherwise.
undefine

Undefines a property.

Syntax:

void nsIProperties::undefine(in string prop) 

Parameters:

prop: The name of the property.

nsresult:

NS_OK if successful.
NS_ERROR_FAILURE if a property with that name doesn't already exist.
getKeys

Returns an array of the keys.

Syntax:

void nsIProperties::getKeys(out PRUint32 count, 
	[array, size_is(count), retval] out string keys) 

Parameters:

count:[out]The number of keys.
keys:[out]The array of keys.

nsresult:

NS_OK if successful.

Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX