Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | #include "nsIFile.idl" |
michael@0 | 8 | |
michael@0 | 9 | // Note that the PrefixSet name is historical and we do properly support |
michael@0 | 10 | // duplicated values, so it's really a Prefix Trie. |
michael@0 | 11 | // All methods are thread-safe. |
michael@0 | 12 | [scriptable, uuid(3d8579f0-75fa-4e00-ba41-38661d5b5d17)] |
michael@0 | 13 | interface nsIUrlClassifierPrefixSet : nsISupports |
michael@0 | 14 | { |
michael@0 | 15 | // Initialize the PrefixSet. Give it a name for memory reporting. |
michael@0 | 16 | void init(in ACString aName); |
michael@0 | 17 | // Fills the PrefixSet with the given array of prefixes. |
michael@0 | 18 | // Can send an empty Array to clear the tree. |
michael@0 | 19 | // Requires array to be sorted. |
michael@0 | 20 | void setPrefixes([const, array, size_is(aLength)] in unsigned long aPrefixes, |
michael@0 | 21 | in unsigned long aLength); |
michael@0 | 22 | void getPrefixes(out unsigned long aCount, |
michael@0 | 23 | [array, size_is(aCount), retval] out unsigned long aPrefixes); |
michael@0 | 24 | // Do a lookup in the PrefixSet, return whether the value is present. |
michael@0 | 25 | boolean contains(in unsigned long aPrefix); |
michael@0 | 26 | boolean isEmpty(); |
michael@0 | 27 | void loadFromFile(in nsIFile aFile); |
michael@0 | 28 | void storeToFile(in nsIFile aFile); |
michael@0 | 29 | }; |