4 * Copyright (C) 2012-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "GUIWindowPVRCommon.h"
24 #include "epg/GUIEPGGridContainer.h"
25 #include "utils/Stopwatch.h"
26 #include "threads/CriticalSection.h"
30 class CGUIWindowPVRCommon;
31 class CGUIWindowPVRChannels;
32 class CGUIWindowPVRGuide;
33 class CGUIWindowPVRRecordings;
34 class CGUIWindowPVRSearch;
35 class CGUIWindowPVRTimers;
37 class CGUIWindowPVR : public CGUIMediaWindow
39 friend class CGUIWindowPVRCommon;
40 friend class CGUIWindowPVRChannels;
41 friend class CGUIWindowPVRGuide;
42 friend class CGUIWindowPVRRecordings;
43 friend class CGUIWindowPVRSearch;
44 friend class CGUIWindowPVRTimers;
48 virtual ~CGUIWindowPVR(void);
50 virtual CGUIWindowPVRCommon *GetActiveView(void) const;
51 virtual void SetActiveView(CGUIWindowPVRCommon *window);
52 virtual void GetContextButtons(int itemNumber, CContextButtons &buttons);
53 virtual CGUIWindowPVRCommon *GetSavedView(void) const;
54 virtual bool OnAction(const CAction &action);
55 virtual bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
56 virtual void OnInitWindow(void);
57 virtual bool OnMessage(CGUIMessage& message);
58 virtual void OnWindowLoaded(void);
59 virtual void OnWindowUnload(void);
60 virtual void FrameMove();
61 virtual void Reset(void);
62 virtual void Cleanup(void);
64 EPG::CGUIEPGGridContainer *m_guideGrid;
67 virtual void SetLabel(int iControl, const CStdString &strLabel);
68 virtual void SetLabel(int iControl, int iLabel);
69 virtual void UpdateButtons(void);
70 virtual bool Update(const CStdString &strDirectory, bool updateFilterPath = true);
73 virtual bool OnMessageFocus(CGUIMessage &message);
74 virtual bool OnMessageClick(CGUIMessage &message);
76 virtual void CreateViews(void);
78 CGUIWindowPVRCommon * m_currentSubwindow;
79 CGUIWindowPVRCommon * m_savedSubwindow;
81 CGUIWindowPVRChannels * m_windowChannelsTV;
82 CGUIWindowPVRChannels * m_windowChannelsRadio;
83 CGUIWindowPVRGuide * m_windowGuide;
84 CGUIWindowPVRRecordings *m_windowRecordings;
85 CGUIWindowPVRSearch * m_windowSearch;
86 CGUIWindowPVRTimers * m_windowTimers;
89 CCriticalSection m_critSection;
91 CStopWatch m_refreshWatch;