Reviewed by Kenneth Rohde Christiansen.
[EFL] Set proxy address for Soup
https://bugs.webkit.org/show_bug.cgi?id=42721
Sets the given proxy URI for libsoup network backend. This method will
support libcurl network backend later.
* EWebLauncher/main.c:
(main): Invoke proxy set method
* ewk/ewk_settings.cpp:
(ewk_settings_proxy_uri_set): Sets proxy URI.
* ewk/ewk_settings.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63972
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2010-07-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Set proxy address for Soup
+ https://bugs.webkit.org/show_bug.cgi?id=42721
+
+ Sets the given proxy URI for libsoup network backend. This method will
+ support libcurl network backend later.
+
+ * EWebLauncher/main.c:
+ (main): Invoke proxy set method
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_proxy_uri_set): Sets proxy URI.
+ * ewk/ewk_settings.h:
+
2010-07-16 Leandro Pereira <leandro@profusion.mobi>
Reviewed by Gustavo Noronha Silva.
char *url = NULL;
char *userAgent = NULL;
const char *tmp;
+ const char *proxyUri;
char path[PATH_MAX];
char *engine = NULL;
ewk_settings_icon_database_path_set(path);
ewk_settings_web_database_path_set(path);
+ proxyUri = getenv("http_proxy");
+ if (proxyUri)
+ ewk_settings_proxy_uri_set(proxyUri);
+
browserCreate(url, theme, userAgent, geometry, engine, isFullscreen);
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, &windows);
#include <sys/types.h>
#include <unistd.h>
+#if USE(SOUP)
+#include "ResourceHandle.h"
+#include <libsoup/soup.h>
+#endif
+
static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024;
/**
surface = icon->nativeImageForCurrentFrame();
return ewk_util_image_from_cairo_surface_add(canvas, surface);
}
+
+/**
+ * Sets the given proxy URI to network backend.
+ *
+ * @param proxy URI.
+ */
+void ewk_settings_proxy_uri_set(const char* proxy)
+{
+#if USE(SOUP)
+ SoupURI* uri = soup_uri_new(proxy);
+ EINA_SAFETY_ON_NULL_RETURN(uri);
+
+ SoupSession* session = WebCore::ResourceHandle::defaultSession();
+ g_object_set(session, SOUP_SESSION_PROXY_URI, uri, NULL);
+ soup_uri_free(uri);
+#elif USE(CURL)
+ EINA_SAFETY_ON_TRUE_RETURN(1);
+#endif
+}
EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url);
EAPI Evas_Object *ewk_settings_icon_database_icon_object_add(const char *url, Evas *canvas);
+EAPI void ewk_settings_proxy_uri_set(const char* proxy);
#ifdef __cplusplus
}