[PATCH v3 03/21] vpn-provider: Add getter functions

Jukka Rissanen jukka.rissanen at linux.intel.com
Fri Nov 30 01:30:36 PST 2012


---
 vpn/vpn-provider.c | 15 +++++++++++++++
 vpn/vpn-provider.h |  4 ++++
 2 files changed, 19 insertions(+)

diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
index 1630dad..a5980e6 100644
--- a/vpn/vpn-provider.c
+++ b/vpn/vpn-provider.c
@@ -2153,6 +2153,21 @@ void __vpn_provider_check_connections(void)
 	g_timeout_add(1000, check_vpn_count, NULL);
 }
 
+const char *vpn_provider_get_name(struct vpn_provider *provider)
+{
+	return provider->name;
+}
+
+const char *vpn_provider_get_host(struct vpn_provider *provider)
+{
+	return provider->host;
+}
+
+const char *vpn_provider_get_path(struct vpn_provider *provider)
+{
+	return provider->path;
+}
+
 int __vpn_provider_init(gboolean do_routes)
 {
 	DBG("");
diff --git a/vpn/vpn-provider.h b/vpn/vpn-provider.h
index b462042..b3c1048 100644
--- a/vpn/vpn-provider.h
+++ b/vpn/vpn-provider.h
@@ -101,6 +101,10 @@ int vpn_provider_append_route(struct vpn_provider *provider,
 const char *vpn_provider_get_driver_name(struct vpn_provider *provider);
 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);
+
 typedef void (* vpn_provider_connect_cb_t) (struct vpn_provider *provider,
 					void *user_data, int error);
 
-- 
1.7.11.4




More information about the connman mailing list