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
};
44
45
TaskRunnerGetter
(
int
channel =
SingletonFunctionObject::GetDefaultChannel
());
46
47
TaskRunner
*GetTaskRunner(
48
TaskRunnerType runner_type = kTaskRunnerType_Default);
49
50
private
:
51
std::map<TaskRunnerType, TaskRunner *> task_runners_;
52
};
53
54
}
// namespace GpgFrontend::Thread
55
56
#endif // GPGFRONTEND_TASKRUNNERGETTER_H
GpgFrontend::SingletonFunctionObject
Definition:
GpgFunctionObject.h:159
GpgFrontend::Thread::TaskRunner
Definition:
TaskRunner.h:39
GpgFrontend::Thread::TaskRunnerGetter
Definition:
TaskRunnerGetter.h:36
GpgFrontend::Thread
Definition:
CtxCheckTask.h:33
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static int GetDefaultChannel()
Get the Default Channel object.
Definition:
GpgFunctionObject.h:245
GpgFrontend::Thread::TaskRunnerGetter::TaskRunnerGetter
TaskRunnerGetter(int channel=SingletonFunctionObject::GetDefaultChannel())
Definition:
TaskRunnerGetter.cpp:29
src
core
thread
TaskRunnerGetter.h
Generated by
1.8.17