1 |
//#ifdef GPGME_CPP_H |
2 |
//#define GPGME_CPP_H |
3 |
|
4 |
#ifdef WITH_CPP_WRAPPER |
5 |
|
6 |
typedef enum { |
7 |
GPG_ERR_SUCCESS = 0, |
8 |
GPG_ERR_INV_VALUE = 1, |
9 |
GPG_ERR_INV_MODE = 2, |
10 |
GPG_ERR_PWD_NOT_SET = 3 |
11 |
}; |
12 |
|
13 |
class gpgme_key { |
14 |
public: |
15 |
gpgme_key (gpgme_key_t key); |
16 |
~gpgme_key (); |
17 |
int sign (int sigclass, int local); |
18 |
int trust (int val); |
19 |
int adduid (const char * name, const char * comment, const char * mail); |
20 |
int addkey (int algo); |
21 |
int addphoto (const char * file); |
22 |
int addrevoker (const char * name); |
23 |
int deluid (int id); |
24 |
int delkey (int id); |
25 |
int passwd (const char * old, const char * new_); |
26 |
int primary (const char * pwd); |
27 |
int expire (const char *isodate); |
28 |
int revkey (int id); |
29 |
int revoke (const char * pwd); |
30 |
int enable (const char * pwd); |
31 |
int disable (const char * pwd); |
32 |
int setpref (int id, const char * prefs); |
33 |
int set_passwd (const char * pwd); |
34 |
unsigned ulong_attr (int what, int idx); |
35 |
const char * string_attr (int what, int idx); |
36 |
const void * attrib_attr (int * nbytes); |
37 |
|
38 |
private: |
39 |
gpgme_key_t key; |
40 |
gpgme_ctx_t ctx; |
41 |
gpgme_editkey_t edit_ctx; |
42 |
char * passphrase; |
43 |
}; |
44 |
|
45 |
#endif /* WITH_CPP_WRAPPER */ |
46 |
//#endif /* GPGME_CPP_H */ |