[Box Backup-commit] COMMIT r3326 - box/trunk/lib/backupstore
subversion at boxbackup.org
subversion at boxbackup.org
Sat Apr 12 12:47:13 BST 2014
Author: chris
Date: 2014-04-12 12:47:12 +0100 (Sat, 12 Apr 2014)
New Revision: 3326
Added:
box/trunk/lib/backupstore/BackgroundTask.h
Log:
Add missing BackgroundTask header
Added: box/trunk/lib/backupstore/BackgroundTask.h
===================================================================
--- box/trunk/lib/backupstore/BackgroundTask.h (rev 0)
+++ box/trunk/lib/backupstore/BackgroundTask.h 2014-04-12 11:47:12 UTC (rev 3326)
@@ -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
More information about the Boxbackup-commit
mailing list