[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / pvr / windows / GUIWindowPVRChannels.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2012-2013 Team XBMC
5  *      http://www.xbmc.org
6  *
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)
10  *  any later version.
11  *
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.
16  *
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/>.
20  *
21  */
22
23 #include "GUIWindowPVRCommon.h"
24 #include "utils/Observer.h"
25 #include "threads/Thread.h"
26 #include "../channels/PVRChannelGroup.h"
27
28 namespace PVR
29 {
30   class CGUIWindowPVR;
31
32   class CGUIWindowPVRChannels : public CGUIWindowPVRCommon, private Observer, private CThread
33   {
34     friend class CGUIWindowPVR;
35
36   public:
37     CGUIWindowPVRChannels(CGUIWindowPVR *parent, bool bRadio);
38     virtual ~CGUIWindowPVRChannels(void);
39
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);
49
50   private:
51     void Process(void);
52     bool OnClickButton(CGUIMessage &message);
53     bool OnClickList(CGUIMessage &message);
54
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);
67
68     void ShowGroupManager(void);
69
70     CPVRChannelGroupPtr m_selectedGroup;
71     bool              m_bShowHiddenChannels;
72     bool              m_bRadio;
73     bool              m_bThreadCreated;
74   };
75 }