From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../cascade_bloom_filter/nsICascadeFilter.idl | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl (limited to 'toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl') diff --git a/toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl b/toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl new file mode 100644 index 0000000000..2f6dc37f90 --- /dev/null +++ b/toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl @@ -0,0 +1,28 @@ +/* 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/. */ + +#include "nsISupports.idl" + +/** + * A consumer of a filter cascade, i.e. a cascaded bloom filter as generated by + * https://github.com/mozilla/filter-cascade + */ +[scriptable, uuid(c8d0b0b3-17f8-458b-9264-7b67b288fe79)] +interface nsICascadeFilter : nsISupports { + /** + * Initialize with the data that represents the filter cascade. + * This method can be called repeatedly. + * + * @throws NS_ERROR_INVALID_ARG if the input is malformed. + */ + void setFilterData(in Array data); + + /** + * Check whether a given key is a member of the filter cascade. + * The result can only be relied upon if the key was known at the time of the + * filter generation. If the key is unknown, the method may incorrectly + * return true (due to the probabilistic nature of bloom filters). + */ + boolean has(in ACString key); +}; -- cgit v1.2.3