summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@nokia.com>2010-10-18 11:59:23 +0300
committerMarcel Holtmann <marcel@holtmann.org>2010-10-18 13:00:36 +0200
commit0848346110f31323f339d4e1a8de899327630fba (patch)
tree097819055c61443310478004caa822c0f15917d0
parentd21f6934b7891237edb0c321720dc8b402a911f6 (diff)
downloadconnman-0848346110f31323f339d4e1a8de899327630fba.tar.gz
connman-0848346110f31323f339d4e1a8de899327630fba.tar.bz2
connman-0848346110f31323f339d4e1a8de899327630fba.zip
Add proxy accessor function for services
-rw-r--r--include/service.h4
-rw-r--r--src/service.c27
2 files changed, 31 insertions, 0 deletions
diff --git a/include/service.h b/include/service.h
index 8c0e8926..16d10f2a 100644
--- a/include/service.h
+++ b/include/service.h
@@ -102,6 +102,10 @@ char *connman_service_get_interface(struct connman_service *service);
const char *connman_service_get_domainname(struct connman_service *service);
const char *connman_service_get_nameserver(struct connman_service *service);
+enum connman_service_proxy_method connman_service_get_proxy_method(struct connman_service *service);
+char **connman_service_get_proxy_servers(struct connman_service *service);
+char **connman_service_get_proxy_excludes(struct connman_service *service);
+const char *connman_service_get_proxy_url(struct connman_service *service);
const char *connman_service_get_proxy_autoconfig(struct connman_service *service);
#ifdef __cplusplus
diff --git a/src/service.c b/src/service.c
index 1cb292f7..8e1171b1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1527,6 +1527,33 @@ const char *connman_service_get_nameserver(struct connman_service *service)
return service->nameserver;
}
+enum connman_service_proxy_method connman_service_get_proxy_method(
+ struct connman_service *service)
+{
+ if (service == NULL)
+ return CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN;
+
+ return service->proxy;
+}
+
+char **connman_service_get_proxy_servers(struct connman_service *service)
+{
+ return g_strdupv(service->proxies);
+}
+
+char **connman_service_get_proxy_excludes(struct connman_service *service)
+{
+ return g_strdupv(service->excludes);
+}
+
+const char *connman_service_get_proxy_url(struct connman_service *service)
+{
+ if (service == NULL)
+ return NULL;
+
+ return service->pac;
+}
+
void __connman_service_set_proxy_autoconfig(struct connman_service *service,
const char *url)
{