Static Public Member Functions

QctGarbageCollector Class Reference

Simple interface to contactsd's garbage collection plugin. More...

#include <garbagecollector.h>

List of all members.

Static Public Member Functions

static bool registerQuery (const QString &id, const QString &query)
static bool trigger (const QString &id, double load)

Detailed Description

Simple interface to contactsd's garbage collection plugin.

The QctGarbageCollector class allows you to register and run garbage collection queries with contactsd's gargage collection plugin. The GC mechanism consists of two steps: first, the query must be registered with a unique identifier using the registerQuery() method, and then the "load" of the query can be augmented using the trigger() method. Queries are initially registered with a load of 0, and their load go back to 0 when the garbage collection query is ran. The garbage collection query is run when the load of a query reaches 1 (there is a small delay between the moment when the load reaches 1 and the actual garbage collection, to ease the load on the device).


Member Function Documentation

static bool QctGarbageCollector::registerQuery ( const QString &  id,
const QString &  query 
) [static]

Registers a new query againt the garbage collector

The id of the query should be a name unique accross all applications, one possible solution is to use the DBus name of the application. More than one query per application can be registered, but they all need to have a unique id. Registering a new query with an existing id will overwrite the old one.

static bool QctGarbageCollector::trigger ( const QString &  id,
double  load 
) [static]

Increases the load of a query

When the load of the query reaches 1, garbage collection will be triggered.


The documentation for this class was generated from the following file:
 All Classes Functions