Changeset 2181 for box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
- Timestamp:
- 28/05/2008 16:24:05 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/bin/bbackupd/BackupClientDirectoryRecord.h
r1801 r2181 97 97 const std::string& rLocalPath, 98 98 int64_t FileSize) = 0; 99 virtual void NotifyDirectoryDeleted( 100 int64_t ObjectID, 101 const std::string& rRemotePath) = 0; 102 virtual void NotifyFileDeleted( 103 int64_t ObjectID, 104 const std::string& rRemotePath) = 0; 99 105 }; 100 106 … … 138 144 SyncParams( 139 145 BackupDaemon &rDaemon, 140 ProgressNotifier &rProgressNotifier,141 146 BackupClientContext &rContext); 142 147 ~SyncParams(); … … 145 150 SyncParams(const SyncParams&); 146 151 SyncParams &operator=(const SyncParams&); 147 ProgressNotifier &mrProgressNotifier;148 152 149 153 public: … … 162 166 box_time_t mUploadAfterThisTimeInTheFuture; 163 167 bool mHaveLoggedWarningAboutFutureFileTimes; 164 165 ProgressNotifier& GetProgressNotifier() const166 {167 return mrProgressNotifier;168 }169 168 }; 170 169 171 void SyncDirectory(SyncParams &rParams, int64_t ContainingDirectoryID, const std::string &rLocalPath, 170 void SyncDirectory(SyncParams &rParams, 171 int64_t ContainingDirectoryID, 172 const std::string &rLocalPath, 173 const std::string &rRemotePath, 172 174 bool ThisDirHasJustBeenCreated = false); 173 175 … … 175 177 void DeleteSubDirectories(); 176 178 BackupStoreDirectory *FetchDirectoryListing(SyncParams &rParams); 177 void UpdateAttributes(SyncParams &rParams, BackupStoreDirectory *pDirOnStore, const std::string &rLocalPath); 178 bool UpdateItems(SyncParams &rParams, const std::string &rLocalPath, BackupStoreDirectory *pDirOnStore, 179 void UpdateAttributes(SyncParams &rParams, 180 BackupStoreDirectory *pDirOnStore, 181 const std::string &rLocalPath); 182 bool UpdateItems(SyncParams &rParams, const std::string &rLocalPath, 183 const std::string &rRemotePath, 184 BackupStoreDirectory *pDirOnStore, 179 185 std::vector<BackupStoreDirectory::Entry *> &rEntriesLeftOver, 180 std::vector<std::string> &rFiles, const std::vector<std::string> &rDirs); 181 int64_t UploadFile(SyncParams &rParams, const std::string &rFilename, const BackupStoreFilename &rStoreFilename, 182 int64_t FileSize, box_time_t ModificationTime, box_time_t AttributesHash, bool NoPreviousVersionOnServer); 183 void SetErrorWhenReadingFilesystemObject(SyncParams &rParams, const char *Filename); 184 void RemoveDirectoryInPlaceOfFile(SyncParams &rParams, BackupStoreDirectory *pDirOnStore, int64_t ObjectID, const std::string &rFilename); 186 std::vector<std::string> &rFiles, 187 const std::vector<std::string> &rDirs); 188 int64_t UploadFile(SyncParams &rParams, 189 const std::string &rFilename, 190 const BackupStoreFilename &rStoreFilename, 191 int64_t FileSize, box_time_t ModificationTime, 192 box_time_t AttributesHash, bool NoPreviousVersionOnServer); 193 void SetErrorWhenReadingFilesystemObject(SyncParams &rParams, 194 const char *Filename); 195 void RemoveDirectoryInPlaceOfFile(SyncParams &rParams, 196 BackupStoreDirectory* pDirOnStore, 197 BackupStoreDirectory::Entry* pEntry, 198 const std::string &rFilename); 185 199 186 200 private: 187 int64_t mObjectID;201 int64_t mObjectID; 188 202 std::string mSubDirName; 189 bool mInitialSyncDone;190 bool mSyncDone;203 bool mInitialSyncDone; 204 bool mSyncDone; 191 205 192 206 // Checksum of directory contents and attributes, used to detect changes 193 207 uint8_t mStateChecksum[MD5Digest::DigestLength]; 194 208 195 std::map<std::string, box_time_t> *mpPendingEntries;196 std::map<std::string, BackupClientDirectoryRecord *> mSubDirectories;209 std::map<std::string, box_time_t> *mpPendingEntries; 210 std::map<std::string, BackupClientDirectoryRecord *> mSubDirectories; 197 211 // mpPendingEntries is a pointer rather than simple a member 198 // variable s, because most of the time it'll be empty. This would waste a lot199 // of memory because of STL allocation policies.212 // variable, because most of the time it'll be empty. This would 213 // waste a lot of memory because of STL allocation policies. 200 214 }; 201 215
Note: See TracChangeset
for help on using the changeset viewer.
