summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupProtocol.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:08 +0000
committerChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:08 +0000
commitca9ca6db582244658badc8a1ca69a253a0563104 (patch)
tree9f753f93eb8f3ac5622063796141af8ba9e05ed4 /lib/backupstore/BackupProtocol.h
parenta33620130b6cdff94a387d414a665199dec8813d (diff)
Add a Reopen method to BackupProtocolLocal2 for convenience.
Diffstat (limited to 'lib/backupstore/BackupProtocol.h')
-rw-r--r--lib/backupstore/BackupProtocol.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/backupstore/BackupProtocol.h b/lib/backupstore/BackupProtocol.h
index 561c6ccd..43f3e162 100644
--- a/lib/backupstore/BackupProtocol.h
+++ b/lib/backupstore/BackupProtocol.h
@@ -26,6 +26,8 @@ class BackupProtocolLocal2 : public BackupProtocolLocal
{
private:
BackupStoreContext mContext;
+ int32_t mAccountNumber;
+ bool mReadOnly;
public:
BackupProtocolLocal2(int32_t AccountNumber,
@@ -36,7 +38,9 @@ public:
// touch the Context, because it's not initialised yet!
: BackupProtocolLocal(mContext),
mContext(AccountNumber, (HousekeepingInterface *)NULL,
- ConnectionDetails)
+ ConnectionDetails),
+ mAccountNumber(AccountNumber),
+ mReadOnly(ReadOnly)
{
mContext.SetClientHasAccount(AccountRootDir, DiscSetNumber);
QueryVersion(BACKUP_STORE_SERVER_VERSION);
@@ -52,6 +56,13 @@ public:
mContext.ReleaseWriteLock();
return finished;
}
+
+ void Reopen()
+ {
+ QueryVersion(BACKUP_STORE_SERVER_VERSION);
+ QueryLogin(mAccountNumber,
+ mReadOnly ? BackupProtocolLogin::Flags_ReadOnly : 0);
+ }
};
#endif // BACKUPPROTOCOL__H