Buteo Synchronization Framework
|
Class for queuing sync sessions. More...
#include <SyncQueue.h>
Public Member Functions | |
void | enqueue (SyncSession *aSession) |
Adds a new profile to the queue. Queue is sorted automatically. | |
SyncSession * | dequeue (const QString &aProfileName) |
Removes the sync session corresponding to the profile name and returns it. | |
SyncSession * | dequeue () |
Removes the first item from the queue and returns it. | |
SyncSession * | head () |
Returns the first item in the queue but does not remove it. | |
bool | isEmpty () const |
Checks if the queue is empty. | |
int | size () const |
Current size of the sync queue. | |
bool | contains (const QString &aProfileName) const |
Checks if a profile with the given name is in the queue. | |
const QList< SyncSession * > & | getQueuedSyncSessions () const |
Returns as a const reference, the list of all SyncSessions currently queued. | |
Class for queuing sync sessions.
The queue is sorted every time when new items are added to it, so that the sync sessions with highest priority will be at the front of the queue.
bool SyncQueue::contains | ( | const QString & | aProfileName | ) | const |
Checks if a profile with the given name is in the queue.
SyncSession * SyncQueue::dequeue | ( | ) |
Removes the first item from the queue and returns it.
SyncSession * SyncQueue::dequeue | ( | const QString & | aProfileName | ) |
Removes the sync session corresponding to the profile name and returns it.
void SyncQueue::enqueue | ( | SyncSession * | aSession | ) |
Adds a new profile to the queue. Queue is sorted automatically.
aSession | Session to add to queue |
const QList< SyncSession * > & SyncQueue::getQueuedSyncSessions | ( | ) | const |
Returns as a const reference, the list of all SyncSessions currently queued.
SyncSession * SyncQueue::head | ( | ) |
Returns the first item in the queue but does not remove it.
bool SyncQueue::isEmpty | ( | ) | const |
Checks if the queue is empty.
int SyncQueue::size | ( | ) | const |
Current size of the sync queue.