diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-08-15 10:58:21 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-08-15 10:58:21 +0000 |
commit | f3123609167c0e2e621c90e6b1248234cebc8a6e (patch) | |
tree | 3753395dcd00dced0667154212e333f3ff6a5f74 /lib/backupstore | |
parent | 03c4946547d39d4d3c4f32878c47bbd701c6f690 (diff) |
Whitespace, layout and comment cleanups.
Diffstat (limited to 'lib/backupstore')
-rw-r--r-- | lib/backupstore/BackupStoreContext.cpp | 18 | ||||
-rw-r--r-- | lib/backupstore/BackupStoreContext.h | 13 |
2 files changed, 20 insertions, 11 deletions
diff --git a/lib/backupstore/BackupStoreContext.cpp b/lib/backupstore/BackupStoreContext.cpp index 22239532..75e78334 100644 --- a/lib/backupstore/BackupStoreContext.cpp +++ b/lib/backupstore/BackupStoreContext.cpp @@ -70,6 +70,7 @@ BackupStoreContext::BackupStoreContext(int32_t ClientID, { } + // -------------------------------------------------------------------------- // // Function @@ -83,6 +84,7 @@ BackupStoreContext::~BackupStoreContext() ClearDirectoryCache(); } + void BackupStoreContext::ClearDirectoryCache() { // Delete the objects in the cache @@ -94,6 +96,7 @@ void BackupStoreContext::ClearDirectoryCache() mDirectoryCache.clear(); } + // -------------------------------------------------------------------------- // // Function @@ -112,6 +115,7 @@ void BackupStoreContext::CleanUp() } } + // -------------------------------------------------------------------------- // // Function @@ -412,6 +416,7 @@ BackupStoreDirectory &BackupStoreContext::GetDirectoryInternal(int64_t ObjectID, return *pdir; } + // -------------------------------------------------------------------------- // // Function @@ -790,8 +795,11 @@ int64_t BackupStoreContext::AddFile(IOStream &rFile, int64_t InDirectory, // -------------------------------------------------------------------------- // // Function -// Name: BackupStoreContext::DeleteFile(const BackupStoreFilename &, int64_t, int64_t &) -// Purpose: Deletes a file, returning true if the file existed. Object ID returned too, set to zero if not found. +// Name: BackupStoreContext::DeleteFile( +// const BackupStoreFilename &, int64_t, int64_t &) +// Purpose: Deletes a file by name, returning true if the file +// existed. Object ID returned too, set to zero if not +// found. // Created: 2003/10/21 // // -------------------------------------------------------------------------- @@ -1201,6 +1209,7 @@ int64_t BackupStoreContext::AddDirectory(int64_t InDirectory, return id; } + // -------------------------------------------------------------------------- // // Function @@ -1278,6 +1287,7 @@ void BackupStoreContext::DeleteDirectory(int64_t ObjectID, bool Undelete) } } + // -------------------------------------------------------------------------- // // Function @@ -1389,7 +1399,6 @@ void BackupStoreContext::DeleteDirectoryRecurse(int64_t ObjectID, bool Undelete) } - // -------------------------------------------------------------------------- // // Function @@ -1427,6 +1436,7 @@ void BackupStoreContext::ChangeDirAttributes(int64_t Directory, const Streamable } } + // -------------------------------------------------------------------------- // // Function @@ -1915,7 +1925,6 @@ void BackupStoreContext::MoveObject(int64_t ObjectID, int64_t MoveFromDirectory, } - // -------------------------------------------------------------------------- // // Function @@ -1934,4 +1943,3 @@ const BackupStoreInfo &BackupStoreContext::GetBackupStoreInfo() const return *(mapStoreInfo.get()); } - diff --git a/lib/backupstore/BackupStoreContext.h b/lib/backupstore/BackupStoreContext.h index 21488526..48448360 100644 --- a/lib/backupstore/BackupStoreContext.h +++ b/lib/backupstore/BackupStoreContext.h @@ -65,7 +65,7 @@ public: Phase_Login = 1, Phase_Commands = 2 }; - + int GetPhase() const {return mProtocolPhase;} std::string GetPhaseName() const { @@ -81,7 +81,7 @@ public: } } void SetPhase(int NewPhase) {mProtocolPhase = NewPhase;} - + // Read only locking bool SessionIsReadOnly() {return mReadOnly;} bool AttemptToGetWriteLock(); @@ -116,7 +116,7 @@ public: // Client marker int64_t GetClientStoreMarker(); void SetClientStoreMarker(int64_t ClientStoreMarker); - + // Usage information void GetStoreDiscUsageInfo(int64_t &rBlocksUsed, int64_t &rBlocksSoftLimit, int64_t &rBlocksHardLimit); bool HardLimitExceeded(); @@ -138,7 +138,7 @@ public: // merely turns the returned directory const. return GetDirectoryInternal(ObjectID); } - + // Manipulating files/directories int64_t AddFile(IOStream &rFile, int64_t InDirectory, @@ -191,16 +191,17 @@ private: bool mClientHasAccount; std::string mAccountRootDir; // has final directory separator int mStoreDiscSet; + bool mReadOnly; NamedLock mWriteLock; int mSaveStoreInfoDelay; // how many times to delay saving the store info - + // Store info std::auto_ptr<BackupStoreInfo> mapStoreInfo; // Refcount database std::auto_ptr<BackupStoreRefCountDatabase> mapRefCount; - + // Directory cache std::map<int64_t, BackupStoreDirectory*> mDirectoryCache; |