GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgCommandExecutor.h
1
29
#ifndef GPGFRONTEND_ZH_CN_TS_GPGCOMMANDEXECUTOR_H
30
#define GPGFRONTEND_ZH_CN_TS_GPGCOMMANDEXECUTOR_H
31
32
#ifndef WINDOWS
33
#include <boost/process.hpp>
34
#endif
35
36
#include "core/GpgContext.h"
37
#include "core/GpgFunctionObject.h"
38
39
namespace
GpgFrontend
{
40
45
class
GPGFRONTEND_CORE_EXPORT
GpgCommandExecutor
46
:
public
SingletonFunctionObject
<GpgCommandExecutor> {
47
public
:
53
explicit
GpgCommandExecutor
(
54
int
channel =
SingletonFunctionObject::GetDefaultChannel
());
55
56
#ifndef WINDOWS
57
64
void
Execute(StringArgsRef arguments,
65
const
std::function<
void
(boost::process::async_pipe &in,
66
boost::process::async_pipe &out)>
67
&interact_func);
68
#endif
69
70
private
:
71
GpgContext
&ctx_ =
GpgContext::GetInstance
(
72
SingletonFunctionObject::GetChannel
());
73
};
74
75
}
// namespace GpgFrontend
76
77
#endif // GPGFRONTEND_ZH_CN_TS_GPGCOMMANDEXECUTOR_H
GpgFrontend::SingletonFunctionObject
Definition:
GpgFunctionObject.h:148
GpgFrontend::GpgCommandExecutor
Extra commands related to GPG.
Definition:
GpgCommandExecutor.h:45
GpgFrontend
Definition:
CoreCommonUtil.cpp:29
GpgFrontend::SingletonFunctionObject< GpgContext >::GetInstance
static GpgContext & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition:
GpgFunctionObject.h:170
GpgFrontend::SingletonFunctionObject::GetChannel
int GetChannel() const
Get the Channel object.
Definition:
GpgFunctionObject.h:239
GpgFrontend::GpgContext
Definition:
GpgContext.h:59
GpgFrontend::GpgCommandExecutor::GpgCommandExecutor
GpgCommandExecutor(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Gpg Command Executor object.
Definition:
GpgCommandExecutor.cpp:30
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static int GetDefaultChannel()
Get the Default Channel object.
Definition:
GpgFunctionObject.h:232
GpgFrontend::GpgCommandExecutor::Execute
void Execute(StringArgsRef arguments, const std::function< void(boost::process::async_pipe &in, boost::process::async_pipe &out)> &interact_func)
Excuting an order.
Definition:
GpgCommandExecutor.cpp:41
src
core
function
gpg
GpgCommandExecutor.h
Generated by
1.8.17