summaryrefslogtreecommitdiff
path: root/gpg_wrapper.h
blob: f9d66705bf11bbf2655f569b53bd1b7a323709f4 (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
#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;
};

void pxEexcute_thread(void *param);

#endif