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]
pub fn coerce<T: nsIUrlClassifierDBServiceCoerce>(&self) -> &T
[src]
Cast this nsIUrlClassifierDBService
to one of its base interfaces.
impl nsIUrlClassifierDBService
[src]
pub unsafe fn Lookup(
&self,
principal: *const nsIPrincipal,
tables: &nsACString,
c: *const nsIUrlClassifierCallback
) -> nsresult
[src]
&self,
principal: *const nsIPrincipal,
tables: &nsACString,
c: *const nsIUrlClassifierCallback
) -> nsresult
/**
* 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);
pub unsafe fn GetTables(&self, c: *const nsIUrlClassifierCallback) -> nsresult
[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);
pub unsafe fn SetHashCompleter(
&self,
tableName: &nsACString,
completer: *const nsIUrlClassifierHashCompleter
) -> nsresult
[src]
&self,
tableName: &nsACString,
completer: *const nsIUrlClassifierHashCompleter
) -> nsresult
/**
* 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);
pub unsafe fn ClearLastResults(&self) -> nsresult
[src]
/**
* Forget the results that were used in the last DB update.
*/
void clearLastResults ();
pub unsafe fn BeginUpdate(
&self,
updater: *const nsIUrlClassifierUpdateObserver,
tables: &nsACString
) -> nsresult
[src]
&self,
updater: *const nsIUrlClassifierUpdateObserver,
tables: &nsACString
) -> nsresult
/**
* 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);
pub unsafe fn BeginStream(&self, table: &nsACString) -> nsresult
[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);
pub unsafe fn UpdateStream(&self, updateChunk: &nsACString) -> nsresult
[src]
/**
* Update the table incrementally.
*/
void updateStream (in ACString updateChunk);
pub unsafe fn FinishStream(&self) -> nsresult
[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 ();
pub unsafe fn FinishUpdate(&self) -> nsresult
[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 ();
pub unsafe fn CancelUpdate(&self) -> nsresult
[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 ();
pub unsafe fn ResetDatabase(&self) -> nsresult
[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 ();
pub unsafe fn ReloadDatabase(&self) -> nsresult
[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 ();
pub unsafe fn ClearCache(&self) -> nsresult
[src]
/**
* Empty all the caches.
*/
void clearCache ();
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIUrlClassifierDBService
[src]
const IID: nsIID
IID: nsIID = nsID(2049277986, 26469, 4581, [179, 121, 179, 123, 31, 35, 84, 190])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIUrlClassifierDBService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.