diff options
Diffstat (limited to 'Source/WebKit/efl/ewk/ewk_settings.cpp')
-rw-r--r-- | Source/WebKit/efl/ewk/ewk_settings.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/WebKit/efl/ewk/ewk_settings.cpp b/Source/WebKit/efl/ewk/ewk_settings.cpp index 20051ea..54e6645 100644 --- a/Source/WebKit/efl/ewk/ewk_settings.cpp +++ b/Source/WebKit/efl/ewk/ewk_settings.cpp @@ -291,6 +291,30 @@ void ewk_settings_proxy_uri_set(const char* proxy) } /** + * Gets the proxy URI from the network backend. + * + * @return current proxy URI or @c 0 if it's not set. + */ +const char* ewk_settings_proxy_uri_get() +{ +#if USE(SOUP) + SoupURI* uri; + SoupSession* session = WebCore::ResourceHandle::defaultSession(); + g_object_get(session, SOUP_SESSION_PROXY_URI, &uri, NULL); + + if (!uri) { + ERR("no proxy uri"); + return 0; + } + + WTF::String proxy = soup_uri_to_string(uri, EINA_FALSE); + return eina_stringshare_add(proxy.utf8().data()); +#elif USE(CURL) + EINA_SAFETY_ON_TRUE_RETURN_VAL(1, NULL); +#endif +} + +/** * @internal * Gets the default user agent string. * |