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
116 StorageMapItem() : iRefCount(0) { };
118 StorageMapItem(
const QString &aClientId) :
119 iClientId(aClientId), iRefCount(1) { };
124 mutable QMutex iMutex;
130 #endif // STORAGEBOOKER_H
bool reserveStorage(const QString &aStorageName, const QString &aClientId="")
Tries to reserve one storage for the given client.
Definition: StorageBooker.cpp:40
StorageBooker()
Constructor.
Definition: StorageBooker.cpp:29
bool storagesAvailable(const QStringList &aStorageNames, const QString &aClientId="") const
Checks if the given storages are available for the given client.
Definition: StorageBooker.cpp:152
Definition: AccountsHelper.h:31
bool reserveStorages(const QStringList &aStorageNames, const QString &aClientId="")
Tries to reserve multiple storages for the given client.
Definition: StorageBooker.cpp:76
bool isStorageAvailable(const QString &aStorageName, const QString &aClientId="") const
Checks if the given storage is available for the given client.
Definition: StorageBooker.cpp:139
void releaseStorages(const QStringList &aStorageNames)
Releases the given storages.
Definition: StorageBooker.cpp:127
~StorageBooker()
Destructor.
Definition: StorageBooker.cpp:35
A helper class for managing storage reservations.
Definition: StorageBooker.h:36
unsigned releaseStorage(const QString &aStorageName)
Releases the given storage.
Definition: StorageBooker.cpp:100