Imported Upstream version 1.38
[platform/upstream/connman.git] / vpn / vpn-agent.h
1 /*
2  *
3  *  ConnMan VPN daemon
4  *
5  *  Copyright (C) 2012  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program 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
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __VPN_AGENT_H
23 #define __VPN_AGENT_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * SECTION:agent
31  * @title: Agent premitives
32  * @short_description: Functions for interaction with agent
33  */
34
35 void vpn_agent_append_host_and_name(DBusMessageIter *iter,
36                                 struct vpn_provider *provider);
37 bool vpn_agent_check_reply_has_dict(DBusMessage *reply);
38 void vpn_agent_append_user_info(DBusMessageIter *iter,
39                                 struct vpn_provider *provider,
40                                 const char *username_str);
41 void vpn_agent_append_allow_credential_storage(DBusMessageIter *iter,
42                                 bool allow);
43 void vpn_agent_append_allow_credential_retrieval(DBusMessageIter *iter,
44                                 bool allow);
45 void vpn_agent_append_keep_credentials(DBusMessageIter *iter, bool allow);
46 void vpn_agent_append_auth_failure(DBusMessageIter *iter,
47                                 struct vpn_provider *provider,
48                                 const char *information);
49 int vpn_agent_check_and_process_reply_error(DBusMessage *reply,
50                                 struct vpn_provider *provider,
51                                 struct connman_task *task,
52                                 vpn_provider_connect_cb_t cb, void *user_data);
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* __VPN_AGENT_H */