summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreAccounts.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backupstore/BackupStoreAccounts.h')
-rw-r--r--lib/backupstore/BackupStoreAccounts.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/backupstore/BackupStoreAccounts.h b/lib/backupstore/BackupStoreAccounts.h
index 3163f15c..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"
// --------------------------------------------------------------------------
@@ -51,5 +52,34 @@ private:
BackupStoreAccountDatabase &mrDatabase;
};
+class Configuration;
+class UnixUser;
+
+class BackupStoreAccountsControl : public BackupAccountControl
+{
+public:
+ BackupStoreAccountsControl(const Configuration& config,
+ bool machineReadableOutput = false)
+ : BackupAccountControl(config, machineReadableOutput)
+ { }
+ int BlockSizeOfDiscSet(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,
+ const char *HardLimitStr);
+ int SetAccountName(int32_t ID, const std::string& rNewAccountName);
+ int PrintAccountInfo(int32_t ID);
+ int SetAccountEnabled(int32_t ID, bool enabled);
+ int DeleteAccount(int32_t ID, bool AskForConfirmation);
+ int CheckAccount(int32_t ID, bool FixErrors, bool Quiet,
+ bool ReturnNumErrorsFound = false);
+ int CreateAccount(int32_t ID, int32_t DiscNumber, int32_t SoftLimit,
+ int32_t HardLimit);
+ int HousekeepAccountNow(int32_t ID);
+};
+
+// max size of soft limit as percent of hard limit
+#define MAX_SOFT_LIMIT_SIZE 97
+
#endif // BACKUPSTOREACCOUNTS__H