Debian Codegraph @

xbmc/games/addons/cheevos/GameClientCheevos.h

raw
1 /*
2 * Copyright (C) 2020-2021 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 <stddef.h> /* size_t */
12 #include <string>
13
14 struct AddonInstance_Game;
15
16 namespace KODI
17 {
18 namespace RETRO
19 {
20 enum class RConsoleID;
21 }
22
23 namespace GAME
24 {
25
26 class CGameClient;
27
28 /*!
29 * \ingroup games
30 */
31 class CGameClientCheevos
32 {
33 public:
34 CGameClientCheevos(CGameClient& gameClient, AddonInstance_Game& addonStruct);
35
36 bool RCGenerateHashFromFile(std::string& hash,
37 RETRO::RConsoleID consoleID,
38 const std::string& filePath);
39 bool RCGetGameIDUrl(std::string& url, const std::string& hash);
40 bool RCGetPatchFileUrl(std::string& url,
41 const std::string& username,
42 const std::string& token,
43 unsigned int gameID);
44 bool RCPostRichPresenceUrl(std::string& url,
45 std::string& postData,
46 const std::string& username,
47 const std::string& token,
48 unsigned gameID,
49 const std::string& richPresence);
50 void RCEnableRichPresence(const std::string& script);
51 void RCGetRichPresenceEvaluation(std::string& evaluation, RETRO::RConsoleID consoleID);
52 // When the game is reset, the runtime should also be reset
53 void RCResetRuntime();
54
55 private:
56 CGameClient& m_gameClient;
57 AddonInstance_Game& m_struct;
58 };
59 } // namespace GAME
60 } // namespace KODI