aboutsummaryrefslogtreecommitdiff
path: root/backends/saves/savefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/saves/savefile.cpp')
-rw-r--r--backends/saves/savefile.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp
index b04c53d832..21f53b8de2 100644
--- a/backends/saves/savefile.cpp
+++ b/backends/saves/savefile.cpp
@@ -23,9 +23,37 @@
#include "common/util.h"
#include "common/savefile.h"
#include "common/str.h"
+#if defined(USE_CLOUD) && defined(USE_LIBCURL)
+#include "backends/cloud/cloudmanager.h"
+#endif
namespace Common {
+OutSaveFile::OutSaveFile(WriteStream *w): _wrapped(w) {}
+
+OutSaveFile::~OutSaveFile() {}
+
+bool OutSaveFile::err() const { return _wrapped->err(); }
+
+void OutSaveFile::clearErr() { _wrapped->clearErr(); }
+
+void OutSaveFile::finalize() {
+ _wrapped->finalize();
+#if defined(USE_CLOUD) && defined(USE_LIBCURL)
+ CloudMan.syncSaves();
+#endif
+}
+
+bool OutSaveFile::flush() { return _wrapped->flush(); }
+
+uint32 OutSaveFile::write(const void *dataPtr, uint32 dataSize) {
+ return _wrapped->write(dataPtr, dataSize);
+}
+
+int32 OutSaveFile::pos() const {
+ return _wrapped->pos();
+}
+
bool SaveFileManager::copySavefile(const String &oldFilename, const String &newFilename) {
InSaveFile *inFile = 0;
OutSaveFile *outFile = 0;