GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
TaskRunnerGetter.h
1 
27 #ifndef GPGFRONTEND_TASKRUNNERGETTER_H
28 #define GPGFRONTEND_TASKRUNNERGETTER_H
29 
30 #include "core/GpgFrontendCore.h"
31 #include "core/GpgFunctionObject.h"
32 #include "core/thread/TaskRunner.h"
33 
34 namespace GpgFrontend::Thread {
35 
36 class GPGFRONTEND_CORE_EXPORT TaskRunnerGetter
37  : public GpgFrontend::SingletonFunctionObject<TaskRunnerGetter> {
38  public:
39  enum TaskRunnerType {
40  kTaskRunnerType_Default,
41  kTaskRunnerType_GPG,
42  kTaskRunnerType_IO,
43  kTaskRunnerType_Network,
44  kTaskRunnerType_External_Process,
45  };
46 
48 
49  TaskRunner *GetTaskRunner(
50  TaskRunnerType runner_type = kTaskRunnerType_Default);
51 
52  private:
53  std::map<TaskRunnerType, TaskRunner *> task_runners_;
54 };
55 
56 } // namespace GpgFrontend::Thread
57 
58 #endif // GPGFRONTEND_TASKRUNNERGETTER_H
Definition: GpgFunctionObject.h:148
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:232
Definition: TaskRunnerGetter.h:37
Definition: TaskRunner.h:40
Definition: CtxCheckTask.h:33