Akonadi::Session Class Reference

A communication session with the Akonadi storage. More...

#include <session.h>

Inherits QObject.

List of all members.

Public Member Functions

 Session (const QByteArray &sessionId=QByteArray(), QObject *parent=0)
 ~Session ()
void clear ()
QByteArray sessionId () const

Static Public Member Functions

static SessiondefaultSession ()

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 impleneted (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* ) ) );
Author:
Volker Krause <vkrause@kde.org>

Definition at line 58 of file session.h.


Constructor & Destructor Documentation

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

Definition at line 278 of file session.cpp.

Session::~Session (  ) 

Destroys the session.

Definition at line 292 of file session.cpp.

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.

Definition at line 285 of file session.cpp.


Member Function Documentation

void Session::clear (  ) 

Stops all jobs queued for execution.

Definition at line 322 of file session.cpp.

Session * Session::defaultSession (  )  [static]

Returns the default session for this thread.

Definition at line 315 of file session.cpp.

QByteArray Session::sessionId (  )  const

Returns the session identifier.

Definition at line 298 of file session.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys