diff options
Diffstat (limited to 'bin/bbackupd/BackupClientContext.h')
-rw-r--r-- | bin/bbackupd/BackupClientContext.h | 69 |
1 files changed, 66 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h index 3933dbed..234868db 100644 --- a/bin/bbackupd/BackupClientContext.h +++ b/bin/bbackupd/BackupClientContext.h @@ -12,6 +12,7 @@ #include "BoxTime.h" #include "BackupClientDeleteList.h" +#include "BackupStoreFile.h" #include "ExcludeList.h" class TLSContext; @@ -31,12 +32,12 @@ class BackupStoreFilenameClear; // Created: 2003/10/08 // // -------------------------------------------------------------------------- -class BackupClientContext +class BackupClientContext : public DiffTimer { public: BackupClientContext(BackupDaemon &rDaemon, TLSContext &rTLSContext, const std::string &rHostname, int32_t AccountNumber, bool ExtendedLogging); - ~BackupClientContext(); + virtual ~BackupClientContext(); private: BackupClientContext(const BackupClientContext &); public: @@ -134,6 +135,60 @@ public: bool &rIsCurrentVersionOut, box_time_t *pModTimeOnServer = 0, box_time_t *pAttributesHashOnServer = 0, BackupStoreFilenameClear *pLeafname = 0); // not const as may connect to server + // -------------------------------------------------------------------------- + // + // Function + // Name: BackupClientContext::SetMaximumDiffingTime() + // Purpose: Sets the maximum time that will be spent diffing a file + // Created: 04/19/2005 + // + // -------------------------------------------------------------------------- + static void SetMaximumDiffingTime(int iSeconds); + + // -------------------------------------------------------------------------- + // + // Function + // Name: BackupClientContext::SetKeepAliveTime() + // Purpose: Sets the time interval for repetitive keep-alive operation + // Created: 04/19/2005 + // + // -------------------------------------------------------------------------- + static void SetKeepAliveTime(int iSeconds); + + // -------------------------------------------------------------------------- + // + // Function + // Name: BackupClientContext::ManageDiffProcess() + // Purpose: Initiates an SSL connection/session keep-alive process + // Created: 04/19/2005 + // + // -------------------------------------------------------------------------- + void ManageDiffProcess(); + + // -------------------------------------------------------------------------- + // + // Function + // Name: BackupClientContext::UnManageDiffProcess() + // Purpose: Suspends an SSL connection/session keep-alive process + // Created: 04/19/2005 + // + // -------------------------------------------------------------------------- + void UnManageDiffProcess(); + + // -------------------------------------------------------------------------- + // + // Function + // Name: BackupClientContext::DoKeepAlive() + // Purpose: Does something inconsequential over the SSL link to + // keep it up, implements DiffTimer interface + // Created: 04/19/2005 + // + // -------------------------------------------------------------------------- + virtual void DoKeepAlive(); + virtual time_t GetTimeMgmtEpoch(); + virtual int GetMaximumDiffingTime(); + virtual int GetKeepaliveTime(); + private: BackupDaemon &mrDaemon; TLSContext &mrTLSContext; @@ -149,8 +204,16 @@ private: bool mStorageLimitExceeded; ExcludeList *mpExcludeFiles; ExcludeList *mpExcludeDirs; + + bool mbIsManaged; + // unix time when diff was started + time_t mTimeMgmtEpoch; + // maximum time to spend diffing, in seconds + int mMaximumDiffTime; + // maximum time of SSL inactivity (keep-alive interval), in seconds + int mKeepAliveTime; + }; #endif // BACKUPCLIENTCONTEXT__H - |