1 /*
2  *  Copyright (C) 2012-2018 Team Kodi
3  *  This file is part of Kodi - https://kodi.tv
4  *
5  *  SPDX-License-Identifier: GPL-2.0-or-later
6  *  See LICENSES/README.md for more information.
7  */
8 
9 #include "EpgChannelData.h"
10 
11 #include "XBDateTime.h"
12 #include "pvr/channels/PVRChannel.h"
13 
14 using namespace PVR;
15 
CPVREpgChannelData(int iClientId,int iUniqueClientChannelId)16 CPVREpgChannelData::CPVREpgChannelData(int iClientId, int iUniqueClientChannelId)
17 : m_iClientId(iClientId),
18   m_iUniqueClientChannelId(iUniqueClientChannelId)
19 {
20 }
21 
CPVREpgChannelData(const CPVRChannel & channel)22 CPVREpgChannelData::CPVREpgChannelData(const CPVRChannel& channel)
23   : m_bIsRadio(channel.IsRadio()),
24     m_iClientId(channel.ClientID()),
25     m_iUniqueClientChannelId(channel.UniqueID()),
26     m_bIsHidden(channel.IsHidden()),
27     m_bIsLocked(channel.IsLocked()),
28     m_bIsEPGEnabled(channel.EPGEnabled()),
29     m_iChannelId(channel.ChannelID()),
30     m_strChannelName(channel.ChannelName())
31 {
32 }
33 
IsRadio() const34 bool CPVREpgChannelData::IsRadio() const
35 {
36   return m_bIsRadio;
37 }
38 
ClientId() const39 int CPVREpgChannelData::ClientId() const
40 {
41   return m_iClientId;
42 }
43 
UniqueClientChannelId() const44 int CPVREpgChannelData::UniqueClientChannelId() const
45 {
46   return m_iUniqueClientChannelId;
47 }
48 
IsHidden() const49 bool CPVREpgChannelData::IsHidden() const
50 {
51   return m_bIsHidden;
52 }
53 
SetHidden(bool bIsHidden)54 void CPVREpgChannelData::SetHidden(bool bIsHidden)
55 {
56   m_bIsHidden = bIsHidden;
57 }
58 
IsLocked() const59 bool CPVREpgChannelData::IsLocked() const
60 {
61   return m_bIsLocked;
62 }
63 
SetLocked(bool bIsLocked)64 void CPVREpgChannelData::SetLocked(bool bIsLocked)
65 {
66   m_bIsLocked = bIsLocked;
67 }
68 
IsEPGEnabled() const69 bool CPVREpgChannelData::IsEPGEnabled() const
70 {
71   return m_bIsEPGEnabled;
72 }
73 
SetEPGEnabled(bool bIsEPGEnabled)74 void CPVREpgChannelData::SetEPGEnabled(bool bIsEPGEnabled)
75 {
76   m_bIsEPGEnabled = bIsEPGEnabled;
77 }
78 
ChannelId() const79 int CPVREpgChannelData::ChannelId() const
80 {
81   return m_iChannelId;
82 }
83 
SetChannelId(int iChannelId)84 void CPVREpgChannelData::SetChannelId(int iChannelId)
85 {
86   m_iChannelId = iChannelId;
87 }
88 
ChannelName() const89 const std::string& CPVREpgChannelData::ChannelName() const
90 {
91   return m_strChannelName;
92 }
93 
SetChannelName(const std::string & strChannelName)94 void CPVREpgChannelData::SetChannelName(const std::string& strChannelName)
95 {
96   m_strChannelName = strChannelName;
97 }
98