summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupClientContext.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-08-21 10:41:18 +0000
committerChris Wilson <chris+github@qwirx.com>2008-08-21 10:41:18 +0000
commit2019b57dcbba43e8b3feba9385aec4a25bfa55b2 (patch)
treea669d280e5a15a760f70e4a707b0dbdf03c79dcb /bin/bbackupd/BackupClientContext.cpp
parentaad61cfb4d89c65cafc698da5aa1b6b06a5a232c (diff)
Pass a RunStatusProvider and a ReadLoggingStream::Logger from
BackupDaemon through BackupClientDirectoryRecord, BackupStoreFile and BackupStoreFileEncodeStream to ReadLoggingStream, to allow progress callbacks during file upload and cancelling upload part-way. Implement ReadLoggingStream::Logger in BackupClientDirectoryRecord::SyncParams, which thunks the notifications back to the ProgressNotifier. Add the SysadminNotifier interface from Boxi. Add NotifyIDMapsSetup() to ProgressNotifier. Change BackupClientDirectoryRecord::SyncParams to store references to the individual callback interfaces rather than BackupDaemon. Initialise all members in BackupDaemon. Add ability for BackupDaemon user to override the ProgressNotifier, LocationResolver, SysadminNotifier and RunStatusProvider that will be used during the backup. Make BackupDaemon::Location class public and provide access to the configured locations for Boxi (dangerous, they could be modified without BackupDaemon knowing it).
Diffstat (limited to 'bin/bbackupd/BackupClientContext.cpp')
-rw-r--r--bin/bbackupd/BackupClientContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupClientContext.cpp b/bin/bbackupd/BackupClientContext.cpp
index 47826211..bf923ce3 100644
--- a/bin/bbackupd/BackupClientContext.cpp
+++ b/bin/bbackupd/BackupClientContext.cpp
@@ -41,7 +41,7 @@
// --------------------------------------------------------------------------
BackupClientContext::BackupClientContext
(
- BackupDaemon &rDaemon,
+ LocationResolver &rResolver,
TLSContext &rTLSContext,
const std::string &rHostname,
int Port,
@@ -51,7 +51,7 @@ BackupClientContext::BackupClientContext
std::string ExtendedLogFile,
ProgressNotifier& rProgressNotifier
)
- : mrDaemon(rDaemon),
+ : mrResolver(rResolver),
mrTLSContext(rTLSContext),
mHostname(rHostname),
mPort(Port),
@@ -470,7 +470,7 @@ bool BackupClientContext::FindFilename(int64_t ObjectID, int64_t ContainingDirec
{
// Location name -- look up in daemon's records
std::string locPath;
- if(!mrDaemon.FindLocationPathName(elementName.GetClearFilename(), locPath))
+ if(!mrResolver.FindLocationPathName(elementName.GetClearFilename(), locPath))
{
// Didn't find the location... so can't give the local filename
return false;