diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-09-13 15:31:26 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-09-13 15:31:26 +0000 |
commit | 8bee9612b7ec62bb9eddcba0fdc5efcf3554f91c (patch) | |
tree | e82e638fd7a44d4febbb3deea50492119499a05d /bin/bbackupquery/BackupQueries.h | |
parent | bed534690981df575f5e6000c28c6b7b6c0d84f4 (diff) |
Allow undelete command to work on files as well as directories.
Add delete command that works on files and directories.
Document both commands.
Diffstat (limited to 'bin/bbackupquery/BackupQueries.h')
-rw-r--r-- | bin/bbackupquery/BackupQueries.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/bin/bbackupquery/BackupQueries.h b/bin/bbackupquery/BackupQueries.h index dc2f2126..61124f69 100644 --- a/bin/bbackupquery/BackupQueries.h +++ b/bin/bbackupquery/BackupQueries.h @@ -30,7 +30,9 @@ class ExcludeList; class BackupQueries { public: - BackupQueries(BackupProtocolClient &rConnection, const Configuration &rConfiguration); + BackupQueries(BackupProtocolClient &rConnection, + const Configuration &rConfiguration, + bool readWrite); ~BackupQueries(); private: BackupQueries(const BackupQueries &); @@ -54,12 +56,16 @@ private: void CommandCompare(const std::vector<std::string> &args, const bool *opts); void CommandRestore(const std::vector<std::string> &args, const bool *opts); void CommandUndelete(const std::vector<std::string> &args, const bool *opts); + void CommandDelete(const std::vector<std::string> &args, + const bool *opts); void CommandUsage(); - void CommandUsageDisplayEntry(const char *Name, int64_t Size, int64_t HardLimit, int32_t BlockSize); + void CommandUsageDisplayEntry(const char *Name, int64_t Size, + int64_t HardLimit, int32_t BlockSize); void CommandHelp(const std::vector<std::string> &args); // Implementations - void List(int64_t DirID, const std::string &rListRoot, const bool *opts, bool FirstLevel); + void List(int64_t DirID, const std::string &rListRoot, const bool *opts, + bool FirstLevel); public: class CompareParams @@ -105,13 +111,19 @@ public: private: // Utility functions - int64_t FindDirectoryObjectID(const std::string &rDirName, bool AllowOldVersion = false, - bool AllowDeletedDirs = false, std::vector<std::pair<std::string, int64_t> > *pStack = 0); + int64_t FindDirectoryObjectID(const std::string &rDirName, + bool AllowOldVersion = false, bool AllowDeletedDirs = false, + std::vector<std::pair<std::string, int64_t> > *pStack = 0); + int64_t FindFileID(const std::string& rNameOrIdString, + const bool *opts, int64_t *pDirIdOut, + std::string* pFileNameOut, int16_t flagsInclude, + int16_t flagsExclude, int16_t* pFlagsOut); int64_t GetCurrentDirectoryID(); std::string GetCurrentDirectoryName(); void SetReturnCode(int code) {mReturnCode = code;} private: + bool mReadWrite; BackupProtocolClient &mrConnection; const Configuration &mrConfiguration; bool mQuitNow; |