diff options
-rw-r--r-- | include/service.h | 4 | ||||
-rw-r--r-- | src/service.c | 27 |
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) { |