diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-12 11:47:12 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-12 11:47:12 +0000 |
commit | 8e09c99c396ca87ac4c9f79a8e2ff8c95c705f37 (patch) | |
tree | 5309dd4afe41958dd5832ba065b487f21483c95b | |
parent | dc4ba0969146c6c4a82b1dace6bd9b11b818bcc9 (diff) |
Add missing BackgroundTask header
-rw-r--r-- | lib/backupstore/BackgroundTask.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/backupstore/BackgroundTask.h b/lib/backupstore/BackgroundTask.h new file mode 100644 index 00000000..bae9162f --- /dev/null +++ b/lib/backupstore/BackgroundTask.h @@ -0,0 +1,39 @@ +// -------------------------------------------------------------------------- +// +// File +// Name: BackgroundTask.h +// Purpose: Declares the BackgroundTask interface. +// Created: 2014/04/07 +// +// -------------------------------------------------------------------------- + +#ifndef BACKGROUNDTASK__H +#define BACKGROUNDTASK__H + +// -------------------------------------------------------------------------- +// +// Class +// Name: BackgroundTask +// Purpose: Provides a RunBackgroundTask() method which allows +// background tasks such as polling the command socket +// to happen while a file is being uploaded. If it +// returns false, the current task should be aborted. +// Created: 2014/04/07 +// +// -------------------------------------------------------------------------- +class BackgroundTask +{ + public: + enum State { + Unknown = 0, + Scanning_Dirs, + Searching_Blocks, + Uploading_Full, + Uploading_Patch, + }; + virtual ~BackgroundTask() { } + virtual bool RunBackgroundTask(State state, uint64_t progress, + uint64_t maximum) = 0; +}; + +#endif // BACKGROUNDTASK__H |