diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-06-28 19:36:47 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-06-28 19:36:47 +0000 |
commit | 66e4d036cea1eac39394c9064f50eee5c993926a (patch) | |
tree | ec47cc9ad7f593082c50e7ca83d8fa303dfdb1ec /lib/backupstore/BackupStoreAccounts.h | |
parent | 0c41e85dbbaccf0ed07c0277d64d37f0af380be2 (diff) |
Refactor store account control to allow other store types.
Move common code into a base class, leaving bbstored-specific code.
Add skeleton of an S3 store type.
Diffstat (limited to 'lib/backupstore/BackupStoreAccounts.h')
-rw-r--r-- | lib/backupstore/BackupStoreAccounts.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/backupstore/BackupStoreAccounts.h b/lib/backupstore/BackupStoreAccounts.h index 3c2e4210..bcc3cf1c 100644 --- a/lib/backupstore/BackupStoreAccounts.h +++ b/lib/backupstore/BackupStoreAccounts.h @@ -13,6 +13,7 @@ #include <string> #include "BackupStoreAccountDatabase.h" +#include "BackupAccountControl.h" #include "NamedLock.h" // -------------------------------------------------------------------------- @@ -54,20 +55,14 @@ private: class Configuration; class UnixUser; -class BackupStoreAccountsControl +class BackupStoreAccountsControl : public BackupAccountControl { -private: - const Configuration& mConfig; - bool mMachineReadableOutput; - public: BackupStoreAccountsControl(const Configuration& config, - bool machineReadableOutput = false); - - void CheckSoftHardLimits(int64_t SoftLimit, int64_t HardLimit); + bool machineReadableOutput = false) + : BackupAccountControl(config, machineReadableOutput) + { } int BlockSizeOfDiscSet(int discSetNum); - std::string BlockSizeToString(int64_t Blocks, int64_t MaxBlocks, int discSetNum); - int64_t SizeStringToBlocks(const char *string, int discSetNum); bool OpenAccount(int32_t ID, std::string &rRootDirOut, int &rDiscSetOut, std::auto_ptr<UnixUser> apUser, NamedLock* pLock); int SetLimit(int32_t ID, const char *SoftLimitStr, |