aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-18 18:49:46 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitaee713141b3a401f08e63cd9ccf5ce3dfe1cb06e (patch)
tree20fb764d74405090278d2b498076c05fe22e266c /common
parent81106b04440d76238da0fa0166eb3032b6db591e (diff)
downloadscummvm-rg350-aee713141b3a401f08e63cd9ccf5ce3dfe1cb06e.tar.gz
scummvm-rg350-aee713141b3a401f08e63cd9ccf5ce3dfe1cb06e.tar.bz2
scummvm-rg350-aee713141b3a401f08e63cd9ccf5ce3dfe1cb06e.zip
CLOUD: Make OutSaveFile start saves sync
It had to become a proxy class in order to do that. finalize() starts the saves sync.
Diffstat (limited to 'common')
-rw-r--r--common/savefile.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/savefile.h b/common/savefile.h
index 38b21c9ddd..d84c9e275a 100644
--- a/common/savefile.h
+++ b/common/savefile.h
@@ -28,6 +28,7 @@
#include "common/stream.h"
#include "common/str-array.h"
#include "common/error.h"
+#include "common/ptr.h"
namespace Common {
@@ -44,8 +45,20 @@ typedef SeekableReadStream InSaveFile;
* That typically means "save games", but also includes things like the
* IQ points in Indy3.
*/
-typedef WriteStream OutSaveFile;
+class OutSaveFile: public WriteStream {
+protected:
+ ScopedPtr<WriteStream> _wrapped;
+public:
+ OutSaveFile(WriteStream *w);
+ virtual ~OutSaveFile();
+
+ virtual bool err() const;
+ virtual void clearErr();
+ virtual void finalize();
+ virtual bool flush();
+ virtual uint32 write(const void *dataPtr, uint32 dataSize);
+};
/**
* The SaveFileManager is serving as a factory for InSaveFile