Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIUrlClassifierDBService Interface Reference

This is a proxy class that is instantiated and called from the JS thread. More...

import "nsIUrlClassifierDBService.idl";

Inheritance diagram for nsIUrlClassifierDBService:
Inheritance graph
[legend]
Collaboration diagram for nsIUrlClassifierDBService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void exists (in ACString tableName, in ACString key, in nsIUrlClassifierCallback c)
 Looks up a key in the database.
void checkTables (in ACString tableNames, in nsIUrlClassifierCallback c)
 Checks to see if the tables exist.
void updateTables (in ACString updateString, in nsIUrlClassifierCallback c)
 Updates the table in the background.
void update (in ACString updateChunk)
 Update the table incrementally.
void finish (in nsIUrlClassifierCallback c)
 Finish an incremental update.
void cancelStream ()
 Cancel an incremental update.

Detailed Description

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.

Definition at line 53 of file nsIUrlClassifierDBService.idl.


Member Function Documentation

Cancel an incremental update.

This rolls back and pending changes. and resets the stream interface.

Checks to see if the tables exist.

tableNames is a comma separated list of table names to check. The callback is called with a comma separated list of tables that no longer exist (either the db is corrupted or the user deleted the file).

void nsIUrlClassifierDBService::exists ( in ACString  tableName,
in ACString  key,
in nsIUrlClassifierCallback  c 
)

Looks up a key in the database.

After it finds a value, it calls callback with the value as the first param. If the key is not in the db or the table does not exist, the callback is called with an empty string parameter.

Finish an incremental update.

This commits any pending tables and calls the callback for each completed table.

void nsIUrlClassifierDBService::update ( in ACString  updateChunk)

Update the table incrementally.

Updates the table in the background.

Calls callback after each table completes processing with the new table line as the parameter. This allows us to keep track of the table version in our main thread.


The documentation for this interface was generated from the following file: