michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsISimpleEnumerator; michael@0: michael@0: /* michael@0: * nsICategoryManager michael@0: */ michael@0: michael@0: [scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)] michael@0: interface nsICategoryManager : nsISupports michael@0: { michael@0: /** michael@0: * Get the value for the given category's entry. michael@0: * @param aCategory The name of the category ("protocol") michael@0: * @param aEntry The entry you're looking for ("http") michael@0: * @return The value. michael@0: */ michael@0: string getCategoryEntry(in string aCategory, in string aEntry); michael@0: michael@0: /** michael@0: * Add an entry to a category. michael@0: * @param aCategory The name of the category ("protocol") michael@0: * @param aEntry The entry to be added ("http") michael@0: * @param aValue The value for the entry ("moz.httprulez.1") michael@0: * @param aPersist Should this data persist between invocations? michael@0: * @param aReplace Should we replace an existing entry? michael@0: * @return Previous entry, if any michael@0: */ michael@0: string addCategoryEntry(in string aCategory, in string aEntry, michael@0: in string aValue, in boolean aPersist, michael@0: in boolean aReplace); michael@0: michael@0: /** michael@0: * Delete an entry from the category. michael@0: * @param aCategory The name of the category ("protocol") michael@0: * @param aEntry The entry to be added ("http") michael@0: * @param aPersist Delete persistent data from registry, if present? michael@0: */ michael@0: void deleteCategoryEntry(in string aCategory, in string aEntry, michael@0: in boolean aPersist); michael@0: michael@0: /** michael@0: * Delete a category and all entries. michael@0: * @param aCategory The category to be deleted. michael@0: */ michael@0: void deleteCategory(in string aCategory); michael@0: michael@0: /** michael@0: * Enumerate the entries in a category. michael@0: * @param aCategory The category to be enumerated. michael@0: * @return a simple enumerator, each result QIs to michael@0: * nsISupportsCString. michael@0: */ michael@0: nsISimpleEnumerator enumerateCategory(in string aCategory); michael@0: michael@0: /** michael@0: * Enumerate all existing categories michael@0: * @param aCategory The category to be enumerated. michael@0: * @return a simple enumerator, each result QIs to michael@0: * nsISupportsCString. michael@0: */ michael@0: nsISimpleEnumerator enumerateCategories(); michael@0: }; michael@0: