1 |
twoaday |
133 |
/* wptGPGME.h - Object oriented wrapper for GPGME |
2 |
|
|
* Copyright (C) 2006 Timo Schulz |
3 |
|
|
* |
4 |
|
|
* This file is part of WinPT. |
5 |
|
|
* |
6 |
|
|
* WinPT is free software; you can redistribute it and/or |
7 |
|
|
* modify it under the terms of the GNU General Public License |
8 |
|
|
* as published by the Free Software Foundation; either version 2 |
9 |
|
|
* of the License, or (at your option) any later version. |
10 |
|
|
* |
11 |
|
|
* WinPT is distributed in the hope that it will be useful, |
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 |
|
|
* General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with WinPT; if not, write to the Free Software Foundation, |
18 |
|
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#ifndef WPT_GPGME_H |
22 |
|
|
#define WPT_GPGME_H |
23 |
|
|
|
24 |
|
|
class GPGME { |
25 |
|
|
private: |
26 |
|
|
gpgme_ctx_t ctx; |
27 |
|
|
bool chg_ver; |
28 |
|
|
|
29 |
|
|
public: |
30 |
|
|
~GPGME (); |
31 |
|
|
GPGME (); |
32 |
|
|
|
33 |
|
|
void setChangeVersion (bool val); |
34 |
|
|
bool getArmor (void); |
35 |
|
|
void setArmor (bool val); |
36 |
|
|
|
37 |
twoaday |
260 |
/* export */ |
38 |
twoaday |
133 |
gpgme_error_t exportToBuffer (const char *patt, char **outdata); |
39 |
|
|
gpgme_error_t exportToFile (const char *patt, const char *outfile); |
40 |
|
|
gpgme_error_t exportToClipboard (const char *patt); |
41 |
twoaday |
260 |
|
42 |
|
|
/* import */ |
43 |
|
|
gpgme_error_t importFromFile (const char *file); |
44 |
twoaday |
264 |
gpgme_error_t importFromBuffer (const char *indata); |
45 |
twoaday |
260 |
gpgme_error_t importFromClipboard (void); |
46 |
|
|
gpgme_import_result_t importGetResult (void); |
47 |
twoaday |
133 |
}; |
48 |
|
|
|
49 |
|
|
#endif /*WPT_GPGME_H*/ |