Ignore:
Timestamp:
13/09/2008 16:31:26 (3 years ago)
Author:
chris
Message:

Allow undelete command to work on files as well as directories.

Add delete command that works on files and directories.

Document both commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupquery/BackupQueries.h

    r2263 r2283  
    3131{ 
    3232public: 
    33         BackupQueries(BackupProtocolClient &rConnection, const Configuration &rConfiguration); 
     33        BackupQueries(BackupProtocolClient &rConnection, 
     34                const Configuration &rConfiguration, 
     35                bool readWrite); 
    3436        ~BackupQueries(); 
    3537private: 
     
    5557        void CommandRestore(const std::vector<std::string> &args, const bool *opts); 
    5658        void CommandUndelete(const std::vector<std::string> &args, const bool *opts); 
     59        void CommandDelete(const std::vector<std::string> &args, 
     60                const bool *opts); 
    5761        void CommandUsage(); 
    58         void CommandUsageDisplayEntry(const char *Name, int64_t Size, int64_t HardLimit, int32_t BlockSize); 
     62        void CommandUsageDisplayEntry(const char *Name, int64_t Size, 
     63                int64_t HardLimit, int32_t BlockSize); 
    5964        void CommandHelp(const std::vector<std::string> &args); 
    6065 
    6166        // Implementations 
    62         void List(int64_t DirID, const std::string &rListRoot, const bool *opts, bool FirstLevel); 
     67        void List(int64_t DirID, const std::string &rListRoot, const bool *opts, 
     68                bool FirstLevel); 
    6369         
    6470public: 
     
    106112 
    107113        // Utility functions 
    108         int64_t FindDirectoryObjectID(const std::string &rDirName, bool AllowOldVersion = false, 
    109                 bool AllowDeletedDirs = false, std::vector<std::pair<std::string, int64_t> > *pStack = 0); 
     114        int64_t FindDirectoryObjectID(const std::string &rDirName, 
     115                bool AllowOldVersion = false, bool AllowDeletedDirs = false, 
     116                std::vector<std::pair<std::string, int64_t> > *pStack = 0); 
     117        int64_t FindFileID(const std::string& rNameOrIdString, 
     118                const bool *opts, int64_t *pDirIdOut, 
     119                std::string* pFileNameOut, int16_t flagsInclude, 
     120                int16_t flagsExclude, int16_t* pFlagsOut); 
    110121        int64_t GetCurrentDirectoryID(); 
    111122        std::string GetCurrentDirectoryName(); 
     
    113124 
    114125private: 
     126        bool mReadWrite; 
    115127        BackupProtocolClient &mrConnection; 
    116128        const Configuration &mrConfiguration; 
Note: See TracChangeset for help on using the changeset viewer.