Skip to content
Permalink
Browse files

SCUMM HE: MBC: Remove empty callbacks

  • Loading branch information...
sev- committed Nov 7, 2019
1 parent 17e6fa8 commit ccab85ffb2c735f65ddf8c688730b6d211c073f6
Showing with 3 additions and 16 deletions.
  1. +3 −13 engines/scumm/he/moonbase/net_main.cpp
  2. +0 −3 engines/scumm/he/moonbase/net_main.h
@@ -237,7 +237,7 @@ void Net::disableSessionJoining() {
debug(1, "Net::disableSessionJoining()"); // PN_DisableSessionPlayerJoin

Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/disablesession",
new Common::Callback<Net, Common::JSONValue *>(this, &Net::disableSessionJoiningCallback),
nullptr,
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::disableSessionJoiningErrorCallback));

char *buf = (char *)malloc(MAX_PACKET_SIZE);
@@ -250,9 +250,6 @@ void Net::disableSessionJoining() {
ConnMan.addRequest(rq);
}

void Net::disableSessionJoiningCallback(Common::JSONValue *response) {
}

void Net::disableSessionJoiningErrorCallback(Networking::ErrorResponse error) {
warning("Error in disableSessionJoining(): %ld %s", error.httpResponseCode, error.response.c_str());
}
@@ -293,7 +290,7 @@ bool Net::destroyPlayer(int32 playerDPID) {
debug(1, "Net::destroyPlayer(%d)", playerDPID);

Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/removeuser",
new Common::Callback<Net, Common::JSONValue *>(this, &Net::destroyPlayerCallback),
nullptr,
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::destroyPlayerErrorCallback));

char *buf = (char *)malloc(MAX_PACKET_SIZE);
@@ -308,9 +305,6 @@ bool Net::destroyPlayer(int32 playerDPID) {
return true;
}

void Net::destroyPlayerCallback(Common::JSONValue *response) {
}

void Net::destroyPlayerErrorCallback(Networking::ErrorResponse error) {
warning("Error in destroyPlayer(): %ld %s", error.httpResponseCode, error.response.c_str());
}
@@ -440,7 +434,7 @@ int Net::remoteSendData(int typeOfSend, int sendTypeParam, int type, Common::Str
debug("Package to send: %s", res.c_str());

Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/packet",
new Common::Callback<Net, Common::JSONValue *>(this, &Net::remoteSendDataCallback),
nullptr,
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::remoteSendDataErrorCallback));

rq->setPostData(buf, res.size());
@@ -475,10 +469,6 @@ int Net::remoteSendData(int typeOfSend, int sendTypeParam, int type, Common::Str
return defaultRes;
}

void Net::remoteSendDataCallback(Common::JSONValue *response) {
debug(1, "remoteSendData: Got: '%s'", response->stringify().c_str());
}

void Net::remoteSendDataErrorCallback(Networking::ErrorResponse error) {
warning("Error in remoteSendData(): %ld %s", error.httpResponseCode, error.response.c_str());
}
@@ -78,16 +78,13 @@ class Net {
void addUserCallback(Common::JSONValue *response);
void addUserErrorCallback(Networking::ErrorResponse error);

void disableSessionJoiningCallback(Common::JSONValue *response);
void disableSessionJoiningErrorCallback(Networking::ErrorResponse error);

void endSessionCallback(Common::JSONValue *response);
void endSessionErrorCallback(Networking::ErrorResponse error);

void destroyPlayerCallback(Common::JSONValue *response);
void destroyPlayerErrorCallback(Networking::ErrorResponse error);

void remoteSendDataCallback(Common::JSONValue *response);
void remoteSendDataErrorCallback(Networking::ErrorResponse error);

void remoteReceiveDataCallback(Common::JSONValue *response);

0 comments on commit ccab85f

Please sign in to comment.
You can’t perform that action at this time.