| 1 |
/* |
| 2 |
* Copyright (C) 2005-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 <memory> |
| 12 |
#include <string> |
| 13 |
|
| 14 |
class IPlayer; |
| 15 |
class IPlayerCallback; |
| 16 |
class TiXmlElement; |
| 17 |
|
| 18 |
class CPlayerCoreConfig |
| 19 |
{ |
| 20 |
public: |
| 21 |
CPlayerCoreConfig(std::string name, |
| 22 |
std::string type, |
| 23 |
const TiXmlElement* pConfig, |
| 24 |
const std::string& id = ""); |
| 25 |
|
| 26 |
~CPlayerCoreConfig() = default; |
| 27 |
|
| 28 |
const std::string& GetName() const |
| 29 |
{ |
| 30 |
return m_name; |
| 31 |
} |
| 32 |
|
| 33 |
const std::string& GetId() const |
| 34 |
{ |
| 35 |
return m_id; |
| 36 |
} |
| 37 |
|
| 38 |
bool PlaysAudio() const |
| 39 |
{ |
| 40 |
return m_bPlaysAudio; |
| 41 |
} |
| 42 |
|
| 43 |
bool PlaysVideo() const |
| 44 |
{ |
| 45 |
return m_bPlaysVideo; |
| 46 |
} |
| 47 |
|
| 48 |
std::shared_ptr<IPlayer> CreatePlayer(IPlayerCallback& callback) const; |
| 49 |
|
| 50 |
std::string m_name; |
| 51 |
std::string m_id; // uuid for upnp |
| 52 |
std::string m_type; |
| 53 |
bool m_bPlaysAudio{false}; |
| 54 |
bool m_bPlaysVideo{false}; |
| 55 |
std::unique_ptr<TiXmlElement> m_config; |
| 56 |
}; |