summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/gpg_wrapper.h
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2013-02-08 14:27:01 +0000
committerAlexander Gluzsky <sss123next@list.ru>2013-02-08 14:27:01 +0000
commit4d20cb679ac6ca7efd23bc9ad99d33fc8794f693 (patch)
treec9279611b2ec59e03102a0520654e0b482e74c64 /plugins/New_GPG/src/gpg_wrapper.h
parent8ba05a620bebb8f1400b20148be7012243e2ff9f (diff)
"boosted" process management
misc process management optimizations (should be little faster now) git-svn-id: http://svn.miranda-ng.org/main/trunk@3479 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/gpg_wrapper.h')
-rwxr-xr-xplugins/New_GPG/src/gpg_wrapper.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/plugins/New_GPG/src/gpg_wrapper.h b/plugins/New_GPG/src/gpg_wrapper.h
index 44b2f4f493..9ff09578b5 100755
--- a/plugins/New_GPG/src/gpg_wrapper.h
+++ b/plugins/New_GPG/src/gpg_wrapper.h
@@ -32,36 +32,44 @@ typedef enum {
}
pxResult;
-pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD aexitcode, pxResult *result, HANDLE hProcess, PROCESS_INFORMATION *pr);
-pxResult pxExecute_passwd_change(std::vector<std::string> &aargv, char *ainput, string *aoutput, LPDWORD aexitcode, pxResult *result, HANDLE hProcess, PROCESS_INFORMATION *pr, string &old_pass, string &new_pass);
+pxResult pxExecute(std::vector<std::string> &aargv, string *aoutput, LPDWORD aexitcode, pxResult *result);
+pxResult pxExecute_passwd_change(std::vector<std::string> &aargv, string *aoutput, LPDWORD aexitcode, pxResult *result, string &old_pass, string &new_pass);
struct gpg_execution_params
{
- wstring *cmd;
- char *useless;
+ std::vector<std::wstring> &aargv;
+// char *useless;
string *out;
LPDWORD code;
pxResult *result;
- HANDLE hProcess;
- PROCESS_INFORMATION *proc;
+ boost::process::child *child;
+// HANDLE hProcess;
+// PROCESS_INFORMATION *proc;
+ gpg_execution_params(std::vector<std::wstring> &a): aargv(a)
+ {
+ child = nullptr;
+ }
};
struct gpg_execution_params_pass
{
std::vector<std::wstring> &args;
string &old_pass, &new_pass;
- char *useless;
string *out;
LPDWORD code;
pxResult *result;
- HANDLE hProcess;
- PROCESS_INFORMATION *proc;
+ boost::process::child *child;
+// HANDLE hProcess;
+// PROCESS_INFORMATION *proc;
gpg_execution_params_pass(std::vector<std::wstring> &a, std::string &o, std::string &n): args(a), old_pass(o), new_pass(n)
- {}
+ {
+ child = nullptr;
+ }
};
-void pxEexcute_thread(void *param);
+void pxEexcute_thread(gpg_execution_params &params);
+bool gpg_launcher(gpg_execution_params &params, boost::posix_time::time_duration t = boost::posix_time::seconds(10));
void pxEexcute_passwd_change_thread(void *param);
#endif \ No newline at end of file