Struct xpcom::interfaces::nsIUrlClassifierDBService [] [src]

#[repr(C)]
pub struct nsIUrlClassifierDBService { /* fields omitted */ }

interface nsIUrlClassifierDBService : nsISupports

/**
 * This is a proxy class that is instantiated and called from the JS thread.
 * It provides async methods for querying and updating the database.  As the
 * methods complete, they call the callback function.
 */

Methods

impl nsIUrlClassifierDBService
[src]

[src]

Cast this nsIUrlClassifierDBService to one of its base interfaces.

impl nsIUrlClassifierDBService
[src]

[src]

/**
   * Looks up a URI in the specified tables.
   *
   * @param principal: The principal containing the URI to search.
   * @param c: The callback will be called with a comma-separated list
   *        of tables to which the key belongs.
   */

void lookup (in nsIPrincipal principal, in ACString tables, in nsIUrlClassifierCallback c);

[src]

/**
   * Lists the tables along with their meta info in the following format:
   *
   *   tablename;[metadata]\n
   *   tablename2;[metadata]\n
   *
   * For v2 tables, the metadata is the chunks info such as
   *
   *   goog-phish-shavar;a:10,14,30-40s:56,67
   *   goog-unwanted-shavar;a:1-3,5
   *
   * For v4 tables, base64 encoded state is currently the only info in the
   * metadata (can be extended whenever necessary). For exmaple,
   *
   *   goog-phish-proto;Cg0IARAGGAEiAzAwMTABEKqTARoCGAjT1gDD:oCGAjT1gDD\n
   *   goog-malware-proto;Cg0IAhAGGAEiAzAwMTABENCQARoCGAjx5Yty:BENCQARoCGAj\n
   *
   * Note that the metadata is colon-separated.
   *
   */

void getTables (in nsIUrlClassifierCallback c);

[src]

/**
   * Set the nsIUrlClassifierCompleter object for a given table.  This
   * object will be used to request complete versions of partial
   * hashes.
   */

void setHashCompleter (in ACString tableName, in nsIUrlClassifierHashCompleter completer);

[src]

/**
   * Forget the results that were used in the last DB update.
   */

void clearLastResults ();

[src]

/**
   * Begin an update process.  Will throw NS_ERROR_NOT_AVAILABLE if there
   * is already an update in progress.
   *
   * @param updater The update observer tied to this update.
   * @param tables A comma-separated list of tables included in this update.
   */

void beginUpdate (in nsIUrlClassifierUpdateObserver updater, in ACString tables);

[src]

/**
   * Begin a stream update.  This should be called once per url being
   * fetched.
   *
   * @param table The table the contents of this stream will be associated
   *              with, or empty for the initial stream.
   */

void beginStream (in ACString table);

[src]

/**
   * Update the table incrementally.
   */

void updateStream (in ACString updateChunk);

[src]

/**
   * Finish an individual stream update.  Must be called for every
   * beginStream() call, before the next beginStream() or finishUpdate().
   *
   * The update observer's streamFinished will be called once the
   * stream has been processed.
   */

void finishStream ();

[src]

/**
   * Finish an incremental update.  This will attempt to commit any
   * pending changes and resets the update interface.
   *
   * The update observer's updateSucceeded or updateError methods
   * will be called when the update has been processed.
   */

void finishUpdate ();

[src]

/**
   * Cancel an incremental update.  This rolls back any pending changes.
   * and resets the update interface.
   *
   * The update observer's updateError method will be called when the
   * update has been rolled back.
   */

void cancelUpdate ();

[src]

/**
   * Reset the url-classifier database.  This call will delete the existing
   * database, emptying all tables.  Mostly intended for use in unit tests.
   */

void resetDatabase ();

[src]

/**
   * Reload he url-classifier database. This will empty all cache for
   * completions from gethash, and reload it from database. Mostly intended
   * for use in tests.
   */

void reloadDatabase ();

[src]

/**
   * Empty all the caches.
   */

void clearCache ();

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIUrlClassifierDBService
[src]

IID: nsIID = nsID(2049277986, 26469, 4581, [179, 121, 179, 123, 31, 35, 84, 190])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIUrlClassifierDBService
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIUrlClassifierDBService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.