GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
TaskRunner.h
1
29
#pragma once
30
31
#include "core/GpgFrontendCore.h"
32
#include "core/function/SecureMemoryAllocator.h"
33
#include "core/thread/Task.h"
34
35
namespace
GpgFrontend::Thread
{
36
37
class
GPGFRONTEND_CORE_EXPORT
TaskRunner
:
public
QObject {
38
Q_OBJECT
39
public
:
44
TaskRunner
();
45
50
~
TaskRunner
()
override
;
51
56
void
Start();
57
62
void
Stop();
63
69
auto
GetThread() -> QThread*;
70
77
auto
IsRunning() -> bool;
78
84
void
PostTask(
Task
* task);
85
92
void
PostTask(
const
QString&,
const
Task::TaskRunnable&,
93
const
Task::TaskCallback&, DataObjectPtr);
94
100
auto
RegisterTask(
const
QString&,
const
Task::TaskRunnable&,
101
const
Task::TaskCallback&, DataObjectPtr)
102
->
Task::TaskHandler
;
103
109
void
PostConcurrentTask(
Task
* task);
110
117
void
PostScheduleTask(
Task
* task,
size_t
seconds);
118
119
private
:
120
class
Impl
;
121
SecureUniquePtr<Impl> p_;
122
};
123
}
// namespace GpgFrontend::Thread
GpgFrontend::Thread::TaskRunner::Impl
Definition:
TaskRunner.cpp:35
GpgFrontend::Thread::TaskRunner
Definition:
TaskRunner.h:37
GpgFrontend::Thread::Task::TaskHandler
Definition:
Task.h:47
GpgFrontend::Thread::Task
Definition:
Task.h:39
GpgFrontend::Thread
Definition:
ModuleManager.h:39
src
core
thread
TaskRunner.h
Generated by
1.9.1