Added initial code for Gtest
[platform/core/connectivity/net-config.git] / gtest / vpn.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef __VPN_H__
17 #define __VPN_H__
18
19 #include "vpn.h"
20 #include "gdbus.h"
21
22 class Vpnsvc:public GDbus {
23 public:
24         Vpnsvc();
25         ~Vpnsvc();
26
27         error_e vpn_init(const char *iface_name, int iface_name_len, int *result,
28                 int *h_index, char *h_name);
29         error_e vpn_deinit(const char *dev_name, int *result);
30         error_e vpn_protect(const char *dev_name, int *result);
31         error_e vpn_up(const char *iface_name, int *result);
32         error_e vpn_down(const char *iface_name, int *result);
33         error_e vpn_block_networks(GVariant *nets_vpn, int nr_nets_vpn,
34                 GVariant *nets_orig, int nr_nets_orig, int *result);
35         error_e vpn_unblock_networks(int *result);
36         error_e vpn_update_settings(int iface_index, const char *local_ip,
37                 const char *remote_ip, int mtu, int *result);
38         error_e vpn_add_route(const char *iface_name, const char *route, int prefix,
39                 int *result);
40         error_e vpn_remove_route(const char *iface_name, const char *route, int prefix,
41                 int *result);
42         error_e vpn_add_dns_server(const char* iface_name, const char *dns_server,
43                 int *result);
44         error_e vpn_remove_dns_server(const char* iface_name, const char *dns_server,
45                         int *result);
46 };
47
48
49 #endif /* __VPN_H__ */