summaryrefslogtreecommitdiffstats
path: root/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /toolkit/components/url-classifier/nsIUrlClassifierInfo.idl
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--toolkit/components/url-classifier/nsIUrlClassifierInfo.idl80
1 files changed, 80 insertions, 0 deletions
diff --git a/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl b/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl
new file mode 100644
index 0000000000..0056d8fc8e
--- /dev/null
+++ b/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl
@@ -0,0 +1,80 @@
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ /* 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"
+#include "nsIArray.idl"
+
+/**
+ * nsIUrlClassifierPositiveCacheEntry Represents a positive cache entry.
+ */
+[scriptable, uuid(b3c27f8c-7db8-4f3f-97a5-5a94d781e565)]
+interface nsIUrlClassifierPositiveCacheEntry : nsISupports {
+ /**
+ * Fullhash for the positive cache entry.
+ */
+ readonly attribute ACString fullhash;
+
+ /**
+ * Positive cache expiry.
+ */
+ readonly attribute long long expiry;
+};
+
+/**
+ * nsIUrlClassifierCacheEntry contains cache information for
+ * a given prefix.
+ */
+[scriptable, uuid(d6297907-8236-4126-adaf-c3aa239a0d40)]
+interface nsIUrlClassifierCacheEntry : nsISupports {
+ /**
+ * Prefix for this cache entry.
+ */
+ readonly attribute ACString prefix;
+
+ /**
+ * Negative cache expiry.
+ */
+ readonly attribute long long expiry;
+
+ /**
+ * An array of nsIUrlClassifierPositiveCacheEntry, each item represents
+ * a positive cache entry with its fullhash and expiry.
+ */
+ readonly attribute nsIArray matches;
+};
+
+/**
+ * Cache information for a given table.
+ */
+[scriptable, function, uuid(69384f24-d9c5-4462-b24e-351c69e3b46a)]
+interface nsIUrlClassifierCacheInfo : nsISupports {
+ /**
+ * Table name.
+ */
+ readonly attribute ACString table;
+
+ /*
+ * An array of nsIUrlClassifierCacheEntry.
+ */
+ readonly attribute nsIArray entries;
+};
+
+[scriptable, uuid(26e12ea4-14ff-4c77-858f-6745998b7659)]
+interface nsIUrlClassifierGetCacheCallback : nsISupports {
+
+ void onGetCacheComplete(in nsIUrlClassifierCacheInfo info);
+};
+
+/**
+ * Interface to query url-classifier information.
+ */
+[scriptable, function, uuid(411bbff4-1b88-4687-aa36-e2bbdd93f6e8)]
+interface nsIUrlClassifierInfo : nsISupports {
+ /**
+ * An asynchronous call to return cache information for the table.
+ */
+ void getCacheInfo(in ACString table,
+ in nsIUrlClassifierGetCacheCallback callback);
+};