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


nsIPrefLocalizedString


The nsIPrefLocalizedString interface is simply a wrapper interface for nsISupportsWString so the preferences service can have a unique identifier to distinguish between requests for normal wide strings (nsISupportsWString) and "localized" wide strings, which get their default values from properites files. This interface is scriptable.

See also: nsIPrefBranch, nsISupportsWString.

Methods
toString

Retrieves the contents of this object into a wide string.

Syntax:

wstring nsIPrefLocalizedString::toString()  

Parameters:

None.

Returns:

A string containing the data stored within this object.
setDataWithLength

Sets the contents (a string) of the object.

Syntax:

void nsIPrefLocalizedString::setDataWithLength(
	in unsigned long length,
	[size_is(length)] in wstring data)  

Parameters:

length: The length of the string. This value should not include space for the null terminator, nor should it account for the size of a character. It should only be the number of characters for which there is space in the string.
data: The string data to be stored.

Note: This makes a copy of the string argument passed in.

nsresult:

NS_OK The data was successfully stored.
Attributes
attribute wstring nsIPrefLocalizedString::data

Provides access to string data stored in this property.


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