23 #ifndef STORAGEBOOKER_H
24 #define STORAGEBOOKER_H
27 #include <QStringList>
59 const QString &aClientId =
"");
72 const QString &aClientId =
"");
98 const QString &aClientId =
"")
const;
107 const QString &aClientId =
"")
const;
111 struct StorageMapItem {
115 StorageMapItem() : iRefCount(0) { };
117 StorageMapItem(
const QString &aClientId) :
118 iClientId(aClientId), iRefCount(1) { };
123 mutable QMutex iMutex;
A helper class for managing storage reservations.
Definition: StorageBooker.h:37
unsigned releaseStorage(const QString &aStorageName)
Releases the given storage.
Definition: StorageBooker.cpp:90
void releaseStorages(const QStringList &aStorageNames)
Releases the given storages.
Definition: StorageBooker.cpp:113
StorageBooker()
Constructor.
Definition: StorageBooker.cpp:29
bool reserveStorages(const QStringList &aStorageNames, const QString &aClientId="")
Tries to reserve multiple storages for the given client.
Definition: StorageBooker.cpp:70
bool isStorageAvailable(const QString &aStorageName, const QString &aClientId="") const
Checks if the given storage is available for the given client.
Definition: StorageBooker.cpp:124
bool reserveStorage(const QString &aStorageName, const QString &aClientId="")
Tries to reserve one storage for the given client.
Definition: StorageBooker.cpp:40
~StorageBooker()
Destructor.
Definition: StorageBooker.cpp:35
bool storagesAvailable(const QStringList &aStorageNames, const QString &aClientId="") const
Checks if the given storages are available for the given client.
Definition: StorageBooker.cpp:137