Merge pull request #4801 from minggo/namespace

fix compiling errors because of new namespace of network module
This commit is contained in:
minggo 2014-01-02 04:03:03 -08:00
commit 2b5be1bacf
4 changed files with 10 additions and 10 deletions

View File

@ -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());

View File

@ -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:

View File

@ -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();

View File

@ -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<std::string, std::string> _httpHeader;