wxMASSManager/Profile/Profile.h

69 lines
1.5 KiB
C
Raw Normal View History

2020-09-01 16:14:43 +02:00
#ifndef PROFILE_H
#define PROFILE_H
#include <cstdint>
#include <string>
enum class ProfileType : std::uint8_t {
Demo,
FullGame
};
class Profile {
public:
explicit Profile(const std::string& path);
auto valid() const -> bool;
auto lastError() const -> std::string const&;
auto filename() const -> std::string const&;
auto type() const -> ProfileType;
auto steamId() const -> std::string const&;
auto companyName() const -> std::string const&;
auto getCompanyName() -> std::string const&;
auto renameCompany(const std::string& new_name) -> bool;
2020-09-01 16:14:43 +02:00
auto activeFrameSlot() const -> std::int8_t;
auto getActiveFrameSlot() -> std::int8_t;
auto credits() const -> std::int32_t;
auto getCredits() -> std::int32_t;
auto storyProgress() const -> std::int32_t;
2020-10-05 00:55:08 +02:00
auto getStoryProgress() -> std::int32_t;
auto setStoryProgress(std::int32_t progress) -> bool;
2020-10-05 00:55:08 +02:00
auto lastMissionId() const -> std::int32_t;
2020-10-05 00:55:08 +02:00
auto getLastMissionId() -> std::int32_t;
auto backup(const std::string& filename) -> bool;
2020-09-01 16:14:43 +02:00
private:
std::string _profileDirectory;
std::string _filename;
ProfileType _type;
std::string _steamId;
bool _valid = false;
std::string _lastError = "";
std::string _companyName;
std::int8_t _activeFrameSlot = 0;
std::int32_t _credits;
2020-10-05 00:55:08 +02:00
std::int32_t _storyProgress;
std::int32_t _lastMissionId;
2020-09-01 16:14:43 +02:00
};
#endif //PROFILE_H