| 1 |
/* |
| 2 |
* Copyright (C) 2016-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 "games/GameTypes.h" |
| 12 |
|
| 13 |
#include <string> |
| 14 |
|
| 15 |
class CGUIDialogSelect; |
| 16 |
|
| 17 |
namespace KODI |
| 18 |
{ |
| 19 |
namespace GAME |
| 20 |
{ |
| 21 |
/*! |
| 22 |
* \ingroup games |
| 23 |
*/ |
| 24 |
class CGUIDialogSelectGameClient |
| 25 |
{ |
| 26 |
public: |
| 27 |
/*! |
| 28 |
* \brief Show a series of dialogs that results in a game client being |
| 29 |
* selected |
| 30 |
* |
| 31 |
* \param gamePath The path of the file being played |
| 32 |
* \param candidates A list of installed candidates that the user can |
| 33 |
* select from |
| 34 |
* \param installable A list of installable candidates that the user can |
| 35 |
* select from |
| 36 |
* |
| 37 |
* \return The ID of the selected game client, or empty if no game client |
| 38 |
* was selected |
| 39 |
*/ |
| 40 |
static std::string ShowAndGetGameClient(const std::string& gamePath, |
| 41 |
const GameClientVector& candidates, |
| 42 |
const GameClientVector& installable); |
| 43 |
|
| 44 |
private: |
| 45 |
/*! |
| 46 |
* \brief Get an initialized select dialog |
| 47 |
* |
| 48 |
* \param title The title of the select dialog |
| 49 |
* |
| 50 |
* \return A select dialog with its properties initialized, or nullptr if |
| 51 |
* the dialog isn't found |
| 52 |
*/ |
| 53 |
static CGUIDialogSelect* GetDialog(const std::string& title); |
| 54 |
|
| 55 |
/*! |
| 56 |
* \brief Log the candidates and installable game clients |
| 57 |
* |
| 58 |
* Other than logging, this has no side effects. |
| 59 |
*/ |
| 60 |
static void LogGameClients(const GameClientVector& candidates, |
| 61 |
const GameClientVector& installable); |
| 62 |
}; |
| 63 |
} // namespace GAME |
| 64 |
} // namespace KODI |