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