diff options
Diffstat (limited to 'libproxy')
-rw-r--r-- | libproxy/extension_config.cpp | 2 | ||||
-rw-r--r-- | libproxy/extension_config.hpp | 6 | ||||
-rw-r--r-- | libproxy/extension_ignore.hpp | 6 | ||||
-rw-r--r-- | libproxy/extension_network.hpp | 6 | ||||
-rw-r--r-- | libproxy/extension_pacrunner.cpp | 2 | ||||
-rw-r--r-- | libproxy/extension_pacrunner.hpp | 7 | ||||
-rw-r--r-- | libproxy/extension_wpad.cpp | 2 | ||||
-rw-r--r-- | libproxy/extension_wpad.hpp | 6 | ||||
-rw-r--r-- | libproxy/modules/config_envvar.cpp | 4 | ||||
-rw-r--r-- | libproxy/modules/config_gnome.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/config_kde4.cpp | 4 | ||||
-rw-r--r-- | libproxy/modules/config_macosx.cpp | 10 | ||||
-rw-r--r-- | libproxy/modules/config_w32reg.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/ignore_domain.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/ignore_hostname.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/ignore_ip.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/network_networkmanager.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/pacrunner_mozjs.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/pacrunner_webkit.cpp | 2 | ||||
-rw-r--r-- | libproxy/modules/wpad_dns_alias.cpp | 2 | ||||
-rw-r--r-- | libproxy/proxy.cpp | 6 | ||||
-rw-r--r-- | libproxy/url.cpp | 17 | ||||
-rw-r--r-- | libproxy/url.hpp | 4 |
23 files changed, 32 insertions, 68 deletions
diff --git a/libproxy/extension_config.cpp b/libproxy/extension_config.cpp index b196108..6cefd30 100644 --- a/libproxy/extension_config.cpp +++ b/libproxy/extension_config.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "extension_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; string config_extension::get_ignore(url) { return ""; diff --git a/libproxy/extension_config.hpp b/libproxy/extension_config.hpp index 5acff2e..a24add8 100644 --- a/libproxy/extension_config.hpp +++ b/libproxy/extension_config.hpp @@ -23,11 +23,9 @@ #include <libmodman/module.hpp> #include "url.hpp" -namespace com { -namespace googlecode { namespace libproxy { using namespace std; -using namespace com::googlecode::libmodman; +using namespace libmodman; // Config module class DLL_PUBLIC config_extension : public extension<config_extension> { @@ -49,7 +47,5 @@ private: }; } -} -} #endif /* EXTENSION_CONFIG_HPP_ */ diff --git a/libproxy/extension_ignore.hpp b/libproxy/extension_ignore.hpp index 2cb0e3d..7659bf3 100644 --- a/libproxy/extension_ignore.hpp +++ b/libproxy/extension_ignore.hpp @@ -24,11 +24,9 @@ #include "url.hpp" -namespace com { -namespace googlecode { namespace libproxy { using namespace std; -using namespace com::googlecode::libmodman; +using namespace libmodman; class DLL_PUBLIC ignore_extension : public extension<ignore_extension> { public: @@ -36,7 +34,5 @@ public: }; } -} -} #endif /* EXTENSION_IGNORE_HPP_ */ diff --git a/libproxy/extension_network.hpp b/libproxy/extension_network.hpp index 3a200fb..2362028 100644 --- a/libproxy/extension_network.hpp +++ b/libproxy/extension_network.hpp @@ -22,10 +22,8 @@ #include <libmodman/module.hpp> -namespace com { -namespace googlecode { namespace libproxy { -using namespace com::googlecode::libmodman; +using namespace libmodman; // Network module class DLL_PUBLIC network_extension : public extension<network_extension> { @@ -34,7 +32,5 @@ public: }; } -} -} #endif /* EXTENSION_NETWORK_HPP_ */ diff --git a/libproxy/extension_pacrunner.cpp b/libproxy/extension_pacrunner.cpp index b7e3d8b..bcd97bc 100644 --- a/libproxy/extension_pacrunner.cpp +++ b/libproxy/extension_pacrunner.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "extension_pacrunner.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; pacrunner::pacrunner(string, const url&) {} diff --git a/libproxy/extension_pacrunner.hpp b/libproxy/extension_pacrunner.hpp index f42f61f..00100e8 100644 --- a/libproxy/extension_pacrunner.hpp +++ b/libproxy/extension_pacrunner.hpp @@ -32,11 +32,9 @@ }; \ MM_MODULE_EZ(name ## _pacrunner_extension, cond, symb) -namespace com { -namespace googlecode { namespace libproxy { using namespace std; -using namespace com::googlecode::libmodman; +using namespace libmodman; // PACRunner module class DLL_PUBLIC pacrunner { @@ -67,8 +65,5 @@ private: }; } -} -} - #endif /* EXTENSION_PACRUNNER_HPP_ */ diff --git a/libproxy/extension_wpad.cpp b/libproxy/extension_wpad.cpp index c99b2ff..5bd1cac 100644 --- a/libproxy/extension_wpad.cpp +++ b/libproxy/extension_wpad.cpp @@ -1,5 +1,5 @@ #include "extension_wpad.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; #include <cstring> diff --git a/libproxy/extension_wpad.hpp b/libproxy/extension_wpad.hpp index 879373e..6c2f52d 100644 --- a/libproxy/extension_wpad.hpp +++ b/libproxy/extension_wpad.hpp @@ -23,11 +23,9 @@ #include <libmodman/module.hpp> #include "url.hpp" -namespace com { -namespace googlecode { namespace libproxy { using namespace std; -using namespace com::googlecode::libmodman; +using namespace libmodman; // WPAD module class DLL_PUBLIC wpad_extension : public extension<wpad_extension> { @@ -43,7 +41,5 @@ public: }; } -} -} #endif /* EXTENSION_WPAD_HPP_ */ diff --git a/libproxy/modules/config_envvar.cpp b/libproxy/modules/config_envvar.cpp index 507587c..4c5f6a0 100644 --- a/libproxy/modules/config_envvar.cpp +++ b/libproxy/modules/config_envvar.cpp @@ -20,7 +20,7 @@ #include <cstdlib> #include "../extension_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; class envvar_config_extension : public config_extension { public: @@ -47,7 +47,7 @@ public: if (!proxy) throw runtime_error("Unable to read configuration"); - return com::googlecode::libproxy::url(proxy); + return libproxy::url(proxy); } string get_ignore(url) { diff --git a/libproxy/modules/config_gnome.cpp b/libproxy/modules/config_gnome.cpp index 7a28302..3d9ddd0 100644 --- a/libproxy/modules/config_gnome.cpp +++ b/libproxy/modules/config_gnome.cpp @@ -26,7 +26,7 @@ #include "xhasclient.cpp" // For xhasclient() #include "../extension_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; static const char *_all_keys[] = { "/system/proxy/mode", "/system/proxy/autoconfig_url", diff --git a/libproxy/modules/config_kde4.cpp b/libproxy/modules/config_kde4.cpp index 13f5c50..3e9921d 100644 --- a/libproxy/modules/config_kde4.cpp +++ b/libproxy/modules/config_kde4.cpp @@ -22,7 +22,7 @@ #include "xhasclient.cpp" // For xhasclient(...) #include "../extension_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; class kde_config_extension : public config_extension { public: @@ -84,7 +84,7 @@ public: }; // qInstallMsgHandler(oldHandler); // restore old behaviour - return com::googlecode::libproxy::url(cfg); + return libproxy::url(cfg); } string get_ignore(url /*dst*/) { diff --git a/libproxy/modules/config_macosx.cpp b/libproxy/modules/config_macosx.cpp index 4ed3f1e..a69d3ba 100644 --- a/libproxy/modules/config_macosx.cpp +++ b/libproxy/modules/config_macosx.cpp @@ -20,7 +20,7 @@ #include <sstream> #include "../module_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; #include <SystemConfiguration/SystemConfiguration.h> @@ -127,7 +127,7 @@ public: // wpad:// if (getbool(proxies, "ProxyAutoDiscoveryEnable")) { CFRelease(proxies); - return com::googlecode::libproxy::url(string("wpad://")); + return libproxy::url(string("wpad://")); } // pac+http://... @@ -135,7 +135,7 @@ public: (tmp = str(getobj<CFStringRef>(proxies, "ProxyAutoConfigURLString"))) != "" && url::is_valid(tmp)) { CFRelease(proxies); - return com::googlecode::libproxy::url(string("pac+") + tmp); + return libproxy::url(string("pac+") + tmp); } // http:// or socks:// (TODO: gopher:// and rtsp:// ???) @@ -144,12 +144,12 @@ public: (protocol_url(proxies, toupper("http"), tmp) && url::is_valid(tmp)) || (protocol_url(proxies, toupper("socks"), tmp) && url::is_valid(tmp))) { CFRelease(proxies); - return com::googlecode::libproxy::url(tmp); + return libproxy::url(tmp); } // direct:// CFRelease(proxies); - return com::googlecode::libproxy::url(string("direct://")); + return libproxy::url(string("direct://")); } string get_ignore(url) { diff --git a/libproxy/modules/config_w32reg.cpp b/libproxy/modules/config_w32reg.cpp index f94b407..82cb4ee 100644 --- a/libproxy/modules/config_w32reg.cpp +++ b/libproxy/modules/config_w32reg.cpp @@ -17,7 +17,7 @@ ******************************************************************************/ #include "../extension_config.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; #define W32REG_OFFSET_PAC (1 << 2) #define W32REG_OFFSET_WPAD (1 << 3) diff --git a/libproxy/modules/ignore_domain.cpp b/libproxy/modules/ignore_domain.cpp index 410e436..a24caf9 100644 --- a/libproxy/modules/ignore_domain.cpp +++ b/libproxy/modules/ignore_domain.cpp @@ -20,7 +20,7 @@ #include <cstdio> #include "../extension_ignore.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; class domain_ignore_extension : public ignore_extension { public: diff --git a/libproxy/modules/ignore_hostname.cpp b/libproxy/modules/ignore_hostname.cpp index bb9444c..578c188 100644 --- a/libproxy/modules/ignore_hostname.cpp +++ b/libproxy/modules/ignore_hostname.cpp @@ -20,7 +20,7 @@ #include <cstdio> #include "../extension_ignore.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; class hostname_ignore_extension : public ignore_extension { public: diff --git a/libproxy/modules/ignore_ip.cpp b/libproxy/modules/ignore_ip.cpp index de55417..400cd64 100644 --- a/libproxy/modules/ignore_ip.cpp +++ b/libproxy/modules/ignore_ip.cpp @@ -21,7 +21,7 @@ #include <cstring> #include "../extension_ignore.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; static inline bool _sockaddr_equals(const struct sockaddr *ip_a, const struct sockaddr *ip_b, const struct sockaddr *nm) diff --git a/libproxy/modules/network_networkmanager.cpp b/libproxy/modules/network_networkmanager.cpp index f696ebb..b59da7f 100644 --- a/libproxy/modules/network_networkmanager.cpp +++ b/libproxy/modules/network_networkmanager.cpp @@ -20,7 +20,7 @@ #include <stdint.h> // For uint32_t #include "../extension_network.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; #include <dbus/dbus.h> #include <NetworkManager/NetworkManager.h> diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp index c82608b..42d40e2 100644 --- a/libproxy/modules/pacrunner_mozjs.cpp +++ b/libproxy/modules/pacrunner_mozjs.cpp @@ -20,7 +20,7 @@ #include <cstring> // ? #include "../module_pacrunner.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; // Work around a mozjs include bug #ifndef JS_HAS_FILE_OBJECT diff --git a/libproxy/modules/pacrunner_webkit.cpp b/libproxy/modules/pacrunner_webkit.cpp index c0a1a54..85f74f9 100644 --- a/libproxy/modules/pacrunner_webkit.cpp +++ b/libproxy/modules/pacrunner_webkit.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "../extension_pacrunner.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; #include <JavaScriptCore/JavaScript.h> #include "pacutils.h" diff --git a/libproxy/modules/wpad_dns_alias.cpp b/libproxy/modules/wpad_dns_alias.cpp index 32e1b40..475b13d 100644 --- a/libproxy/modules/wpad_dns_alias.cpp +++ b/libproxy/modules/wpad_dns_alias.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "../extension_wpad.hpp" -using namespace com::googlecode::libproxy; +using namespace libproxy; class dns_alias_wpad_extension : public wpad_extension { public: diff --git a/libproxy/proxy.cpp b/libproxy/proxy.cpp index cad15e4..a6e8de4 100644 --- a/libproxy/proxy.cpp +++ b/libproxy/proxy.cpp @@ -33,8 +33,6 @@ #define strdup _strdup #endif -namespace com { -namespace googlecode { namespace libproxy { using namespace std; @@ -311,11 +309,9 @@ vector<string> proxy_factory::get_proxies(string __url) { } } -} -} struct _pxProxyFactory { - com::googlecode::libproxy::proxy_factory pf; + libproxy::proxy_factory pf; }; extern "C" DLL_PUBLIC struct _pxProxyFactory *px_proxy_factory_new(void) { diff --git a/libproxy/url.cpp b/libproxy/url.cpp index cab5142..6ba57cf 100644 --- a/libproxy/url.cpp +++ b/libproxy/url.cpp @@ -29,9 +29,7 @@ #include <cstdlib> // For atoi() #include <sys/stat.h> // For stat() -#include "url.hpp" - -#ifdef _WIN32 +#ifdef WIN32 #include <io.h> #define pfsize(st) (st.st_size) #define close _close @@ -40,6 +38,10 @@ #define pfsize(st) (st.st_blksize * st.st_blocks) #endif +#include "url.hpp" +using namespace libproxy; +using namespace std; + // This mime type should be reported by the web server #define PAC_MIME_TYPE "application/x-ns-proxy-autoconfig" // Fall back to checking for this mime type, which servers often report wrong @@ -48,11 +50,6 @@ // This is the maximum pac size (to avoid memory attacks) #define PAC_MAX_SIZE 102400 -namespace com { -namespace googlecode { -namespace libproxy { -using namespace std; - static inline int _get_default_port(string scheme) { struct servent *serv; if ((serv = getservbyname(scheme.c_str(), NULL))) return ntohs(serv->s_port); @@ -417,7 +414,3 @@ char* url::get_pac() { close(sock); return buffer; } - -} -} -} diff --git a/libproxy/url.hpp b/libproxy/url.hpp index ba6e449..82318b2 100644 --- a/libproxy/url.hpp +++ b/libproxy/url.hpp @@ -27,8 +27,6 @@ #include "config.hpp" -namespace com { -namespace googlecode { namespace libproxy { using namespace std; @@ -71,7 +69,5 @@ private: }; } -} -} #endif /*URL_HPP_*/ |