mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
SCUMM HE: MBC: Implement Net::disableSessionJoining()
This commit is contained in:
parent
5268e582bf
commit
77ee206cd7
@ -228,7 +228,27 @@ void Net::endSessionErrorCallback(Networking::ErrorResponse error) {
|
||||
|
||||
|
||||
void Net::disableSessionJoining() {
|
||||
warning("STUB: Net::disableSessionJoining()"); // PN_DisableSessionPlayerJoin
|
||||
debug(1, "Net::disableSessionJoining()"); // PN_DisableSessionPlayerJoin
|
||||
|
||||
Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/disablesession",
|
||||
new Common::Callback<Net, Common::JSONValue *>(this, &Net::disableSessionJoiningCallback),
|
||||
new Common::Callback<Net, Networking::ErrorResponse>(this, &Net::disableSessionJoiningErrorCallback));
|
||||
|
||||
char *buf = (char *)malloc(MAX_PACKET_SIZE);
|
||||
snprintf(buf, MAX_PACKET_SIZE, "{\"sessionid\":%d}", _sessionid);
|
||||
rq->setPostData((byte *)buf, strlen(buf));
|
||||
rq->setContentType("application/json");
|
||||
|
||||
rq->start();
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
void Net::enableSessionJoining() {
|
||||
|
@ -78,6 +78,9 @@ private:
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user