The nsIPrefService interface is the main entry point into the back end preferences management library. The preference service is directly responsible for the management of the preferences files and also facilitates access to the preference branch object which allows the direct manipulation of the preferences themselves.
nsIPrefService is defined in modules/libpref/public/nsIPrefService.idl
. It is scriptable
and
has been frozen since Mozilla 1.8
.
Inherits from: nsISupports
void readUserPrefs(in nsIFile aFile);
|
void resetPrefs();
|
void resetUserPrefs();
|
void savePrefFile(in nsIFile aFile);
|
nsIPrefBranch getBranch(in string aPrefRoot);
|
nsIPrefBranch getDefaultBranch(in string aPrefRoot);
|
Called to read in the preferences specified in a user preference file.
nsnull is passed in for the aFile parameter the default preferences file(s) [prefs.js, user.js] will be read and processed. void readUserPrefs(
in nsIFile aFile
);
Called to completely flush and re-initialize the preferences system.
void resetPrefs();
Called to reset all preferences with user set values back to the application default values.
void resetUserPrefs();
Called to write current preferences state to a file.
void savePrefFile(
in nsIFile aFile
);
Call to get a Preferences "Branch" which accesses user preference data. Using a Set method on this object will always create or set a user preference value. When using a Get method a user set value will be returned if one exists, otherwise a default value will be returned.
nsIPrefBranch getBranch(
in string aPrefRoot
);
Call to get a Preferences "Branch" which accesses only the default preference data. Using a Set method on this object will always create or set a default preference value. When using a Get method a default value will always be returned.
nsIPrefBranch getDefaultBranch(
in string aPrefRoot
);
Page last modified 01:33, 20 Nov 2007 by Kglee?