blob: f34ab09c0c96c7b1dc70f41a4eeaa1784094535a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Copyright (C) 2017-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
#include "threads/Thread.h"
#include <string>
namespace KODI
{
namespace GAME
{
class CGameClient;
class CGameSettings;
} // namespace GAME
namespace RETRO
{
class IAutoSaveCallback
{
public:
virtual ~IAutoSaveCallback() = default;
virtual bool IsAutoSaveEnabled() const = 0;
virtual std::string CreateAutosave() = 0;
};
class CRetroPlayerAutoSave : protected CThread
{
public:
explicit CRetroPlayerAutoSave(IAutoSaveCallback& callback, GAME::CGameSettings& settings);
~CRetroPlayerAutoSave() override;
protected:
// implementation of CThread
void Process() override;
private:
// Construction parameters
IAutoSaveCallback& m_callback;
GAME::CGameSettings& m_settings;
};
} // namespace RETRO
} // namespace KODI
|