import"extIApplication.idl";
Public Member Functions | |
| boolean | has (in AString aName) |
| extIPreference | get (in AString aName) |
| nsIVariant | getValue (in AString aName, in nsIVariant aDefaultValue) |
| void | setValue (in AString aName, in nsIVariant aValue) |
| void | reset () |
Public Attributes | |
| readonly attribute AString | root |
| readonly attribute nsIVariant | all |
| readonly attribute extIEvents | events |
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.
Definition at line 151 of file extIApplication.idl.
| extIPreference extIPreferenceBranch::get | ( | in AString | aName | ) |
Gets an object representing a preference
| aName | The name of preference |
| nsIVariant extIPreferenceBranch::getValue | ( | in AString | aName, |
| in nsIVariant | aDefaultValue | ||
| ) |
Gets the value of a preference. Returns a default value if the preference does not exist.
| aName | The name of preference |
| aDefaultValue | The value to return if preference does not exist |
| boolean extIPreferenceBranch::has | ( | in AString | aName | ) |
Check to see if a preference exists.
| aName | The name of preference |
| void extIPreferenceBranch::reset | ( | ) |
Resets all preferences in a branch back to their default values.
| void extIPreferenceBranch::setValue | ( | in AString | aName, |
| in nsIVariant | aValue | ||
| ) |
Sets the value of a storage item with the given name.
| aName | The name of an item |
| aValue | The value to assign to the item |
| readonly attribute nsIVariant extIPreferenceBranch::all |
Array of extIPreference listing all preferences in this branch.
Definition at line 161 of file extIApplication.idl.
| readonly attribute extIEvents extIPreferenceBranch::events |
The events object for the preferences supports: "change"
Definition at line 167 of file extIApplication.idl.
| readonly attribute AString extIPreferenceBranch::root |
The name of the branch root.
Definition at line 156 of file extIApplication.idl.