diff --git a/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.cpp b/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.cpp index 71657fe7e5..8201955869 100644 --- a/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.cpp +++ b/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.cpp @@ -167,7 +167,7 @@ void MinXmlHttpRequest::_setHttpRequestHeader() * @param sender Object which initialized callback * @param respone Response object */ -void MinXmlHttpRequest::handle_requestResponse(network::HttpClient *sender, network::HttpResponse *response) +void MinXmlHttpRequest::handle_requestResponse(cocos2d::network::HttpClient *sender, cocos2d::network::HttpResponse *response) { if (0 != strlen(response->getHttpRequest()->getTag())) { @@ -247,7 +247,7 @@ void MinXmlHttpRequest::handle_requestResponse(network::HttpClient *sender, netw void MinXmlHttpRequest::_sendRequest(JSContext *cx) { _httpRequest->setResponseCallback(this, httpresponse_selector(MinXmlHttpRequest::handle_requestResponse)); - network::HttpClient::getInstance()->send(_httpRequest); + cocos2d::network::HttpClient::getInstance()->send(_httpRequest); _httpRequest->release(); } @@ -264,7 +264,7 @@ MinXmlHttpRequest::MinXmlHttpRequest() _requestHeader.clear(); _withCredentialsValue = true; _cx = ScriptingCore::getInstance()->getGlobalContext(); - _httpRequest = new network::HttpRequest(); + _httpRequest = new cocos2d::network::HttpRequest(); } /** @@ -627,11 +627,11 @@ JS_BINDED_FUNC_IMPL(MinXmlHttpRequest, open) if (_meth.compare("post") == 0 || _meth.compare("POST") == 0) { - _httpRequest->setRequestType(network::HttpRequest::Type::POST); + _httpRequest->setRequestType(cocos2d::network::HttpRequest::Type::POST); } else { - _httpRequest->setRequestType(network::HttpRequest::Type::GET); + _httpRequest->setRequestType(cocos2d::network::HttpRequest::Type::GET); } _httpRequest->setUrl(_url.c_str()); diff --git a/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.h b/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.h index e5e26c41b1..ba190608c8 100644 --- a/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.h +++ b/cocos/scripting/javascript/bindings/network/XMLHTTPRequest.h @@ -80,7 +80,7 @@ public: JS_BINDED_FUNC(MinXmlHttpRequest, setRequestHeader); JS_BINDED_FUNC(MinXmlHttpRequest, overrideMimeType); - void handle_requestResponse(network::HttpClient *sender, network::HttpResponse *response); + void handle_requestResponse(cocos2d::network::HttpClient *sender, cocos2d::network::HttpResponse *response); private: diff --git a/cocos/scripting/lua/bindings/Lua_web_socket.h b/cocos/scripting/lua/bindings/Lua_web_socket.h index 98c9c73130..458705d779 100644 --- a/cocos/scripting/lua/bindings/Lua_web_socket.h +++ b/cocos/scripting/lua/bindings/Lua_web_socket.h @@ -12,7 +12,7 @@ extern "C" { #endif #include "network/WebSocket.h" -class LuaWebSocket: public network::WebSocket,public network::WebSocket::Delegate +class LuaWebSocket: public cocos2d::network::WebSocket,public cocos2d::network::WebSocket::Delegate { public: virtual ~LuaWebSocket(); diff --git a/cocos/scripting/lua/bindings/lua_xml_http_request.h b/cocos/scripting/lua/bindings/lua_xml_http_request.h index 900ec6db35..227e576740 100644 --- a/cocos/scripting/lua/bindings/lua_xml_http_request.h +++ b/cocos/scripting/lua/bindings/lua_xml_http_request.h @@ -34,7 +34,7 @@ public: LuaMinXmlHttpRequest(); ~LuaMinXmlHttpRequest(); - void handle_requestResponse(network::HttpClient *sender, network::HttpResponse *response); + void handle_requestResponse(cocos2d::network::HttpClient *sender, cocos2d::network::HttpResponse *response); inline void setResponseType(ResponseType type) { _responseType = type; } inline ResponseType getResponseType() {return _responseType; } @@ -48,7 +48,7 @@ public: inline void setReadyState(int readyState) { _readyState = readyState; } inline int getReadyState() { return _readyState ;} - inline network::HttpRequest* getHttpRequest() { return _httpRequest; } + inline cocos2d::network::HttpRequest* getHttpRequest() { return _httpRequest; } inline int getStatus() { return _status; } inline std::string getStatusText() { return _statusText ;} @@ -88,7 +88,7 @@ private: ResponseType _responseType; unsigned _timeout; bool _isAsync; - network::HttpRequest* _httpRequest; + cocos2d::network::HttpRequest* _httpRequest; bool _isNetwork; bool _withCredentialsValue; std::map _httpHeader;