[SVACE] 67131,67132 Fixed svace issues
[platform/core/api/vpn-setting.git] / dvpnlib / include / dvpnlib-vpn-manager.h
1 #ifndef __VPN_MANAGER_H__
2 #define __VPN_MANAGER_H__
3
4 #include "dvpnlib-common.h"
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 struct vpn_manager;
11 struct vpn_connection;
12
13 struct vpn_setting_entry {
14         gchar *key;
15         gchar *value;
16 };
17
18 /*
19  * Callback prototype
20  */
21 typedef void (*vpn_connection_added_cb)(
22                                 struct vpn_connection *connection,
23                                 void *user_data);
24 typedef void (*vpn_connection_removed_cb)(
25                                 struct vpn_connection *connection,
26                                 void *user_data);
27 /*
28 * Methods
29 */
30 GList *vpn_get_connections(void);
31 enum dvpnlib_err dvpnlib_vpn_manager_create(GHashTable *settings,
32                                 dvpnlib_reply_cb callback,
33                                 void *user_data);
34 enum dvpnlib_err dvpnlib_vpn_manager_remove(const char *path,
35                                 dvpnlib_reply_cb callback,
36                                 void *user_data);
37 enum dvpnlib_err dvpnlib_vpn_manager_register_agent(const char *path);
38 enum dvpnlib_err dvpnlib_vpn_manager_unregister_agent(const char *path);
39
40 /*
41  * Signals
42  */
43 void dvpnlib_vpn_manager_set_connection_added_cb(
44                                 vpn_connection_added_cb cb,
45                                 void *user_data);
46 void dvpnlib_vpn_manager_unset_connection_added_cb();
47 void dvpnlib_vpn_manager_set_connection_removed_cb(
48                                 vpn_connection_removed_cb cb,
49                                 void *user_data);
50 void dvpnlib_vpn_manager_unset_connection_removed_cb();
51 #ifdef __cplusplus
52 }
53 #endif
54
55 #endif