xbmc
GameClientCheevos.h
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 
29 {
30 public:
31  CGameClientCheevos(CGameClient& gameClient, AddonInstance_Game& addonStruct);
32 
33  bool RCGenerateHashFromFile(std::string& hash,
34  RETRO::RConsoleID consoleID,
35  const std::string& filePath);
36  bool RCGetGameIDUrl(std::string& url, const std::string& hash);
37  bool RCGetPatchFileUrl(std::string& url,
38  const std::string& username,
39  const std::string& token,
40  unsigned int gameID);
41  bool RCPostRichPresenceUrl(std::string& url,
42  std::string& postData,
43  const std::string& username,
44  const std::string& token,
45  unsigned gameID,
46  const std::string& richPresence);
47  void RCEnableRichPresence(const std::string& script);
48  void RCGetRichPresenceEvaluation(std::string& evaluation, RETRO::RConsoleID consoleID);
49  // When the game is reset, the runtime should also be reset
50  void RCResetRuntime();
51 
52 private:
53  CGameClient& m_gameClient;
54  AddonInstance_Game& m_struct;
55 };
56 } // namespace GAME
57 } // namespace KODI
Definition: GameClientCheevos.h:28
Interface between Kodi and Game add-ons.
Definition: GameClient.h:115
Controller configuration window.
Definition: AudioDecoder.h:18
Game instance.
Definition: game.h:1223