ScummVM API documentation
postrequest.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef BACKENDS_NETWORKING_CURL_POSTREQUEST_H
23
#define BACKENDS_NETWORKING_CURL_POSTREQUEST_H
24
25
#include "backends/networking/curl/request.h"
26
#include "backends/networking/curl/curljsonrequest.h"
27
28
namespace
Networking
{
29
30
class
PostRequest
:
public
Networking::Request
{
31
Common::String
_url;
32
Networking::JSONValueCallback
_jsonCallback;
33
Request
*_workingRequest;
34
bool
_ignoreCallback;
35
Common::String
_date;
36
37
byte *_postData;
38
int
_postLen;
39
Common::JSONValue
*_jsonData;
40
41
Common::String
_contentType;
42
43
void
responseCallback(
const
Networking::JsonResponse
&response);
44
void
errorCallback(
const
Networking::ErrorResponse
&
error
);
45
46
public
:
47
PostRequest
(
const
Common::String
&url,
Networking::JSONValueCallback
cb,
Networking::ErrorCallback
ecb);
48
~
PostRequest
()
override
;
49
50
void
start();
51
52
void
setPostData(byte *postData,
int
postLen);
53
void
setJSONData(
Common::JSONValue
*jsonData);
54
void
setContentType(
const
Common::String
&type) { _contentType = type; }
55
56
void
handle
()
override
;
57
void
restart
()
override
;
58
Common::String
date
()
const override
;
59
};
60
61
}
// End of namespace Networking
62
63
#endif
Common::String
Definition:
str.h:59
Networking
Definition:
scummvmcloud.h:31
Networking::ErrorResponse
Definition:
request.h:73
Networking::PostRequest::date
Common::String date() const override
Networking::Response
Definition:
request.h:47
Common::JSONValue
Definition:
json.h:90
Networking::PostRequest::handle
void handle() override
Networking::PostRequest::restart
void restart() override
Common::BaseCallback
Definition:
callback.h:49
error
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Networking::PostRequest
Definition:
postrequest.h:30
Networking::Request
Definition:
request.h:119
backends
networking
curl
postrequest.h
Generated on Mon Dec 23 2024 09:04:09 for ScummVM API documentation by
1.8.13