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 --- .../antitracking/nsITrackingDBService.idl | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 toolkit/components/antitracking/nsITrackingDBService.idl (limited to 'toolkit/components/antitracking/nsITrackingDBService.idl') diff --git a/toolkit/components/antitracking/nsITrackingDBService.idl b/toolkit/components/antitracking/nsITrackingDBService.idl new file mode 100644 index 0000000000..12faad0ba4 --- /dev/null +++ b/toolkit/components/antitracking/nsITrackingDBService.idl @@ -0,0 +1,65 @@ +/* -*- 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" + +interface nsIPrincipal; +interface nsIAsyncInputStream; + +[scriptable, uuid(650934db-1939-4424-be26-6ffb0375424d)] +interface nsITrackingDBService : nsISupports +{ + /** + * Record entries from a content blocking log in the tracking database. + * This function is typically called at the end of the document lifecycle, + * since calling it multiple times results in multiple new entries. + * + * @param data a json string containing the content blocking log. + */ + void recordContentBlockingLog(in ACString data); + + /** + * Save new events in the content blocking database + * @param data a json string containing the content blocking log. + */ + Promise saveEvents(in AString data); + + /** + * Clear all content blocking database entries. + */ + Promise clearAll(); + + /** + * Clear all content blocking database entries added since the specified time. + * @param since a unix timestamp representing the number of milliseconds from + * Jan 1, 1970 00:00:00 UTC. + */ + Promise clearSince(in int64_t since); + + /** + * Fetch events from the content blocking database + * @param dateFrom a unix timestamp. + * @param dateTo a unix timestamp. + */ + Promise getEventsByDateRange(in int64_t dateFrom, in int64_t dateTo); + + /** + * Return a count of all tracking events. + */ + Promise sumAllEvents(); + + /** + * Return the earliest recorded date. + */ + Promise getEarliestRecordedDate(); + + const unsigned long OTHER_COOKIES_BLOCKED_ID = 0; + const unsigned long TRACKERS_ID = 1; + const unsigned long TRACKING_COOKIES_ID = 2; + const unsigned long CRYPTOMINERS_ID = 3; + const unsigned long FINGERPRINTERS_ID = 4; + const unsigned long SOCIAL_ID = 5; + const unsigned long SUSPICIOUS_FINGERPRINTERS_ID = 6; +}; -- cgit v1.2.3