blob: 8f2013c926c4d9584dbd0bdd4e24624625d41a98 (
plain)
1 // GPGEdit edits GPG encrypted files
2 // Copyright (C) 2018 Aaron Ball <nullspoon@oper.io>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17 #include <gpgme.h>
18 #include <string.h>
19
20 #include "strll.h"
21 #include "logger.h"
22
23 struct gpgedit_config {
24 char* file; // File path to be edited
25 struct strll* recipients; // Pointer to first item in the linked list
26 struct gpgme_key_t* keys;
27 int log_level; // Runtime log level
28 };
29
30 struct gpgedit_config* gpgedit_config_new();
31 void gpgedit_config_file_set(struct gpgedit_config*, char*);
32 void gpgedit_config_recipients_set(struct gpgedit_config*, char**);
33 void gpgedit_config_recipients_add(struct gpgedit_config*, char*);
34 void gpgedit_config_release(struct gpgedit_config*);
35 void gpgedit_config_recip_from_gpgme_recip(struct gpgedit_config* c, gpgme_recipient_t firstrecip);
|