diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 10:41:18 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 10:41:18 +0000 |
commit | 2019b57dcbba43e8b3feba9385aec4a25bfa55b2 (patch) | |
tree | a669d280e5a15a760f70e4a707b0dbdf03c79dcb /bin/bbackupd/BackupClientContext.h | |
parent | aad61cfb4d89c65cafc698da5aa1b6b06a5a232c (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.h')
-rw-r--r-- | bin/bbackupd/BackupClientContext.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h index 0e82cf24..e25c7244 100644 --- a/bin/bbackupd/BackupClientContext.h +++ b/bin/bbackupd/BackupClientContext.h @@ -29,6 +29,24 @@ class BackupStoreFilenameClear; // -------------------------------------------------------------------------- // // Class +// Name: LocationResolver +// Purpose: Interface for classes that can resolve locations to paths, +// like BackupDaemon +// Created: 2003/10/08 +// +// -------------------------------------------------------------------------- +class LocationResolver +{ +public: + virtual ~LocationResolver() { } + virtual bool FindLocationPathName(const std::string &rLocationName, + std::string &rPathOut) const = 0; +}; + + +// -------------------------------------------------------------------------- +// +// Class // Name: BackupClientContext // Purpose: // Created: 2003/10/08 @@ -39,7 +57,7 @@ class BackupClientContext : public DiffTimer public: BackupClientContext ( - BackupDaemon &rDaemon, + LocationResolver &rResolver, TLSContext &rTLSContext, const std::string &rHostname, int32_t Port, @@ -207,7 +225,7 @@ public: } private: - BackupDaemon &mrDaemon; + LocationResolver &mrResolver; TLSContext &mrTLSContext; std::string mHostname; int mPort; |