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  };
45 
47 
48  TaskRunner *GetTaskRunner(
49  TaskRunnerType runner_type = kTaskRunnerType_Default);
50 
51  private:
52  std::map<TaskRunnerType, TaskRunner *> task_runners_;
53 };
54 
55 } // namespace GpgFrontend::Thread
56 
57 #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:39
Definition: CtxCheckTask.h:33