diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-07-31 06:39:26 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-07-31 06:39:26 +0000 |
commit | 33305e22554bff7a14a8f8c3156b6eed8f184d52 (patch) | |
tree | 729c9eb2de6060ae61353b3e78c50beacc86835c /lib/backupstore/BackupStoreInfo.h | |
parent | 7bd7cfd109f11326d17d098973ac6a942aaf1ba5 (diff) |
Refactor BackupStoreInfo to allow creating them without RaidFiles.
They can now be created using a constructor, and written to any IOStream.
Needed for writing them to an S3Store.
Diffstat (limited to 'lib/backupstore/BackupStoreInfo.h')
-rw-r--r-- | lib/backupstore/BackupStoreInfo.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/backupstore/BackupStoreInfo.h b/lib/backupstore/BackupStoreInfo.h index ab63b4f2..ec6cd2cb 100644 --- a/lib/backupstore/BackupStoreInfo.h +++ b/lib/backupstore/BackupStoreInfo.h @@ -80,7 +80,10 @@ private: public: // Create a New account, saving a blank info object to the disc - static void CreateNew(int32_t AccountID, const std::string &rRootDir, int DiscSet, int64_t BlockSoftLimit, int64_t BlockHardLimit); + static void CreateNew(int32_t AccountID, const std::string &rRootDir, int DiscSet, + int64_t BlockSoftLimit, int64_t BlockHardLimit); + BackupStoreInfo(int32_t AccountID, const std::string &FileName, + int64_t BlockSoftLimit, int64_t BlockHardLimit); // Load it from the store static std::auto_ptr<BackupStoreInfo> Load(int32_t AccountID, const std::string &rRootDir, int DiscSet, bool ReadOnly, int64_t *pRevisionID = 0); @@ -94,6 +97,7 @@ public: // Save modified infomation back to store void Save(bool allowOverwrite = true); + void Save(IOStream& rOutStream); // Data access functions int32_t GetAccountID() const {return mAccountID;} |