OctonetData: Add getter for channel name

This commit is contained in:
Dennis Hamester
2016-11-10 11:27:31 +01:00
parent 838c0094b7
commit 844a5c3cd4
2 changed files with 11 additions and 0 deletions

View File

@@ -286,6 +286,16 @@ const std::string& OctonetData::getUrl(int id) const {
return channels[0].url;
}
const std::string& OctonetData::getName(int id) const {
for(std::vector<OctonetChannel>::const_iterator iter = channels.begin(); iter != channels.end(); ++iter) {
if(iter->id == id) {
return iter->name;
}
}
return channels[0].name;
}
int OctonetData::getGroupCount(void)
{
return groups.size();