diff options
author | Eugene Sandulenko | 2016-04-03 11:38:06 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-04-03 11:38:06 +0200 |
commit | d643036c206fff904232d3d7678cf0f3d57e55b4 (patch) | |
tree | 263507834121849fc91b0f30bccc43b8f40be929 /common/updates.h | |
parent | c8bb597e6754783660efa8011af60e0c2d8490eb (diff) | |
parent | 5baa657f2586ec9596768920861f1645dd5a4856 (diff) | |
download | scummvm-rg350-d643036c206fff904232d3d7678cf0f3d57e55b4.tar.gz scummvm-rg350-d643036c206fff904232d3d7678cf0f3d57e55b4.tar.bz2 scummvm-rg350-d643036c206fff904232d3d7678cf0f3d57e55b4.zip |
Merge pull request #735 from sev-/updates-gui
UPDATES: Add GUI. Opt-in dialog and Options
Diffstat (limited to 'common/updates.h')
-rw-r--r-- | common/updates.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/common/updates.h b/common/updates.h index 4c30987c38..65eb5ac095 100644 --- a/common/updates.h +++ b/common/updates.h @@ -20,8 +20,8 @@ * */ -#ifndef BACKENDS_UPDATES_ABSTRACT_H -#define BACKENDS_UPDATES_ABSTRACT_H +#ifndef COMMON_UPDATES_H +#define COMMON_UPDATES_H #if defined(USE_UPDATES) @@ -85,18 +85,42 @@ public: * * @param interval The interval. */ - virtual void setUpdateCheckInterval(UpdateInterval interval) {} + virtual void setUpdateCheckInterval(int interval) {} /** * Gets the update check interval. * * @return the update check interval. */ - virtual UpdateInterval getUpdateCheckInterval() { return kUpdateIntervalNotSupported; } + virtual int getUpdateCheckInterval() { return kUpdateIntervalNotSupported; } + + /** + * Returns list of supported uptate intervals. + * Ending with '-1' which is not acceptable value. + * + * @return list of integer values representing update intervals in seconds. + */ + static const int *getUpdateIntervals(); + + /** + * Returns string representation of a given interval. + * + * @param interval The interval. + * @return pointer to localized string of given interval. + */ + static const char *updateIntervalToString(int interval); + + /** + * Rounds up the given interval to acceptable value. + * + * @param interval The interval. + * @return rounded up interval + */ + static int normalizeInterval(int interval); }; } // End of namespace Common #endif -#endif // BACKENDS_UPDATES_ABSTRACT_H +#endif // COMMON_UPDATES_H |