ScummVM API documentation
scummvmcloud.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_DLC_SCUMMVMCLOUD_H
23#define BACKENDS_DLC_SCUMMVMCLOUD_H
24
25#include "common/error.h"
26#include "common/queue.h"
27
28#include "backends/dlc/store.h"
29#include "backends/networking/http/request.h"
30#include "backends/networking/http/httpjsonrequest.h"
31
32namespace Networking {
33class SessionRequest;
34}
35
36namespace DLC {
37namespace ScummVMCloud {
38
39class ScummVMCloud : public DLC::Store {
40
42
43public:
44 ScummVMCloud() {}
45 virtual ~ScummVMCloud() {}
46
47 void getAllDLCs() override;
48
49 void startDownloadAsync(const Common::String &id, const Common::String &url) override;
50
51 void removeCacheFile(const Common::Path &file) override;
52
53 // extracts the provided zip in the provided destination path
54 Common::Error extractZip(const Common::Path &file, const Common::Path &destPath);
55
56 void addEntryToConfig(Common::Path gamePath);
57
58 // callback functions
59 void jsonCallbackGetAllDLCs(const Networking::JsonResponse &response);
60
61 void errorCallbackGetAllDLCs(const Networking::ErrorResponse &error);
62
63 void downloadFileCallback(const Networking::DataResponse &response);
64
65 void errorCallback(const Networking::ErrorResponse &error);
66};
67
68} // End of namespace ScummVMCloud
69} // End of namespace DLC
70
71#endif
Definition: error.h:81
Definition: path.h:52
Definition: str.h:59
Definition: scummvmcloud.h:39
Definition: store.h:32
Class for reading file and storing locally.
Definition: sessionrequest.h:50
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: request.h:73
Definition: request.h:47