diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/system.cpp | 9 | ||||
-rw-r--r-- | common/system.h | 24 | ||||
-rw-r--r-- | common/updates.h | 4 |
3 files changed, 37 insertions, 0 deletions
diff --git a/common/system.cpp b/common/system.cpp index 8d5bfd39cd..59210544ab 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -28,6 +28,7 @@ #include "common/savefile.h" #include "common/str.h" #include "common/taskbar.h" +#include "common/updates.h" #include "common/textconsole.h" #include "backends/audiocd/default/default-audiocd.h" @@ -44,6 +45,9 @@ OSystem::OSystem() { #if defined(USE_TASKBAR) _taskbarManager = 0; #endif +#if defined(USE_UPDATES) + _updateManager = 0; +#endif _fsFactory = 0; } @@ -62,6 +66,11 @@ OSystem::~OSystem() { _taskbarManager = 0; #endif +#if defined(USE_UPDATES) + delete _updateManager; + _updateManager = 0; +#endif + delete _savefileManager; _savefileManager = 0; diff --git a/common/system.h b/common/system.h index 9b833c5b1a..600778d8e1 100644 --- a/common/system.h +++ b/common/system.h @@ -45,6 +45,9 @@ class String; #if defined(USE_TASKBAR) class TaskbarManager; #endif +#if defined(USE_UPDATES) +class UpdateManager; +#endif class TimerManager; class SeekableReadStream; class WriteStream; @@ -161,6 +164,15 @@ protected: Common::TaskbarManager *_taskbarManager; #endif +#if defined(USE_UPDATES) + /** + * No default value is provided for _updateManager by OSystem. + * + * @note _updateManager is deleted by the OSystem destructor. + */ + Common::UpdateManager *_updateManager; +#endif + /** * No default value is provided for _fsFactory by OSystem. * @@ -1071,6 +1083,18 @@ public: } #endif +#if defined(USE_UPDATES) + /** + * Returns the UpdateManager, used to handle auto-updating, + * and updating of ScummVM in general. + * + * @return the UpdateManager for the current architecture + */ + virtual Common::UpdateManager *getUpdateManager() { + return _updateManager; + } +#endif + /** * Returns the FilesystemFactory object, depending on the current architecture. * diff --git a/common/updates.h b/common/updates.h index c0dbbaac05..1e0babdf6d 100644 --- a/common/updates.h +++ b/common/updates.h @@ -23,6 +23,8 @@ #ifndef BACKENDS_UPDATES_ABSTRACT_H #define BACKENDS_UPDATES_ABSTRACT_H +#if defined(USE_UPDATES) + namespace Common { /** @@ -95,4 +97,6 @@ public: } // End of namespace Common +#endif + #endif // BACKENDS_UPDATES_ABSTRACT_H |