ScummVM API documentation
cloud.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 TESTBED_CLOUD_H
23 #define TESTBED_CLOUD_H
24 
25 #include "testbed/testsuite.h"
26 #include "backends/cloud/storage.h"
27 
28 // This file can be used as template for header files of other newer testsuites.
29 
30 namespace Testbed {
31 
32 namespace CloudTests {
33 
34 // Helper functions for Cloud tests
35 
36 bool waitForCallback();
37 bool waitForCallbackMore();
38 const char *getRemoteTestPath();
39 void infoCallback(const Cloud::Storage::StorageInfoResponse &response);
40 void directoryListedCallback(const Cloud::Storage::FileArrayResponse &response);
41 void directoryCreatedCallback(const Cloud::Storage::BoolResponse &response);
42 void fileUploadedCallback(const Cloud::Storage::UploadResponse &response);
43 void fileDownloadedCallback(const Cloud::Storage::BoolResponse &response);
44 void directoryDownloadedCallback(const Cloud::Storage::FileArrayResponse &response);
45 void savesSyncedCallback(const Cloud::Storage::BoolResponse &response);
46 void errorCallback(const Networking::ErrorResponse &response);
47 
48 TestExitStatus testInfo();
49 TestExitStatus testDirectoryListing();
50 TestExitStatus testDirectoryCreating();
51 TestExitStatus testUploading();
52 TestExitStatus testDownloading();
53 TestExitStatus testFolderDownloading();
54 TestExitStatus testSavesSync();
55 
56 } // End of namespace CloudTests
57 
58 class CloudTestSuite : public Testsuite {
59 public:
69  ~CloudTestSuite() override {}
70  const char *getName() const override {
71  return "Cloud";
72  }
73 
74  const char *getDescription() const override {
75  return "CloudMan, Storage API tests";
76  }
77 
78 };
79 
80 } // End of namespace Testbed
81 
82 #endif // TESTBED_TEMPLATE_H
Definition: request.h:73
Definition: cloud.h:58
Definition: cloud.h:30
Definition: request.h:47
Definition: testsuite.h:90