Debian Codegraph @

xbmc/cores/RetroPlayer/guibridge/IGameCallback.h

raw
1 /*
2 * Copyright (C) 2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include <string>
12
13 namespace KODI
14 {
15 namespace RETRO
16 {
17 class IPlayback;
18
19 class IGameCallback
20 {
21 public:
22 virtual ~IGameCallback() = default;
23
24 /*!
25 * \brief Get the game client being used to play the game
26 *
27 * \return The game client's ID, or empty if no game is being played
28 */
29 virtual std::string GameClientID() const = 0;
30
31 /*!
32 * \brief Get the game that is being played
33 *
34 * \return The path to the game, or empty if no game is being played
35 */
36 virtual std::string GetPlayingGame() const = 0;
37
38 /*!
39 * \brief Creates a savestate
40 *
41 * \param autosave Whether the save type is auto
42 *
43 * \return The path to the created savestate, or empty on error
44 */
45 virtual std::string CreateSavestate(bool autosave) = 0;
46
47 /*!
48 * \brief Updates a savestate with the current game being played
49 *
50 * \param savestatePath The path to the savestate
51 *
52 * \return True if the savestate was updated, false on error
53 */
54 virtual bool UpdateSavestate(const std::string& savestatePath) = 0;
55
56 /*!
57 * \brief Loads a savestate
58 *
59 * \param savestatePath The path to the savestate
60 *
61 * \return True if the savestate was loaded, false on error
62 */
63 virtual bool LoadSavestate(const std::string& savestatePath) = 0;
64
65 /*!
66 * \brief Frees resources allocated to the savestate, such as its video thumbnail
67 *
68 * \param savestatePath The path to the savestate
69 */
70 virtual void FreeSavestateResources(const std::string& savestatePath) = 0;
71
72 /*!
73 * \brief Closes the OSD
74 */
75 virtual void CloseOSDCallback() = 0;
76 };
77 } // namespace RETRO
78 } // namespace KODI