File: nsIUrlClassifierInfo.idl

package info (click to toggle)
firefox-esr 78.15.0esr-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,301,156 kB
  • sloc: cpp: 5,665,905; javascript: 4,798,386; ansic: 2,878,233; python: 977,004; asm: 270,347; xml: 181,456; java: 111,756; sh: 72,926; makefile: 21,819; perl: 13,380; cs: 4,725; yacc: 4,565; objc: 3,026; pascal: 1,787; lex: 1,720; ada: 1,681; exp: 505; php: 436; lisp: 260; awk: 152; ruby: 103; csh: 80; sed: 53; sql: 45
file content (80 lines) | stat: -rw-r--r-- 2,149 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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);
};