xpcom/components/nsICategoryManager.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/components/nsICategoryManager.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,69 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsISimpleEnumerator;
    1.12 +
    1.13 +/*
    1.14 + * nsICategoryManager
    1.15 + */
    1.16 +
    1.17 +[scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)]
    1.18 +interface nsICategoryManager : nsISupports
    1.19 +{
    1.20 +    /**
    1.21 +     * Get the value for the given category's entry.
    1.22 +     * @param aCategory The name of the category ("protocol")
    1.23 +     * @param aEntry The entry you're looking for ("http")
    1.24 +     * @return The value.
    1.25 +     */
    1.26 +    string getCategoryEntry(in string aCategory, in string aEntry);
    1.27 +    
    1.28 +    /**
    1.29 +     * Add an entry to a category.
    1.30 +     * @param aCategory The name of the category ("protocol")
    1.31 +     * @param aEntry The entry to be added ("http")
    1.32 +     * @param aValue The value for the entry ("moz.httprulez.1")
    1.33 +     * @param aPersist Should this data persist between invocations?
    1.34 +     * @param aReplace Should we replace an existing entry?
    1.35 +     * @return Previous entry, if any
    1.36 +     */
    1.37 +    string addCategoryEntry(in string aCategory, in string aEntry,
    1.38 +			    in string aValue, in boolean aPersist,
    1.39 +			    in boolean aReplace);
    1.40 +
    1.41 +    /**
    1.42 +     * Delete an entry from the category.
    1.43 +     * @param aCategory The name of the category ("protocol")
    1.44 +     * @param aEntry The entry to be added ("http")
    1.45 +     * @param aPersist Delete persistent data from registry, if present?
    1.46 +     */
    1.47 +    void deleteCategoryEntry(in string aCategory, in string aEntry,
    1.48 +                               in boolean aPersist);
    1.49 +
    1.50 +    /**
    1.51 +     * Delete a category and all entries.
    1.52 +     * @param aCategory The category to be deleted.
    1.53 +     */
    1.54 +    void deleteCategory(in string aCategory);
    1.55 +
    1.56 +    /**
    1.57 +     * Enumerate the entries in a category.
    1.58 +     * @param aCategory The category to be enumerated.
    1.59 +     * @return a simple enumerator, each result QIs to
    1.60 +     *         nsISupportsCString.
    1.61 +     */
    1.62 +    nsISimpleEnumerator enumerateCategory(in string aCategory);
    1.63 +
    1.64 +    /**
    1.65 +     * Enumerate all existing categories
    1.66 +     * @param aCategory The category to be enumerated.
    1.67 +     * @return a simple enumerator, each result QIs to
    1.68 +     *         nsISupportsCString.
    1.69 +     */
    1.70 +    nsISimpleEnumerator enumerateCategories();
    1.71 +};
    1.72 +

mercurial