Interface for simplified access to preferences.
More...
import "extIApplication.idl";
List of all members.
Detailed Description
Interface for simplified access to preferences.
The interface has a predefined root preference branch. The root branch is set based on the context of the owner. For example, an extension's preferences have a root of "extensions.<extensionid>.", while the application level preferences have an empty root. All preference "aName" parameters used in this interface are relative to the root branch.
Member Function Documentation
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::Get |
( |
const nsAString & |
aName, |
|
|
extIPreference **_retval |
NS_OUTPARAM | |
|
) |
| | [pure virtual] |
Gets an object representing a preference.
- Parameters:
-
| aName | The name of preference |
- Returns:
- a preference object, or null if the preference does not exist
Gets an object representing a preference.
- Parameters:
-
| aName | The name of preference |
- Returns:
- a preference object, or null if the preference does not exist
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::GetAll |
( |
nsIVariant ** |
aAll |
) |
[pure virtual] |
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::GetEvents |
( |
extIEvents ** |
aEvents |
) |
[pure virtual] |
The events object for the preferences supports: "change".
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::GetRoot |
( |
nsAString & |
aRoot |
) |
[pure virtual] |
The name of the branch root.
Gets the value of a preference.
Returns a default value if the preference does not exist.
- Parameters:
-
| aName | The name of preference |
| aDefaultValue | The value to return if preference does not exist |
- Returns:
- value of the preference or the given default value if preference does not exists.
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::GetValue |
( |
const nsAString & |
aName, |
|
|
nsIVariant * |
aDefaultValue, |
|
|
nsIVariant **_retval |
NS_OUTPARAM | |
|
) |
| | [pure virtual] |
Gets the value of a preference.
Returns a default value if the preference does not exist.
- Parameters:
-
| aName | The name of preference |
| aDefaultValue | The value to return if preference does not exist |
- Returns:
- value of the preference or the given default value if preference does not exists.
| boolean extIPreferenceBranch::has |
( |
in AString |
aName |
) |
|
Check to see if a preference exists.
- Parameters:
-
| aName | The name of preference |
- Returns:
- true if the preference exists, false if not
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::Has |
( |
const nsAString & |
aName, |
|
|
PRBool *_retval |
NS_OUTPARAM | |
|
) |
| | [pure virtual] |
Check to see if a preference exists.
- Parameters:
-
| aName | The name of preference |
- Returns:
- true if the preference exists, false if not
| void extIPreferenceBranch::reset |
( |
|
) |
|
Resets all preferences in a branch back to their default values.
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::Reset |
( |
void |
|
) |
[pure virtual] |
Resets all preferences in a branch back to their default values.
| NS_SCRIPTABLE NS_IMETHOD extIPreferenceBranch::SetValue |
( |
const nsAString & |
aName, |
|
|
nsIVariant * |
aValue | |
|
) |
| | [pure virtual] |
Sets the value of a storage item with the given name.
- Parameters:
-
| aName | The name of an item |
| aValue | The value to assign to the item |
| void extIPreferenceBranch::setValue |
( |
in AString |
aName, |
|
|
in nsIVariant |
aValue | |
|
) |
| | |
Sets the value of a storage item with the given name.
- Parameters:
-
| aName | The name of an item |
| aValue | The value to assign to the item |
Member Data Documentation
The events object for the preferences supports: "change".
The name of the branch root.
The documentation for this interface was generated from the following files: