WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIContentPrefService

IID:5b1f6044-72f8-4920-9043-0c52d0ae4f4c
Inherits From:nsISupports

This interface is intended to be used as a service.

This interface is implemented by the following components:


Properties

readonly nsIContentURIGrouper grouper


Methods

void addObserver ( AString name , nsIContentPrefObserver observer ) nsIVariant getPref ( nsIURI URI , AString name ) nsIPropertyBag2 getPrefs ( nsIURI URI ) PRBool hasPref ( nsIURI URI , AString name ) void removeObserver ( AString name , nsIContentPrefObserver observer ) void removePref ( nsIURI URI , AString name ) void setPref ( nsIURI URI , AString name , nsIVariant value )

void addObserver ( AString name , nsIContentPrefObserver observer )

Add an observer.

Arguments:
name: the setting to observe, or null to add a generic observer that observes all settings
observer: the observer to add

nsIVariant getPref ( nsIURI URI , AString name )

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.

Arguments:
URI: the URI for which to get the pref, or null to get the global pref (applies to all URIs)
name: the name of the pref to get

nsIPropertyBag2 getPrefs ( nsIURI URI )

Get the prefs that apply to the given URI.

Arguments:
URI: the URI for which to retrieve prefs

PRBool hasPref ( nsIURI URI , AString name )

Check whether or not a pref exists.

Arguments:
URI: the URI for which to check for the pref
name: the name of the pref to check for

void removeObserver ( AString name , nsIContentPrefObserver observer )

Remove an observer.

Arguments:
name: the setting being observed, or null to remove a generic observer that observes all settings
observer: the observer to remove

void removePref ( nsIURI URI , AString name )

Remove a pref.

Arguments:
URI: the URI for which to remove the pref
name: the name of the pref to remove

void setPref ( nsIURI URI , AString name , nsIVariant value )

Set a pref.

Arguments:
URI: the URI for which to set the pref, or null to set the global pref (applies to all URIs)
name: the name of the pref to set
value: the new value of the pref

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com