2002-07-18 09:09:10 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-09-29 06:35:42 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2013-09-23 21:29:27 +04:00
|
|
|
|
|
|
|
interface nsISimpleEnumerator;
|
1999-09-29 06:35:42 +04:00
|
|
|
|
2002-07-18 09:09:10 +04:00
|
|
|
/*
|
|
|
|
* nsICategoryManager
|
|
|
|
*/
|
|
|
|
|
2010-06-24 22:31:18 +04:00
|
|
|
[scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)]
|
1999-09-29 06:35:42 +04:00
|
|
|
interface nsICategoryManager : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get the value for the given category's entry.
|
|
|
|
* @param aCategory The name of the category ("protocol")
|
|
|
|
* @param aEntry The entry you're looking for ("http")
|
|
|
|
* @return The value.
|
|
|
|
*/
|
|
|
|
string getCategoryEntry(in string aCategory, in string aEntry);
|
|
|
|
|
2010-06-24 22:31:18 +04:00
|
|
|
/**
|
|
|
|
* Add an entry to a category.
|
|
|
|
* @param aCategory The name of the category ("protocol")
|
|
|
|
* @param aEntry The entry to be added ("http")
|
|
|
|
* @param aValue The value for the entry ("moz.httprulez.1")
|
|
|
|
* @param aPersist Should this data persist between invocations?
|
|
|
|
* @param aReplace Should we replace an existing entry?
|
|
|
|
* @return Previous entry, if any
|
|
|
|
*/
|
|
|
|
string addCategoryEntry(in string aCategory, in string aEntry,
|
|
|
|
in string aValue, in boolean aPersist,
|
|
|
|
in boolean aReplace);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete an entry from the category.
|
|
|
|
* @param aCategory The name of the category ("protocol")
|
|
|
|
* @param aEntry The entry to be added ("http")
|
|
|
|
* @param aPersist Delete persistent data from registry, if present?
|
|
|
|
*/
|
|
|
|
void deleteCategoryEntry(in string aCategory, in string aEntry,
|
|
|
|
in boolean aPersist);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete a category and all entries.
|
|
|
|
* @param aCategory The category to be deleted.
|
|
|
|
*/
|
|
|
|
void deleteCategory(in string aCategory);
|
|
|
|
|
1999-09-29 06:35:42 +04:00
|
|
|
/**
|
|
|
|
* Enumerate the entries in a category.
|
|
|
|
* @param aCategory The category to be enumerated.
|
2003-06-18 15:26:27 +04:00
|
|
|
* @return a simple enumerator, each result QIs to
|
|
|
|
* nsISupportsCString.
|
1999-09-29 06:35:42 +04:00
|
|
|
*/
|
1999-10-16 00:51:38 +04:00
|
|
|
nsISimpleEnumerator enumerateCategory(in string aCategory);
|
1999-09-29 06:35:42 +04:00
|
|
|
|
|
|
|
/**
|
2003-06-18 15:26:27 +04:00
|
|
|
* Enumerate all existing categories
|
2002-06-15 01:33:05 +04:00
|
|
|
* @param aCategory The category to be enumerated.
|
2003-06-18 15:26:27 +04:00
|
|
|
* @return a simple enumerator, each result QIs to
|
|
|
|
* nsISupportsCString.
|
1999-09-29 06:35:42 +04:00
|
|
|
*/
|
2002-06-15 01:33:05 +04:00
|
|
|
nsISimpleEnumerator enumerateCategories();
|
1999-09-29 06:35:42 +04:00
|
|
|
};
|
2000-02-06 03:57:11 +03:00
|
|
|
|