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

Add command to undelete a file, to complete the set of commands
implemented by the bbstored server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbstored/BackupCommands.cpp

    r2226 r2282  
    611611// 
    612612// Function 
     613//              Name:    BackupProtocolServerUndeleteFile::DoCommand( 
     614//                       BackupProtocolServer &, BackupStoreContext &) 
     615//              Purpose: Undelete a file 
     616//              Created: 2008-09-12 
     617// 
     618// -------------------------------------------------------------------------- 
     619std::auto_ptr<ProtocolObject> BackupProtocolServerUndeleteFile::DoCommand( 
     620        BackupProtocolServer &rProtocol, BackupStoreContext &rContext) 
     621{ 
     622        CHECK_PHASE(Phase_Commands) 
     623        CHECK_WRITEABLE_SESSION 
     624 
     625        // Context handles this 
     626        bool result = rContext.UndeleteFile(mObjectID, mInDirectory); 
     627 
     628        // return the object ID or zero for not found 
     629        return std::auto_ptr<ProtocolObject>( 
     630                new BackupProtocolServerSuccess(result ? mObjectID : 0)); 
     631} 
     632 
     633 
     634// -------------------------------------------------------------------------- 
     635// 
     636// Function 
    613637//              Name:    BackupProtocolServerDeleteDirectory::DoCommand(BackupProtocolServer &, BackupStoreContext &) 
    614638//              Purpose: Delete a directory 
Note: See TracChangeset for help on using the changeset viewer.