You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


TOC PREV NEXT INDEX

Embedding Gecko API


nsICategoryManager


This interface maintains the list of XPCOM's component categories.It is scriptable.

Methods
getCategoryEntry

Gets the value for the given category's entry.

Syntax:

string nsICategoryManager::getCategoryEntry(
	in string aCategory, in string aEntry) 

Parameters:

aCategory: The name of the category (e.g., "protocol").
aEntry: The entry of interest (e.g., "http").

Returns:

The value.
addCategoryEntry

Adds an entry to a category.

Syntax:

string nsICategoryManager::addCategoryEntry(
	in string aCategory, in string aEntry,in string aValue,
	in boolean aPersist, in boolean aReplace) 

Parameters:

aCategory: The name of the category (e.g., "protocol").
aEntry: The entry of interest (e.g., "http").
aValue: The value for the entry (e.g.,"moz.httprulez.1")
aPersist: TRUE if persistance between invocations is desired.
aReplace: TRUE if an existing entry should be replaced.

Returns:

The previous entry, if any.
deleteCategoryEntry

Deletes an entry from the category.

Syntax:

void nsICategoryManager::deleteCategoryEntry(
	in string aCategory, in string aEntry,
	in boolean aPersist) 

Parameters:

aCategory: The name of the category (e.g., "protocol").
aEntry: The entry of interest (e.g., "http").
aPersist: TRUE if entry, assuming it is present, should be deleted from registry.

nsresult:

NS_OK if successful.
deleteCategory

Deletes a category and all entries.

Syntax:

void nsICategoryManager::deleteCategory(
	in string aCategory) 

Parameters:

aCategory: The name of the category to be deleted (e.g., "protocol").

nsresult:

NS_OK if successful.
enumerateCategory

Gets a list of entries in a category.

Syntax:

nsISimpleEnumerator nsICategoryManager::enumerateCategory(
	in string aCategory) 

Parameters:

aCategory: The name of the category to be enumerated.

Returns:

The list of entries.
enumerateCategories

Gets a list of categories that enumerateCategory can query.

Syntax:

nsISimpleEnumerator nsICategoryManager::enumerateCategories() 

Parameters:

None.

Returns:

The list of categories.

Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX