blob: 1c74a29c876a05ec2b64112547a3b5ed94b8713a (
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
22 struct gpgedit_config {
23 char* file; // File path to be edited
24 struct strll* recipients; // Pointer to first item in the linked list
25 struct gpgme_key_t* keys;
26 };
27
28 struct gpgedit_config* gpgedit_config_new();
29 void gpgedit_config_file_set(struct gpgedit_config*, char*);
30 void gpgedit_config_recipients_set(struct gpgedit_config*, char**);
31 void gpgedit_config_recipients_add(struct gpgedit_config*, char*);
32 void gpgedit_config_release(struct gpgedit_config*);
33 void gpgedit_config_recip_from_gpgme_recip(struct gpgedit_config* c, gpgme_recipient_t firstrecip);
|