diff options
author | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-02-05 20:53:47 +0000 |
---|---|---|
committer | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-02-05 20:53:47 +0000 |
commit | c3fce2e5f62ca0927f17b7b0fe19918825950ccc (patch) | |
tree | b2a19098706f776cae0f5e0a2d160b54f60fa5fb | |
parent | 6fa1de83d6b7ab337bf0ed6bb39c16b5f7c5fdfd (diff) | |
download | libproxy-c3fce2e5f62ca0927f17b7b0fe19918825950ccc.tar.gz |
remove googlecode from the namespace
git-svn-id: http://libproxy.googlecode.com/svn/trunk@518 c587cffe-e639-0410-9787-d7902ae8ed56
28 files changed, 38 insertions, 82 deletions
diff --git a/libmodman/module.cpp b/libmodman/module.cpp index 6ae6965..31f1576 100644 --- a/libmodman/module.cpp +++ b/libmodman/module.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "module.hpp" -using namespace com::googlecode::libmodman; +using namespace libmodman; bool base_extension::singleton() { return false; } diff --git a/libmodman/module.hpp b/libmodman/module.hpp index 9c28442..e812ef9 100644 --- a/libmodman/module.hpp +++ b/libmodman/module.hpp @@ -33,7 +33,7 @@ #define MM_MODULE_VERSION 1 #define MM_MODULE_NAME __module -#define MM_MODULE_DEFINE __MOD_DEF_PREFIX struct com::googlecode::libmodman::module DLL_PUBLIC MM_MODULE_NAME[] +#define MM_MODULE_DEFINE __MOD_DEF_PREFIX struct libmodman::module DLL_PUBLIC MM_MODULE_NAME[] #define MM_MODULE_LAST { MM_MODULE_VERSION, NULL, NULL, NULL, NULL } #define MM_MODULE_RECORD(type, init, test, symb) \ @@ -43,8 +43,8 @@ static bool clsname ## _test() { \ return (cond); \ } \ - static com::googlecode::libmodman::base_extension** clsname ## _init() { \ - com::googlecode::libmodman::base_extension** retval = new com::googlecode::libmodman::base_extension*[2]; \ + static libmodman::base_extension** clsname ## _init() { \ + libmodman::base_extension** retval = new libmodman::base_extension*[2]; \ retval[0] = new clsname(); \ retval[1] = NULL; \ return retval; \ @@ -54,8 +54,6 @@ MM_MODULE_LAST, \ }; -namespace com { -namespace googlecode { namespace libmodman { class DLL_PUBLIC base_extension { @@ -82,7 +80,5 @@ struct module { }; } -} -} #endif /* MODULE_HPP_ */ diff --git a/libmodman/module_manager.cpp b/libmodman/module_manager.cpp index c5d4ce2..e70ddf4 100644 --- a/libmodman/module_manager.cpp +++ b/libmodman/module_manager.cpp @@ -28,7 +28,7 @@ #endif #include "module_manager.hpp" -using namespace com::googlecode::libmodman; +using namespace libmodman; #ifdef WIN32 #define pdlmtype HMODULE diff --git a/libmodman/module_manager.hpp b/libmodman/module_manager.hpp index 0e0ca40..51d395a 100644 --- a/libmodman/module_manager.hpp +++ b/libmodman/module_manager.hpp @@ -28,8 +28,6 @@ #include "module.hpp" -namespace com { -namespace googlecode { namespace libmodman { using namespace std; @@ -77,7 +75,5 @@ private: }; } -} -} #endif /* MODULE_MANAGER_HPP_ */ diff --git a/libmodman/test/main.hpp b/libmodman/test/main.hpp index 7d3bc84..9bc8cfc 100644 --- a/libmodman/test/main.hpp +++ b/libmodman/test/main.hpp @@ -23,7 +23,7 @@ #include "../module_manager.hpp" using namespace std; -using namespace com::googlecode::libmodman; +using namespace libmodman; class singleton_extension : public extension<singleton_extension> { public: 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_*/ |