File: BackgroundTask.h

package info (click to toggle)
boxbackup 0.13~~git20200326.g8e8b63c-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,984 kB
  • sloc: xml: 70,723; cpp: 55,437; ansic: 24,659; perl: 4,844; sh: 4,292; makefile: 629; python: 311
file content (39 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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