[PATCH 5/5] PROXY: merge proxy methods into buildsystem
Enrico Scholz <[email protected]> Wed, 27 Feb 2008 11:38:23 +0100
| Newsgroups | gmane.network.irc.irssi.devel |
|---|---|
| Message-ID | <827df192f003a81c15b4b1370745621d30ff3f57.1204046798.git.enrico.scholz@informatik.tu-chemnitz.de> |
This patch adds the code and rules to build the various proxy methods. Signed-off-by: Enrico Scholz <[email protected]> --- src/core/Makefile.am | 6 ++++++ src/core/network-proxy.c | 12 ++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/core/Makefile.am b/src/core/Makefile.am index f60dedf..a1f9b20 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -33,6 +33,12 @@ libcore_a_SOURCES = \ network-openssl.c \ network-proxy.c \ network-proxy.h \ + network-proxy-simple.c \ + network-proxy-simple.h \ + network-proxy-http.c \ + network-proxy-http.h \ + network-proxy-socks5.c \ + network-proxy-socks5.h \ network-proxy-priv.h \ nicklist.c \ nickmatch-cache.c \ diff --git a/src/core/network-proxy.c b/src/core/network-proxy.c index cedf96b..cb5f941 100644 --- a/src/core/network-proxy.c +++ b/src/core/network-proxy.c @@ -18,6 +18,9 @@ #include "network-proxy.h" #include <string.h> +#include "network-proxy-simple.h" +#include "network-proxy-http.h" +#include "network-proxy-socks5.h" struct network_proxy * network_proxy_create(char const *type) @@ -25,6 +28,15 @@ network_proxy_create(char const *type) if (type==NULL) return NULL; + if (strcmp(type, "simple")==0 || type[0]=='\0') + return _network_proxy_simple_create(); + + if (strcmp(type, "http")==0) + return _network_proxy_http_create(); + + if (strcmp(type, "socks5")==0) + return _network_proxy_socks5_create(); + g_error("unsupported proxy type '%s'", type); return NULL; } -- 1.5.4.1