1 /* 2 * Copyright (C) 2005-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 "InfoTagRadioRDS.h" 10 11 #include "pvr/channels/PVRChannel.h" 12 #include "pvr/channels/PVRRadioRDSInfoTag.h" 13 #include "utils/StringUtils.h" 14 15 namespace XBMCAddon 16 { 17 namespace xbmc 18 { 19 InfoTagRadioRDS::InfoTagRadioRDS() = default; 20 InfoTagRadioRDS(const std::shared_ptr<PVR::CPVRChannel> & channel)21 InfoTagRadioRDS::InfoTagRadioRDS(const std::shared_ptr<PVR::CPVRChannel>& channel) 22 { 23 if (channel) 24 infoTag = channel->GetRadioRDSInfoTag(); 25 } 26 27 InfoTagRadioRDS::~InfoTagRadioRDS() = default; 28 getTitle()29 String InfoTagRadioRDS::getTitle() 30 { 31 if (infoTag) 32 return infoTag->GetTitle(); 33 return ""; 34 } 35 getBand()36 String InfoTagRadioRDS::getBand() 37 { 38 if (infoTag) 39 return infoTag->GetBand(); 40 return ""; 41 } 42 getArtist()43 String InfoTagRadioRDS::getArtist() 44 { 45 if (infoTag) 46 return infoTag->GetArtist(); 47 return ""; 48 } 49 getComposer()50 String InfoTagRadioRDS::getComposer() 51 { 52 if (infoTag) 53 return infoTag->GetComposer(); 54 return ""; 55 } 56 getConductor()57 String InfoTagRadioRDS::getConductor() 58 { 59 if (infoTag) 60 return infoTag->GetConductor(); 61 return ""; 62 } 63 getAlbum()64 String InfoTagRadioRDS::getAlbum() 65 { 66 if (infoTag) 67 return infoTag->GetAlbum(); 68 return ""; 69 } 70 getComment()71 String InfoTagRadioRDS::getComment() 72 { 73 if (infoTag) 74 return infoTag->GetComment(); 75 return ""; 76 } 77 getAlbumTrackNumber()78 int InfoTagRadioRDS::getAlbumTrackNumber() 79 { 80 if (infoTag) 81 return infoTag->GetAlbumTrackNumber(); 82 return 0; 83 } 84 getInfoNews()85 String InfoTagRadioRDS::getInfoNews() 86 { 87 if (infoTag) 88 return infoTag->GetInfoNews(); 89 return ""; 90 } 91 getInfoNewsLocal()92 String InfoTagRadioRDS::getInfoNewsLocal() 93 { 94 if (infoTag) 95 return infoTag->GetInfoNewsLocal(); 96 return ""; 97 } 98 getInfoSport()99 String InfoTagRadioRDS::getInfoSport() 100 { 101 if (infoTag) 102 return infoTag->GetInfoSport(); 103 return ""; 104 } 105 getInfoStock()106 String InfoTagRadioRDS::getInfoStock() 107 { 108 if (infoTag) 109 return infoTag->GetInfoStock(); 110 return ""; 111 } 112 getInfoWeather()113 String InfoTagRadioRDS::getInfoWeather() 114 { 115 if (infoTag) 116 return infoTag->GetInfoWeather(); 117 return ""; 118 } 119 getInfoHoroscope()120 String InfoTagRadioRDS::getInfoHoroscope() 121 { 122 if (infoTag) 123 return infoTag->GetInfoHoroscope(); 124 return ""; 125 } 126 getInfoCinema()127 String InfoTagRadioRDS::getInfoCinema() 128 { 129 if (infoTag) 130 return infoTag->GetInfoCinema(); 131 return ""; 132 } 133 getInfoLottery()134 String InfoTagRadioRDS::getInfoLottery() 135 { 136 if (infoTag) 137 return infoTag->GetInfoLottery(); 138 return ""; 139 } 140 getInfoOther()141 String InfoTagRadioRDS::getInfoOther() 142 { 143 if (infoTag) 144 return infoTag->GetInfoOther(); 145 return ""; 146 } 147 getEditorialStaff()148 String InfoTagRadioRDS::getEditorialStaff() 149 { 150 if (infoTag) 151 return infoTag->GetEditorialStaff(); 152 return ""; 153 } 154 getProgStation()155 String InfoTagRadioRDS::getProgStation() 156 { 157 if (infoTag) 158 return infoTag->GetProgStation(); 159 return ""; 160 } 161 getProgStyle()162 String InfoTagRadioRDS::getProgStyle() 163 { 164 if (infoTag) 165 return infoTag->GetProgStyle(); 166 return ""; 167 } 168 getProgHost()169 String InfoTagRadioRDS::getProgHost() 170 { 171 if (infoTag) 172 return infoTag->GetProgHost(); 173 return ""; 174 } 175 getProgWebsite()176 String InfoTagRadioRDS::getProgWebsite() 177 { 178 if (infoTag) 179 return infoTag->GetProgWebsite(); 180 return ""; 181 } 182 getProgNow()183 String InfoTagRadioRDS::getProgNow() 184 { 185 if (infoTag) 186 return infoTag->GetProgNow(); 187 return ""; 188 } 189 getProgNext()190 String InfoTagRadioRDS::getProgNext() 191 { 192 if (infoTag) 193 return infoTag->GetProgNext(); 194 return ""; 195 } 196 getPhoneHotline()197 String InfoTagRadioRDS::getPhoneHotline() 198 { 199 if (infoTag) 200 return infoTag->GetPhoneHotline(); 201 return ""; 202 } 203 getEMailHotline()204 String InfoTagRadioRDS::getEMailHotline() 205 { 206 if (infoTag) 207 return infoTag->GetEMailHotline(); 208 return ""; 209 } 210 getPhoneStudio()211 String InfoTagRadioRDS::getPhoneStudio() 212 { 213 if (infoTag) 214 return infoTag->GetPhoneStudio(); 215 return ""; 216 } 217 getEMailStudio()218 String InfoTagRadioRDS::getEMailStudio() 219 { 220 if (infoTag) 221 return infoTag->GetEMailStudio(); 222 return ""; 223 } 224 getSMSStudio()225 String InfoTagRadioRDS::getSMSStudio() 226 { 227 if (infoTag) 228 return infoTag->GetSMSStudio(); 229 return ""; 230 } 231 232 } 233 } 234 235