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 "utils/Observer.h"
25 #include "threads/Thread.h"
26 #include "../channels/PVRChannelGroup.h"
32 class CGUIWindowPVRChannels : public CGUIWindowPVRCommon, private Observer, private CThread
34 friend class CGUIWindowPVR;
37 CGUIWindowPVRChannels(CGUIWindowPVR *parent, bool bRadio);
38 virtual ~CGUIWindowPVRChannels(void);
40 void GetContextButtons(int itemNumber, CContextButtons &buttons) const;
41 bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
42 CPVRChannelGroupPtr SelectedGroup(void);
43 void SetSelectedGroup(CPVRChannelGroupPtr group);
44 CPVRChannelGroupPtr SelectNextGroup(void);
45 void UpdateData(bool bUpdateSelectedFile = true);
46 void Notify(const Observable &obs, const ObservableMessage msg);
47 void ResetObservers(void);
48 void UnregisterObservers(void);
52 bool OnClickButton(CGUIMessage &message);
53 bool OnClickList(CGUIMessage &message);
55 bool OnContextButtonAdd(CFileItem *item, CONTEXT_BUTTON button);
56 bool OnContextButtonGroupManager(CFileItem *item, CONTEXT_BUTTON button);
57 bool OnContextButtonHide(CFileItem *item, CONTEXT_BUTTON button);
58 bool OnContextButtonInfo(CFileItem *item, CONTEXT_BUTTON button);
59 bool OnContextButtonMove(CFileItem *item, CONTEXT_BUTTON button);
60 bool OnContextButtonPlay(CFileItem *item, CONTEXT_BUTTON button);
61 bool OnContextButtonSetThumb(CFileItem *item, CONTEXT_BUTTON button);
62 bool OnContextButtonShowHidden(CFileItem *item, CONTEXT_BUTTON button);
63 bool OnContextButtonFilter(CFileItem *item, CONTEXT_BUTTON button);
64 bool OnContextButtonUpdateEpg(CFileItem *item, CONTEXT_BUTTON button);
65 bool OnContextButtonRecord(CFileItem *item, CONTEXT_BUTTON button);
66 bool OnContextButtonLock(CFileItem *item, CONTEXT_BUTTON button);
68 void ShowGroupManager(void);
70 CPVRChannelGroupPtr m_selectedGroup;
71 bool m_bShowHiddenChannels;
73 bool m_bThreadCreated;