5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
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.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __VICI_CLIENT_H
21 #define __VICI_CLIENT_H
27 /* strongswan VICI plugin client part*/
29 typedef struct _VICIClient VICIClient;
32 typedef struct _VICISection VICISection;
45 #define VICI_DEFAULT_URI "/var/run/charon.vici"
47 typedef int (*vici_add_element)(VICISection *sect, const char *key,
48 const char *value, const char *subsection);
50 typedef void (*vici_connect_reply_cb)(int err, void *user_data);
52 VICISection* vici_create_section(const char *name);
53 int add_subsection(const char* name, VICISection* child, VICISection* section);
54 void vici_destroy_section(VICISection *sect);
55 int vici_add_kv(VICISection *sect, const char *key,
56 const char *value, const char *subsection);
57 int vici_add_kvl(VICISection *sect, const char *key,
58 const char *value, const char *subsection);
59 int vici_add_list(VICISection* section, char *key,
60 GSList *list, const char* subsection);
61 int vici_add_cert_kv(VICISection *section, const char *key,
62 const char *value, const char *subsection);
63 int vici_add_cert_kvl(VICISection *section, const char *key,
64 const char *value, const char *subsection);
66 int vici_initialize(VICIClient **vici_client);
67 int vici_deinitialize(VICIClient *vici_client);
68 void vici_set_connect_reply_cb(VICIClient *vici_client, vici_connect_reply_cb reply_cb, gpointer user_data);
69 int vici_send_request(VICIClient *vici_client, VICIClientCmd cmd, VICISection *root);
75 #endif /* __VICI_CLIENT_H */