summaryrefslogtreecommitdiff
path: root/gpg_wrapper.h
blob: 77f84f860a78e112a044ee441d767400bea349a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef GPG_WRAPPER_H
#define GPG_WRAPPER_H
typedef enum {
	pxSuccess,
	pxSuccessExitCodeInvalid,
	pxCreatePipeFailed,
	pxDuplicateHandleFailed,
	pxCloseHandleFailed,
	pxCreateProcessFailed,
	pxThreadWaitFailed,
	pxReadFileFailed,
	pxBufferOverflow,
	pxNotFound,
	pxNotConfigured
}
pxResult;

pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD aexitcode, pxResult *result);

struct gpg_execution_params
{
	wstring *cmd;
	char *useless;
	string *out;
	LPDWORD code;
	pxResult *result;
	HANDLE hProcess;
	PROCESS_INFORMATION *proc;
};

void pxEexcute_thread(void *param);

#endif