akonadi
#include <session.h>
Inherits QObject.
Signals | |
void | reconnected () |
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* ) ) );
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()
Session::~Session | ( | ) |
Destroys the session.
Definition at line 392 of file session.cpp.
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 Session::clear | ( | ) |
Stops all jobs queued for execution.
Definition at line 422 of file session.cpp.
Session * Session::defaultSession | ( | ) | [static] |
Returns the default session for this thread.
Definition at line 415 of file session.cpp.
void Akonadi::Session::reconnected | ( | ) | [signal] |
This signal is emitted whenever the session has been reconnected to the server (e.g.
after a server crash).
- Since:
- 4.6
QByteArray Session::sessionId | ( | ) | const |
Returns the session identifier.
Definition at line 398 of file session.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:25:22 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.