diff options
author | Nishant Chaprana <n.chaprana@samsung.com> | 2020-10-14 13:59:23 +0530 |
---|---|---|
committer | Nishant Chaprana <n.chaprana@samsung.com> | 2020-10-14 13:59:56 +0530 |
commit | dd3cccc5e67548dcc2dd6c6254ed6c97859085d5 (patch) | |
tree | 0444cde148e68a44c4295219e4c6625dbe52339d /vpn/vpn-provider.h | |
parent | 6b2381a2adabea7d8309ff158ef675ff88184305 (diff) | |
download | connman-dd3cccc5e67548dcc2dd6c6254ed6c97859085d5.tar.gz connman-dd3cccc5e67548dcc2dd6c6254ed6c97859085d5.tar.bz2 connman-dd3cccc5e67548dcc2dd6c6254ed6c97859085d5.zip |
Imported Upstream version 1.38upstream/1.38
Change-Id: I7cada2367329445e1d200055e21d96e7e9c05047
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'vpn/vpn-provider.h')
-rw-r--r-- | vpn/vpn-provider.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/vpn/vpn-provider.h b/vpn/vpn-provider.h index 96452c11..0275d51a 100644 --- a/vpn/vpn-provider.h +++ b/vpn/vpn-provider.h @@ -3,6 +3,7 @@ * ConnMan VPN daemon * * Copyright (C) 2007-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2019 Jolla Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -36,11 +37,6 @@ extern "C" { * @short_description: Functions for handling providers */ -enum vpn_provider_type { - VPN_PROVIDER_TYPE_UNKNOWN = 0, - VPN_PROVIDER_TYPE_VPN = 1, -}; - enum vpn_provider_state { VPN_PROVIDER_STATE_UNKNOWN = 0, VPN_PROVIDER_STATE_IDLE = 1, @@ -85,10 +81,16 @@ int vpn_provider_set_string_hide_value(struct vpn_provider *provider, const char *key, const char *value); const char *vpn_provider_get_string(struct vpn_provider *provider, const char *key); +bool vpn_provider_get_string_immutable(struct vpn_provider *provider, + const char *key); +bool vpn_provider_get_boolean(struct vpn_provider *provider, const char *key, + bool default_value); int vpn_provider_set_state(struct vpn_provider *provider, enum vpn_provider_state state); +void vpn_provider_add_error(struct vpn_provider *provider, + enum vpn_provider_error error); int vpn_provider_indicate_error(struct vpn_provider *provider, enum vpn_provider_error error); @@ -97,6 +99,8 @@ int vpn_provider_get_index(struct vpn_provider *provider); void vpn_provider_set_data(struct vpn_provider *provider, void *data); void *vpn_provider_get_data(struct vpn_provider *provider); +void vpn_provider_set_plugin_data(struct vpn_provider *provider, void *data); +void *vpn_provider_get_plugin_data(struct vpn_provider *provider); int vpn_provider_set_ipaddress(struct vpn_provider *provider, struct connman_ipaddress *ipaddress); int vpn_provider_set_pac(struct vpn_provider *provider, @@ -114,6 +118,12 @@ const char *vpn_provider_get_save_group(struct vpn_provider *provider); const char *vpn_provider_get_name(struct vpn_provider *provider); const char *vpn_provider_get_host(struct vpn_provider *provider); const char *vpn_provider_get_path(struct vpn_provider *provider); + +unsigned int vpn_provider_get_authentication_errors( + struct vpn_provider *provider); +unsigned int vpn_provider_get_connection_errors( + struct vpn_provider *provider); + void vpn_provider_change_address(struct vpn_provider *provider); void vpn_provider_clear_address(struct vpn_provider *provider, int family); @@ -131,7 +141,6 @@ typedef void (* vpn_provider_password_cb_t) (struct vpn_provider *provider, struct vpn_provider_driver { const char *name; - enum vpn_provider_type type; int (*probe) (struct vpn_provider *provider); int (*remove) (struct vpn_provider *provider); int (*connect) (struct vpn_provider *provider, |