3 * Copyright (C) 2012-2013 Team XBMC
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
22 #include "threads/CriticalSection.h"
23 #include "threads/SystemClock.h"
24 #include "utils/Observer.h"
25 #include "threads/Thread.h"
26 #include "addons/include/xbmc_pvr_types.h"
35 class CPVRTimerInfoTag;
38 class CPVRGUIInfo : private CThread,
43 virtual ~CPVRGUIInfo(void);
48 void Notify(const Observable &obs, const ObservableMessage msg);
50 bool TranslateBoolInfo(DWORD dwInfo) const;
51 bool TranslateCharInfo(DWORD dwInfo, CStdString &strValue) const;
52 int TranslateIntInfo(DWORD dwInfo) const;
55 * @brief Get the total duration of the currently playing LiveTV item.
56 * @return The total duration in milliseconds or NULL if no channel is playing.
58 int GetDuration(void) const;
61 * @brief Get the current position in milliseconds since the start of a LiveTV item.
62 * @return The position in milliseconds or NULL if no channel is playing.
64 int GetStartTime(void) const;
67 * @brief Show the player info.
68 * @param iTimeout Hide the player info after iTimeout seconds.
69 * @todo not really the right place for this :-)
71 void ShowPlayerInfo(int iTimeout);
74 * @brief Clear the playing EPG tag.
76 void ResetPlayingTag(void);
78 bool GetPlayingTag(EPG::CEpgInfoTag &tag) const;
81 void ResetProperties(void);
82 void ClearQualityInfo(PVR_SIGNAL_STATUS &qualityInfo);
85 void UpdatePlayingTag(void);
86 void UpdateTimersCache(void);
87 void UpdateBackendCache(void);
88 void UpdateQualityData(void);
89 void UpdateMisc(void);
90 void UpdateNextTimer(void);
92 bool AddonInfoToggle(void);
93 bool TimerInfoToggle(void);
94 void UpdateTimersToggle(void);
95 void ToggleShowInfo(void);
97 void CharInfoActiveTimerTitle(CStdString &strValue) const;
98 void CharInfoActiveTimerChannelName(CStdString &strValue) const;
99 void CharInfoActiveTimerChannelIcon(CStdString &strValue) const;
100 void CharInfoActiveTimerDateTime(CStdString &strValue) const;
101 void CharInfoNextTimerTitle(CStdString &strValue) const;
102 void CharInfoNextTimerChannelName(CStdString &strValue) const;
103 void CharInfoNextTimerChannelIcon(CStdString &strValue) const;
104 void CharInfoNextTimerDateTime(CStdString &strValue) const;
105 void CharInfoPlayingDuration(CStdString &strValue) const;
106 void CharInfoPlayingTime(CStdString &strValue) const;
107 void CharInfoNextTimer(CStdString &strValue) const;
108 void CharInfoBackendNumber(CStdString &strValue) const;
109 void CharInfoTotalDiskSpace(CStdString &strValue) const;
110 void CharInfoVideoBR(CStdString &strValue) const;
111 void CharInfoAudioBR(CStdString &strValue) const;
112 void CharInfoDolbyBR(CStdString &strValue) const;
113 void CharInfoSignal(CStdString &strValue) const;
114 void CharInfoSNR(CStdString &strValue) const;
115 void CharInfoBER(CStdString &strValue) const;
116 void CharInfoUNC(CStdString &strValue) const;
117 void CharInfoFrontendName(CStdString &strValue) const;
118 void CharInfoFrontendStatus(CStdString &strValue) const;
119 void CharInfoBackendName(CStdString &strValue) const;
120 void CharInfoBackendVersion(CStdString &strValue) const;
121 void CharInfoBackendHost(CStdString &strValue) const;
122 void CharInfoBackendDiskspace(CStdString &strValue) const;
123 void CharInfoBackendChannels(CStdString &strValue) const;
124 void CharInfoBackendTimers(CStdString &strValue) const;
125 void CharInfoBackendRecordings(CStdString &strValue) const;
126 void CharInfoPlayingClientName(CStdString &strValue) const;
127 void CharInfoEncryption(CStdString &strValue) const;
128 void CharInfoService(CStdString &strValue) const;
129 void CharInfoMux(CStdString &strValue) const;
130 void CharInfoProvider(CStdString &strValue) const;
132 /** @name GUIInfoManager data */
134 CStdString m_strActiveTimerTitle;
135 CStdString m_strActiveTimerChannelName;
136 CStdString m_strActiveTimerChannelIcon;
137 CStdString m_strActiveTimerTime;
138 CStdString m_strNextTimerInfo;
139 CStdString m_strNextRecordingTitle;
140 CStdString m_strNextRecordingChannelName;
141 CStdString m_strNextRecordingChannelIcon;
142 CStdString m_strNextRecordingTime;
143 bool m_bHasRecordings;
144 unsigned int m_iTimerAmount;
145 unsigned int m_iRecordingTimerAmount;
146 int m_iActiveClients;
147 CStdString m_strPlayingClientName;
148 CStdString m_strBackendName;
149 CStdString m_strBackendVersion;
150 CStdString m_strBackendHost;
151 CStdString m_strBackendDiskspace;
152 CStdString m_strBackendTimers;
153 CStdString m_strBackendRecordings;
154 CStdString m_strBackendChannels;
155 CStdString m_strTotalDiskspace;
156 unsigned int m_iDuration;
158 bool m_bHasNonRecordingTimers;
160 bool m_bIsPlayingRadio;
161 bool m_bIsPlayingRecording;
162 bool m_bIsPlayingEncryptedStream;
165 PVR_SIGNAL_STATUS m_qualityInfo; /*!< stream quality information */
166 unsigned int m_iAddonInfoToggleStart;
167 unsigned int m_iAddonInfoToggleCurrent;
168 unsigned int m_iTimerInfoToggleStart;
169 unsigned int m_iTimerInfoToggleCurrent;
170 XbmcThreads::EndTime m_ToggleShowInfo;
171 EPG::CEpgInfoTag * m_playingEpgTag;
173 CCriticalSection m_critSection;