summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreFile.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-02-13 23:29:27 +0000
committerChris Wilson <chris+github@qwirx.com>2014-02-13 23:29:27 +0000
commitba952ab7cd6fddd1a7754544e4322ceb707e2244 (patch)
tree6dcbededdcc49197626391b9b09ae72ff86f7e7e /lib/backupstore/BackupStoreFile.h
parent7350aca3277d84d4818ecb34fb38bc24f9f72710 (diff)
Add a shortcut interface to uploading a new file.
Useful in tests.
Diffstat (limited to 'lib/backupstore/BackupStoreFile.h')
-rw-r--r--lib/backupstore/BackupStoreFile.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/backupstore/BackupStoreFile.h b/lib/backupstore/BackupStoreFile.h
index 7c72e010..8e2cefb6 100644
--- a/lib/backupstore/BackupStoreFile.h
+++ b/lib/backupstore/BackupStoreFile.h
@@ -14,6 +14,7 @@
#include <memory>
#include <cstdlib>
+#include "autogen_BackupProtocol.h"
#include "BackupClientFileAttributes.h"
#include "BackupStoreFilename.h"
#include "IOStream.h"
@@ -40,6 +41,8 @@ class RunStatusProvider;
// Have some memory allocation commands, note closing "Off" at end of file.
#include "MemLeakFindOn.h"
+class BackupStoreFileEncodeStream;
+
// --------------------------------------------------------------------------
//
// Class
@@ -60,8 +63,6 @@ public:
virtual bool IsManaged() = 0;
};
-class BackupStoreFileEncodeStream;
-
// --------------------------------------------------------------------------
//
// Class
@@ -139,6 +140,16 @@ public:
int64_t *pModificationTime = 0,
bool *pIsCompletelyDifferent = 0
);
+ // Shortcut interface
+ static int64_t QueryStoreFileDiff(BackupProtocolCallable& protocol,
+ const std::string& LocalFilename, int64_t DirectoryObjectID,
+ int64_t DiffFromFileID, int64_t AttributesHash,
+ const BackupStoreFilenameClear& StoreFilename,
+ int Timeout = IOStream::TimeOutInfinite,
+ DiffTimer *pDiffTimer = NULL,
+ ReadLoggingStream::Logger* pLogger = NULL,
+ RunStatusProvider* pRunStatusProvider = NULL);
+
static bool VerifyEncodedFileFormat(IOStream &rFile, int64_t *pDiffFromObjectIDOut = 0, int64_t *pContainerIDOut = 0);
static void CombineFile(IOStream &rDiff, IOStream &rDiff2, IOStream &rFrom, IOStream &rOut);
static void CombineDiffs(IOStream &rDiff1, IOStream &rDiff2, IOStream &rDiff2b, IOStream &rOut);