akonadi
Akonadi::Session Class Reference
A communication session with the Akonadi storage. More...
#include <session.h>
Inherits QObject.
Public Member Functions | |
Session (const QByteArray &sessionId=QByteArray(), QObject *parent=0) | |
~Session () | |
void | clear () |
QByteArray | sessionId () const |
Static Public Member Functions | |
static Session * | defaultSession () |
Protected Member Functions | |
Session (SessionPrivate *d, const QByteArray &sessionId=QByteArray(), QObject *parent=0) |
Detailed Description
A communication session with the Akonadi storage.
Every Job object has to be associated with a Session. The session is responsible of scheduling its jobs. For now only a simple serial execution is implemented (the IMAP-like protocol to communicate with the storage backend is capable of parallel execution on a single session though).
using namespace Akonadi; Session *session = new Session( "mySession" ); CollectionFetchJob *job = new CollectionFetchJob( Collection::root(), CollectionFetchJob::Recursive, session ); connect( job, SIGNAL( result( KJob* ) ), this, SLOT( slotResult( KJob* ) ) );
Definition at line 58 of file session.h.
Constructor & Destructor Documentation
Akonadi::Session::Session | ( | const QByteArray & | sessionId = QByteArray() , |
|
QObject * | parent = 0 | |||
) | [explicit] |
Creates a new session.
- Parameters:
-
sessionId The identifier for this session, will be a random value if empty. parent The parent object.
- See also:
- defaultSession()
Akonadi::Session::~Session | ( | ) |
Destroys the session.
Akonadi::Session::Session | ( | SessionPrivate * | d, | |
const QByteArray & | sessionId = QByteArray() , |
|||
QObject * | parent = 0 | |||
) | [explicit, protected] |
Creates a new session with shared private object.
- Parameters:
-
d The private object. sessionId The identifier for this session, will be a random value if empty. parent The parent object.
- Note:
- This constructor is needed for unit testing only.
Member Function Documentation
void Akonadi::Session::clear | ( | ) |
Stops all jobs queued for execution.
static Session* Akonadi::Session::defaultSession | ( | ) | [static] |
Returns the default session for this thread.
QByteArray Akonadi::Session::sessionId | ( | ) | const |
Returns the session identifier.
The documentation for this class was generated from the following file: