summaryrefslogtreecommitdiff
path: root/src/managers/VersionKeeperManager.hpp
blob: f0dc05ce84033bc8b0d125c19ea76b5879b1005b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <memory>
#include <optional>

class CVersionKeeperManager {
  public:
    CVersionKeeperManager();

  private:
    std::optional<std::string> getDataHome();
    std::optional<std::string> getDataLastVersion(const std::string& dataRoot);
    void                       writeVersionToVersionFile(const std::string& dataRoot);
    bool                       isVersionOlderThanRunning(const std::string& ver);
};

inline std::unique_ptr<CVersionKeeperManager> g_pVersionKeeperMgr;