import "nsIContentPrefService.idl";
List of all members.
Member Function Documentation
Add an observer.
- Parameters:
-
| aName | the setting to observe, or null to add a generic observer that observes all settings |
| aObserver | the observer to add |
Get a pref.
Besides the regular string, integer, boolean, etc. values, this method may return null (nsIDataType::VTYPE_EMPTY), which means the pref is set to NULL in the database, as well as undefined (nsIDataType::VTYPE_VOID), which means there is no record for this pref in the database.
- Parameters:
-
| aGroup | the group for which to get the pref, as an nsIURI from which the hostname will be used, a string (typically in the format of a hostname), or null to get the global pref (applies to all sites) |
| aName | the name of the pref to get |
- Returns:
- the value of the pref
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aGroup is not a string, nsIURI, or null |
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
Get the prefs that apply to the given site.
- Parameters:
-
| aGroup | the group for which to retrieve prefs, as an nsIURI from which the hostname will be used, a string (typically in the format of a hostname), or null to get the global prefs (apply to all sites) |
- Returns:
- a property bag of prefs
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aGroup is not a string, nsIURI, or null |
Get the prefs with the given name.
- Parameters:
-
| aName | the setting name for which to retrieve prefs |
- Returns:
- a property bag of prefs
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
Check whether or not a pref exists.
- Parameters:
-
| aGroup | the group for which to check for the pref, as an nsIURI from which the hostname will be used, a string (typically in the format of a hostname), or null to check for the global pref (applies to all sites) |
| aName | the name of the pref to check for |
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aGroup is not a string, nsIURI, or null |
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
void nsIContentPrefService::removeGroupedPrefs |
( |
|
) |
|
Remove all grouped prefs.
Useful for removing references to the sites the user has visited when the user clears their private data.
Remove an observer.
- Parameters:
-
| aName | the setting being observed, or null to remove a generic observer that observes all settings |
| aObserver | the observer to remove |
void nsIContentPrefService::removePref |
( |
in nsIVariant |
aGroup, |
|
|
in AString |
aName | |
|
) |
| | |
Remove a pref.
- Parameters:
-
| aGroup | the group for which to remove the pref, as an nsIURI from which the hostname will be used, a string (typically in the format of a hostname), or null to remove the global pref (applies to all sites) |
| aName | the name of the pref to remove |
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aGroup is not a string, nsIURI, or null |
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
void nsIContentPrefService::removePrefsByName |
( |
in AString |
aName |
) |
|
Remove all prefs with the given name.
- Parameters:
-
| aName | the setting name for which to remove prefs |
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
void nsIContentPrefService::setPref |
( |
in nsIVariant |
aGroup, |
|
|
in AString |
aName, |
|
|
in nsIVariant |
aValue | |
|
) |
| | |
Set a pref.
- Parameters:
-
| aGroup | the group for which to set the pref, as an nsIURI from which the hostname will be used, a string (typically in the format of a hostname), or null to set the global pref (applies to all sites) |
| aName | the name of the pref to set |
| aValue | the new value of the pref |
- Exceptions:
-
| NS_ERROR_ILLEGAL_VALUE | if aGroup is not a string, nsIURI, or null |
| NS_ERROR_ILLEGAL_VALUE | if aName is null or an empty string |
Member Data Documentation
The database connection to the content preferences database.
Useful for accessing and manipulating preferences in ways that are caller- specific or for which there is not yet a generic method, although generic functionality useful to multiple callers should generally be added to this unfrozen interface. Also useful for testing the database creation and migration code.
The component that the service uses to determine the groups to which URIs belong.
By default this is the "hostname grouper", which groups URIs by full hostname (a.k.a. site).
The documentation for this interface was generated from the following file: