tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIUrlClassifierExceptionList.idl (1507B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #include "nsISupports.idl"
      6 #include "nsIURI.idl"
      7 #include "nsIUrlClassifierExceptionListEntry.idl"
      8 
      9 /**
     10 * Interface for managing URL classifier exception lists.
     11 *
     12 * @see nsIUrlClassifierExceptionListEntry
     13 */
     14 [scriptable, uuid(807535BF-018E-4300-B8D3-4A6405FB9F65)]
     15 interface nsIUrlClassifierExceptionList : nsISupports
     16 {
     17    /**
     18     * Initialize the exception list for a specific feature.
     19     * @param aFeature The feature to initialize the exception list for
     20     */
     21    void init(in ACString aFeature);
     22 
     23    /**
     24     * Add a new exception list entry to the list.
     25     * @param aEntry The exception list entry to add
     26     */
     27    void addEntry(in nsIUrlClassifierExceptionListEntry aEntry);
     28 
     29    /**
     30     * Check if the exception list matches the given URI.
     31     * @param aURI The URI to check
     32     * @param aTopLevelURI The top-level URI to check
     33     * @param aIsPrivateBrowsing Whether the load is in private browsing mode
     34     * @return True if the exception list matches, false otherwise
     35     */
     36    boolean matches(in nsIURI aURI, in nsIURI aTopLevelURI, in boolean aIsPrivateBrowsing);
     37 
     38    /**
     39     * Test-only interface to get all entries in the exception list.
     40     * @return The entries in the exception list
     41     */
     42    Array<nsIUrlClassifierExceptionListEntry> testGetEntries();
     43 };