xbmc
GameUtils.h
1 /*
2  * Copyright (C) 2012-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 "GameTypes.h"
12 
13 #include <set>
14 #include <string>
15 
16 class CFileItem;
17 class CURL;
18 
19 namespace ADDON
20 {
21 class IAddon;
22 using AddonPtr = std::shared_ptr<IAddon>;
23 using VECADDONS = std::vector<AddonPtr>;
24 } // namespace ADDON
25 
26 namespace KODI
27 {
28 namespace GAME
29 {
35 {
36 public:
49  static bool FillInGameClient(CFileItem& item, std::string& savestatePath);
50 
59  static bool HasGameExtension(const std::string& path);
60 
64  static std::set<std::string> GetGameExtensions();
65 
71  static bool IsStandaloneGame(const ADDON::AddonPtr& addon);
72 
73 private:
74  static void GetGameClients(const CFileItem& file,
75  GameClientVector& candidates,
76  GameClientVector& installable,
77  bool& bHasVfsGameClient);
78  static void GetGameClients(const ADDON::VECADDONS& addons,
79  const CURL& translatedUrl,
80  GameClientVector& candidates,
81  bool& bHasVfsGameClient);
82 
93  static bool Install(const std::string& gameClient);
94 
102  static bool Enable(const std::string& gameClient);
103 };
104 } // namespace GAME
105 } // namespace KODI
Definition: URL.h:20
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: Addon.cpp:39
Game related utilities.
Definition: GameUtils.h:34
Represents a file on a share.
Definition: FileItem.h:102