Back to index

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

Interface for the actual worker thread. More...

import "nsIUrlClassifierDBService.idl";

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

List of all members.

Public Member Functions

void closeDb ()
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

Interface for the actual worker thread.

Implementations of this need not be thread aware and just work on the database.

Definition at line 109 of file nsIUrlClassifierDBService.idl.


Member Function Documentation

Cancel an incremental update.

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

void nsIUrlClassifierDBService::checkTables ( in ACString  tableNames,
in nsIUrlClassifierCallback  c 
) [inherited]

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 
) [inherited]

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) [inherited]

Update the table incrementally.

void nsIUrlClassifierDBService::updateTables ( in ACString  updateString,
in nsIUrlClassifierCallback  c 
) [inherited]

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: