| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "guilib/guiinfo/AddonsGUIInfo.h" |
| 12 |
#include "guilib/guiinfo/GUIControlsGUIInfo.h" |
| 13 |
#include "guilib/guiinfo/GamesGUIInfo.h" |
| 14 |
#include "guilib/guiinfo/LibraryGUIInfo.h" |
| 15 |
#include "guilib/guiinfo/MusicGUIInfo.h" |
| 16 |
#include "guilib/guiinfo/PicturesGUIInfo.h" |
| 17 |
#include "guilib/guiinfo/PlayerGUIInfo.h" |
| 18 |
#include "guilib/guiinfo/SkinGUIInfo.h" |
| 19 |
#include "guilib/guiinfo/SystemGUIInfo.h" |
| 20 |
#include "guilib/guiinfo/VideoGUIInfo.h" |
| 21 |
#include "guilib/guiinfo/VisualisationGUIInfo.h" |
| 22 |
#include "guilib/guiinfo/WeatherGUIInfo.h" |
| 23 |
|
| 24 |
#include <string> |
| 25 |
#include <vector> |
| 26 |
|
| 27 |
class CFileItem; |
| 28 |
class CGUIListItem; |
| 29 |
|
| 30 |
struct AudioStreamInfo; |
| 31 |
struct VideoStreamInfo; |
| 32 |
|
| 33 |
namespace KODI |
| 34 |
{ |
| 35 |
namespace GUILIB |
| 36 |
{ |
| 37 |
namespace GUIINFO |
| 38 |
{ |
| 39 |
|
| 40 |
class CGUIInfo; |
| 41 |
class IGUIInfoProvider; |
| 42 |
|
| 43 |
class CGUIInfoProviders |
| 44 |
{ |
| 45 |
public: |
| 46 |
CGUIInfoProviders(); |
| 47 |
virtual ~CGUIInfoProviders(); |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
void RegisterProvider(IGUIInfoProvider *provider, bool bAppend = true); |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
void UnregisterProvider(IGUIInfoProvider *provider); |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
bool InitCurrentItem(CFileItem *item); |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
bool GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const; |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const; |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const; |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
void UpdateAVInfo(const AudioStreamInfo& audioInfo, const VideoStreamInfo& videoInfo, const SubtitleStreamInfo& subtitleInfo); |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
CPlayerGUIInfo& GetPlayerInfoProvider() { return m_playerGUIInfo; } |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
CSystemGUIInfo& GetSystemInfoProvider() { return m_systemGUIInfo; } |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
CPicturesGUIInfo& GetPicturesInfoProvider() { return m_picturesGUIInfo; } |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
CGUIControlsGUIInfo& GetGUIControlsInfoProvider() { return m_guiControlsGUIInfo; } |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
CLibraryGUIInfo& GetLibraryInfoProvider() { return m_libraryGUIInfo; } |
| 137 |
|
| 138 |
private: |
| 139 |
std::vector<IGUIInfoProvider *> m_providers; |
| 140 |
|
| 141 |
CAddonsGUIInfo m_addonsGUIInfo; |
| 142 |
CGamesGUIInfo m_gamesGUIInfo; |
| 143 |
CGUIControlsGUIInfo m_guiControlsGUIInfo; |
| 144 |
CLibraryGUIInfo m_libraryGUIInfo; |
| 145 |
CMusicGUIInfo m_musicGUIInfo; |
| 146 |
CPicturesGUIInfo m_picturesGUIInfo; |
| 147 |
CPlayerGUIInfo m_playerGUIInfo; |
| 148 |
CSkinGUIInfo m_skinGUIInfo; |
| 149 |
CSystemGUIInfo m_systemGUIInfo; |
| 150 |
CVideoGUIInfo m_videoGUIInfo; |
| 151 |
CVisualisationGUIInfo m_visualisationGUIInfo; |
| 152 |
CWeatherGUIInfo m_weatherGUIInfo; |
| 153 |
}; |
| 154 |
|
| 155 |
} |
| 156 |
} |
| 157 |
} |