source: box/trunk/lib/backupstore/BackupStoreAccounts.h @ 2534

Revision 2534, 1.4 KB checked in by chris, 3 years ago (diff)

Add code for BackupStoreRefCountDatabase?.

Create a refcount database when creating a new account.

Add an easier way to get the account root directory.

  • Property svn:eol-style set to native
Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    BackupStoreAccounts.h
5//              Purpose: Account management for backup store server
6//              Created: 2003/08/21
7//
8// --------------------------------------------------------------------------
9
10#ifndef BACKUPSTOREACCOUNTS__H
11#define BACKUPSTOREACCOUNTS__H
12
13#include <string>
14
15#include "BackupStoreAccountDatabase.h"
16
17// --------------------------------------------------------------------------
18//
19// Class
20//              Name:    BackupStoreAccounts
21//              Purpose: Account management for backup store server
22//              Created: 2003/08/21
23//
24// --------------------------------------------------------------------------
25class BackupStoreAccounts
26{
27public:
28        BackupStoreAccounts(BackupStoreAccountDatabase &rDatabase);
29        ~BackupStoreAccounts();
30private:
31        BackupStoreAccounts(const BackupStoreAccounts &rToCopy);
32
33public:
34        void Create(int32_t ID, int DiscSet, int64_t SizeSoftLimit, int64_t SizeHardLimit, const std::string &rAsUsername);
35
36        bool AccountExists(int32_t ID);
37        void GetAccountRoot(int32_t ID, std::string &rRootDirOut, int &rDiscSetOut) const;
38        static std::string GetAccountRoot(const
39                BackupStoreAccountDatabase::Entry &rEntry)
40        {
41                return MakeAccountRootDir(rEntry.GetID(), rEntry.GetDiscSet());
42        }
43
44private:
45        static std::string MakeAccountRootDir(int32_t ID, int DiscSet);
46
47private:
48        BackupStoreAccountDatabase &mrDatabase;
49};
50
51#endif // BACKUPSTOREACCOUNTS__H
52
Note: See TracBrowser for help on using the repository browser.