[Box Backup-commit] COMMIT r2430 - box/trunk/bin/bbackupquery
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Sat Jan 3 18:58:44 GMT 2009
Author: chris
Date: 2009-01-03 18:58:43 +0000 (Sat, 03 Jan 2009)
New Revision: 2430
Modified:
box/trunk/bin/bbackupquery/BackupQueries.cpp
box/trunk/bin/bbackupquery/BackupQueries.h
box/trunk/bin/bbackupquery/BoxBackupCompareParams.h
Log:
Compare API for notification on starting to compare a file or directory.
Modified: box/trunk/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/trunk/bin/bbackupquery/BackupQueries.cpp 2009-01-03 18:57:36 UTC (rev 2429)
+++ box/trunk/bin/bbackupquery/BackupQueries.cpp 2009-01-03 18:58:43 UTC (rev 2430)
@@ -1436,6 +1436,8 @@
void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir,
const std::string &rLocalDir, BoxBackupCompareParams &rParams)
{
+ rParams.NotifyDirComparing(rLocalDir, rStoreDir);
+
// Get info on the local directory
struct stat st;
if(::lstat(rLocalDir.c_str(), &st) != 0)
@@ -1622,6 +1624,8 @@
std::string localPath(MakeFullPath(rLocalDir, fileName));
std::string storePath(rStoreDir + "/" + fileName);
+ rParams.NotifyFileComparing(localPath, storePath);
+
// Does the file exist locally?
string_set_iter_t local(localFiles.find(fileName));
if(local == localFiles.end())
@@ -1631,7 +1635,7 @@
storePath);
}
else
- {
+ {
int64_t fileSize = 0;
struct stat st;
Modified: box/trunk/bin/bbackupquery/BackupQueries.h
===================================================================
--- box/trunk/bin/bbackupquery/BackupQueries.h 2009-01-03 18:57:36 UTC (rev 2429)
+++ box/trunk/bin/bbackupquery/BackupQueries.h 2009-01-03 18:58:43 UTC (rev 2430)
@@ -213,6 +213,11 @@
mExcludedDirs ++;
}
+ virtual void NotifyDirComparing(const std::string& rLocalPath,
+ const std::string& rRemotePath)
+ {
+ }
+
virtual void NotifyDirCompared(
const std::string& rLocalPath,
const std::string& rRemotePath,
@@ -238,7 +243,12 @@
}
}
}
-
+
+ virtual void NotifyFileComparing(const std::string& rLocalPath,
+ const std::string& rRemotePath)
+ {
+ }
+
virtual void NotifyFileCompared(const std::string& rLocalPath,
const std::string& rRemotePath, int64_t NumBytes,
bool HasDifferentAttributes, bool HasDifferentContents,
Modified: box/trunk/bin/bbackupquery/BoxBackupCompareParams.h
===================================================================
--- box/trunk/bin/bbackupquery/BoxBackupCompareParams.h 2009-01-03 18:57:36 UTC (rev 2429)
+++ box/trunk/bin/bbackupquery/BoxBackupCompareParams.h 2009-01-03 18:58:43 UTC (rev 2430)
@@ -90,9 +90,13 @@
const std::string& rRemotePath) = 0;
virtual void NotifyExcludedDir(const std::string& rLocalPath,
const std::string& rRemotePath) = 0;
+ virtual void NotifyDirComparing(const std::string& rLocalPath,
+ const std::string& rRemotePath) = 0;
virtual void NotifyDirCompared(const std::string& rLocalPath,
const std::string& rRemotePath, bool HasDifferentAttributes,
bool modifiedAfterLastSync) = 0;
+ virtual void NotifyFileComparing(const std::string& rLocalPath,
+ const std::string& rRemotePath) = 0;
virtual void NotifyFileCompared(const std::string& rLocalPath,
const std::string& rRemotePath, int64_t NumBytes,
bool HasDifferentAttributes, bool HasDifferentContents,
More information about the Boxbackup-commit
mailing list