format channellist.cpp/.h with astyle

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1232 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-02-27 22:29:15 +00:00
parent e045569027
commit c17a355457
2 changed files with 363 additions and 322 deletions

View File

@@ -172,7 +172,7 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to)
if (displayNext) { if (displayNext) {
time_t atime = time(NULL); time_t atime = time(NULL);
unsigned int count; unsigned int count;
for (count = from; count < to; count++){ for (count = from; count < to; count++) {
events.clear(); events.clear();
sectionsd_getEventsServiceKey(chanlist[count]->channel_id, events); sectionsd_getEventsServiceKey(chanlist[count]->channel_id, events);
chanlist[count]->nextEvent.startTime = (long)0x7fffffff; chanlist[count]->nextEvent.startTime = (long)0x7fffffff;
@@ -225,7 +225,7 @@ struct CmpChannelBySat: public binary_function <const CZapitChannel * const, con
return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower); return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower);
else else
return c1->getSatellitePosition() < c2->getSatellitePosition(); return c1->getSatellitePosition() < c2->getSatellitePosition();
; ;
}; };
}; };
@@ -242,7 +242,7 @@ struct CmpChannelByFreq: public binary_function <const CZapitChannel * const, co
return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower); return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower);
else else
return c1->getFreqId() < c2->getFreqId(); return c1->getFreqId() < c2->getFreqId();
; ;
}; };
}; };
@@ -263,7 +263,7 @@ void CChannelList::SortTP(void)
CZapitChannel* CChannelList::getChannel(int number) CZapitChannel* CChannelList::getChannel(int number)
{ {
for (uint32_t i=0; i< chanlist.size();i++) { for (uint32_t i=0; i< chanlist.size(); i++) {
if (chanlist[i]->number == number) if (chanlist[i]->number == number)
return chanlist[i]; return chanlist[i];
} }
@@ -272,7 +272,7 @@ CZapitChannel* CChannelList::getChannel(int number)
CZapitChannel* CChannelList::getChannel(t_channel_id channel_id) CZapitChannel* CChannelList::getChannel(t_channel_id channel_id)
{ {
for (uint32_t i=0; i< chanlist.size();i++) { for (uint32_t i=0; i< chanlist.size(); i++) {
if (chanlist[i]->channel_id == channel_id) if (chanlist[i]->channel_id == channel_id)
return chanlist[i]; return chanlist[i];
} }
@@ -356,7 +356,7 @@ int CChannelList::doChannelMenu(void)
old_selected = select; old_selected = select;
channel_id = chanlist[selected]->channel_id; channel_id = chanlist[selected]->channel_id;
switch(select) { switch(select) {
case 0:{ case 0: {
hide(); hide();
int result = ShowMsgUTF ( LOCALE_BOUQUETEDITOR_DELETE, g_Locale->getText(LOCALE_BOUQUETEDITOR_DELETE_QUESTION), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo ); int result = ShowMsgUTF ( LOCALE_BOUQUETEDITOR_DELETE, g_Locale->getText(LOCALE_BOUQUETEDITOR_DELETE_QUESTION), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo );
@@ -559,10 +559,10 @@ int CChannelList::show()
} }
else if ( ( msg == CRCInput::RC_timeout ) || ( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ) { else if ( ( msg == CRCInput::RC_timeout ) || ( msg == (neutrino_msg_t)g_settings.key_channelList_cancel) ) {
res = -1; res = -1;
if(!actzap){ if(!actzap) {
selected = oldselected; selected = oldselected;
} }
else{ else {
res = -4; res = -4;
selected = selected_in_new_mode; selected = selected_in_new_mode;
} }
@@ -618,13 +618,19 @@ int CChannelList::show()
selected=0; selected=0;
liststart = (selected/listmaxshow)*listmaxshow; liststart = (selected/listmaxshow)*listmaxshow;
paint(); paint();
if(this->new_mode_active && SameTP()) { actzap = true; zapTo(selected); } if(this->new_mode_active && SameTP()) {
actzap = true;
zapTo(selected);
}
} }
else if (msg == (neutrino_msg_t) g_settings.key_list_end) { else if (msg == (neutrino_msg_t) g_settings.key_list_end) {
selected=chanlist.size()-1; selected=chanlist.size()-1;
liststart = (selected/listmaxshow)*listmaxshow; liststart = (selected/listmaxshow)*listmaxshow;
paint(); paint();
if(this->new_mode_active && SameTP()) { actzap = true; zapTo(selected); } if(this->new_mode_active && SameTP()) {
actzap = true;
zapTo(selected);
}
} }
else if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup) else if (msg == CRCInput::RC_up || (int) msg == g_settings.key_channelList_pageup)
{ {
@@ -650,7 +656,10 @@ int CChannelList::show()
showChannelLogo(); showChannelLogo();
} }
if(this->new_mode_active && SameTP()) { actzap = true; zapTo(selected); } if(this->new_mode_active && SameTP()) {
actzap = true;
zapTo(selected);
}
//paintHead(); //paintHead();
} }
else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown) else if (msg == CRCInput::RC_down || (int) msg == g_settings.key_channelList_pagedown)
@@ -679,7 +688,10 @@ int CChannelList::show()
showChannelLogo(); showChannelLogo();
} }
if(this->new_mode_active && SameTP()) { actzap = true; zapTo(selected); } if(this->new_mode_active && SameTP()) {
actzap = true;
zapTo(selected);
}
//paintHead(); //paintHead();
} }
@@ -741,16 +753,36 @@ int CChannelList::show()
else if (CRCInput::isNumeric(msg) && (this->historyMode || g_settings.sms_channel)) { else if (CRCInput::isNumeric(msg) && (this->historyMode || g_settings.sms_channel)) {
if (this->historyMode) { //numeric zap if (this->historyMode) { //numeric zap
switch (msg) { switch (msg) {
case CRCInput::RC_0:selected = 0;break; case CRCInput::RC_0:
case CRCInput::RC_1:selected = 1;break; selected = 0;
case CRCInput::RC_2:selected = 2;break; break;
case CRCInput::RC_3:selected = 3;break; case CRCInput::RC_1:
case CRCInput::RC_4:selected = 4;break; selected = 1;
case CRCInput::RC_5:selected = 5;break; break;
case CRCInput::RC_6:selected = 6;break; case CRCInput::RC_2:
case CRCInput::RC_7:selected = 7;break; selected = 2;
case CRCInput::RC_8:selected = 8;break; break;
case CRCInput::RC_9:selected = 9;break; case CRCInput::RC_3:
selected = 3;
break;
case CRCInput::RC_4:
selected = 4;
break;
case CRCInput::RC_5:
selected = 5;
break;
case CRCInput::RC_6:
selected = 6;
break;
case CRCInput::RC_7:
selected = 7;
break;
case CRCInput::RC_8:
selected = 8;
break;
case CRCInput::RC_9:
selected = 9;
break;
}; };
zapOnExit = true; zapOnExit = true;
loop = false; loop = false;
@@ -932,7 +964,7 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data)
delete zapProtection; delete zapProtection;
zapProtection = NULL; zapProtection = NULL;
out: out:
if (startvideo) if (startvideo)
g_RemoteControl->startvideo(); g_RemoteControl->startvideo();
@@ -946,7 +978,8 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo)
unsigned int i; unsigned int i;
selected_chid = channel_id; selected_chid = channel_id;
printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %llx\n", this, getName(), chanlist.size(), channel_id);fflush(stdout); printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %llx\n", this, getName(), chanlist.size(), channel_id);
fflush(stdout);
for (i = 0; i < chanlist.size(); i++) { for (i = 0; i < chanlist.size(); i++) {
if(chanlist[i] == NULL) { if(chanlist[i] == NULL) {
printf("CChannelList::adjustToChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i); printf("CChannelList::adjustToChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i);
@@ -966,7 +999,7 @@ printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %llx\
if(!has_channel && old_mode == LIST_MODE_FAV) if(!has_channel && old_mode == LIST_MODE_FAV)
new_mode = LIST_MODE_PROV; new_mode = LIST_MODE_PROV;
has_channel = TVbouquetList->adjustToChannelID(channel_id); has_channel = TVbouquetList->adjustToChannelID(channel_id);
if(!has_channel && old_mode == LIST_MODE_PROV){ if(!has_channel && old_mode == LIST_MODE_PROV) {
new_mode = LIST_MODE_SAT; new_mode = LIST_MODE_SAT;
} }
has_channel = TVsatList->adjustToChannelID(channel_id); has_channel = TVsatList->adjustToChannelID(channel_id);
@@ -1001,7 +1034,7 @@ printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %llx\
#if 0 #if 0
int CChannelList::hasChannel(int nChannelNr) int CChannelList::hasChannel(int nChannelNr)
{ {
for (uint32_t i=0;i<chanlist.size();i++) { for (uint32_t i=0; i<chanlist.size(); i++) {
if (getKey(i) == nChannelNr) if (getKey(i) == nChannelNr)
return(i); return(i);
} }
@@ -1011,7 +1044,7 @@ int CChannelList::hasChannel(int nChannelNr)
int CChannelList::hasChannelID(t_channel_id channel_id) int CChannelList::hasChannelID(t_channel_id channel_id)
{ {
for (uint32_t i=0; i < chanlist.size();i++) { for (uint32_t i=0; i < chanlist.size(); i++) {
if(chanlist[i] == NULL) { if(chanlist[i] == NULL) {
printf("CChannelList::hasChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i); printf("CChannelList::hasChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i);
continue; continue;
@@ -1034,7 +1067,7 @@ void CChannelList::setSelected( int nChannelNr)
// -- Zap to channel with channel_id // -- Zap to channel with channel_id
bool CChannelList::zapTo_ChannelID(const t_channel_id channel_id) bool CChannelList::zapTo_ChannelID(const t_channel_id channel_id)
{ {
printf("**************************** CChannelList::zapTo_ChannelID %llx\n", channel_id); printf("**************************** CChannelList::zapTo_ChannelID %llx\n", channel_id);
for (unsigned int i=0; i<chanlist.size(); i++) { for (unsigned int i=0; i<chanlist.size(); i++) {
if (chanlist[i]->channel_id == channel_id) { if (chanlist[i]->channel_id == channel_id) {
zapTo (i); zapTo (i);
@@ -1057,7 +1090,7 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
} }
CZapitChannel* chan = chanlist[pos]; CZapitChannel* chan = chanlist[pos];
printf("**************************** CChannelList::zapTo me %p %s tuned %d new %d %s -> %llx\n", this, name.c_str(), tuned, pos, chan->name.c_str(), chan->channel_id); printf("**************************** CChannelList::zapTo me %p %s tuned %d new %d %s -> %llx\n", this, name.c_str(), tuned, pos, chan->name.c_str(), chan->channel_id);
if ( pos!=(int)tuned ) { if ( pos!=(int)tuned ) {
tuned = pos; tuned = pos;
g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8 g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8
@@ -1094,7 +1127,7 @@ void CChannelList::NewZap(t_channel_id channel_id)
return; return;
CZapitChannel* chan = &it->second; CZapitChannel* chan = &it->second;
printf("**************************** CChannelList::NewZap me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, chan->name.c_str(), chan->channel_id); printf("**************************** CChannelList::NewZap me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, chan->name.c_str(), chan->channel_id);
if(selected_chid != chan->channel_id) { if(selected_chid != chan->channel_id) {
selected_chid = chan->channel_id; selected_chid = chan->channel_id;
@@ -1414,7 +1447,7 @@ void CChannelList::quickZap(int key, bool cycle)
int bactive = bouquetList->getActiveBouquetNumber(); int bactive = bouquetList->getActiveBouquetNumber();
size_t cactive = selected; size_t cactive = selected;
printf("CChannelList::quickZap: selected %d total %d active bouquet %d total %d\n", cactive, chanlist.size(), bactive, bsize); printf("CChannelList::quickZap: selected %d total %d active bouquet %d total %d\n", cactive, chanlist.size(), bactive, bsize);
if ( (key==g_settings.key_quickzap_down) || (key == CRCInput::RC_left)) if ( (key==g_settings.key_quickzap_down) || (key == CRCInput::RC_left))
{ {
if(cactive == 0) if(cactive == 0)
@@ -1441,7 +1474,7 @@ printf("CChannelList::quickZap: selected %d total %d active bouquet %d total %d\
} else } else
selected = cactive; selected = cactive;
} }
printf("CChannelList::quickZap: new selected %d total %d active bouquet %d total %d\n", cactive, bouquetList->Bouquets[bactive]->channelList->getSize(), bactive, bsize); printf("CChannelList::quickZap: new selected %d total %d active bouquet %d total %d\n", cactive, bouquetList->Bouquets[bactive]->channelList->getSize(), bactive, bsize);
#if 1 #if 1
CNeutrinoApp::getInstance()->channelList->zapTo(bouquetList->Bouquets[bactive]->channelList->getKey(cactive)-1); CNeutrinoApp::getInstance()->channelList->zapTo(bouquetList->Bouquets[bactive]->channelList->getKey(cactive)-1);
#else #else
@@ -1548,7 +1581,7 @@ void CChannelList::paintDetails(int index)
} }
char buf[128] = {0}; char buf[128] = {0};
int len = 0; int len = 0;
if(g_settings.channellist_foot == 0){ if(g_settings.channellist_foot == 0) {
transponder_id_t ct = chanlist[index]->getTransponderId(); transponder_id_t ct = chanlist[index]->getTransponderId();
transponder_list_t::iterator tpI = transponders.find(ct); transponder_list_t::iterator tpI = transponders.find(ct);
len = snprintf(buf, sizeof(buf), "%d ", chanlist[index]->getFreqId()); len = snprintf(buf, sizeof(buf), "%d ", chanlist[index]->getFreqId());
@@ -1581,10 +1614,10 @@ void CChannelList::paintDetails(int index)
} }
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, width - 30, buf, COL_MENUCONTENTDARK, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 3*fheight, width - 30, buf, COL_MENUCONTENTDARK, 0, true);
} }
else if( !displayNext && g_settings.channellist_foot == 1){ // next Event else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
CSectionsdClient::CurrentNextInfo CurrentNext; CSectionsdClient::CurrentNextInfo CurrentNext;
sectionsd_getCurrentNextServiceKey(chanlist[index]->channel_id & 0xFFFFFFFFFFFFULL, CurrentNext); sectionsd_getCurrentNextServiceKey(chanlist[index]->channel_id & 0xFFFFFFFFFFFFULL, CurrentNext);
if (!CurrentNext.next_name.empty()){ if (!CurrentNext.next_name.empty()) {
struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit); struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit);
len = snprintf(buf, sizeof(buf), "%s %02d:%02d ",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min ); len = snprintf(buf, sizeof(buf), "%s %02d:%02d ",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min );
len += snprintf(&buf[len], sizeof(buf) - len, "%s", CurrentNext.next_name.c_str()); len += snprintf(&buf[len], sizeof(buf) - len, "%s", CurrentNext.next_name.c_str());
@@ -1602,7 +1635,7 @@ void CChannelList::clearItem2DetailsLine ()
void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/)
{ {
#define ConnectLineBox_Width 16 #define ConnectLineBox_Width 16
int xpos = x - ConnectLineBox_Width; int xpos = x - ConnectLineBox_Width;
int ypos1 = y + theight+0 + pos*fheight; int ypos1 = y + theight+0 + pos*fheight;
@@ -1649,9 +1682,9 @@ void CChannelList::showChannelLogo()
frameBuffer->paintBoxRel(x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x + width - logo_off - logo_w, y+(theight-logo_h)/2, logo_w, logo_h, COL_MENUHEAD_PLUS_0);
std::string lname; std::string lname;
if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname, &logo_w, &logo_h)){ if(g_PicViewer->GetLogoName(chanlist[selected]->channel_id, chanlist[selected]->name, lname, &logo_w, &logo_h)) {
if(logo_h > theight){ if(logo_h > theight) {
if((theight/(logo_h-theight))>1){ if((theight/(logo_h-theight))>1) {
logo_w -= (logo_w/(theight/(logo_h-theight))); logo_w -= (logo_w/(theight/(logo_h-theight)));
} }
logo_h = theight; logo_h = theight;
@@ -1735,7 +1768,7 @@ void CChannelList::paintItem(int pos)
if ((int) ch_desc_len > max_desc_len) if ((int) ch_desc_len > max_desc_len)
ch_desc_len = max_desc_len; ch_desc_len = max_desc_len;
if(g_settings.channellist_extended){ if(g_settings.channellist_extended) {
if(displayNext) if(displayNext)
{ {
struct tm *pStartZeit = localtime(&p_event->startTime); struct tm *pStartZeit = localtime(&p_event->startTime);
@@ -1773,17 +1806,17 @@ void CChannelList::paintItem(int pos)
} }
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10+prg_offset, ypos+ fheight, width- numwidth- 40- 15-prg_offset, nameAndDescription, color, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10+prg_offset, ypos+ fheight, width- numwidth- 40- 15-prg_offset, nameAndDescription, color, 0, true);
if (g_settings.channellist_epgtext_align_right){ if (g_settings.channellist_epgtext_align_right) {
// align right // align right
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - 20 - ch_desc_len - 28, ypos + fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x + width - 20 - ch_desc_len - 28, ypos + fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true);
} }
else{ else {
// align left // align left
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ 5+ numwidth+ 10+ ch_name_len+ 5+prg_offset, ypos+ fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->RenderString(x+ 5+ numwidth+ 10+ ch_name_len+ 5+prg_offset, ypos+ fheight, ch_desc_len, p_event->description, (curr == selected)?COL_MENUCONTENTSELECTED:(!displayNext ? COL_MENUCONTENT : COL_MENUCONTENTINACTIVE) , 0, true);
} }
} }
else { else {
if(g_settings.channellist_extended){ if(g_settings.channellist_extended) {
int pbz_activeCol, pbz_passiveCol; int pbz_activeCol, pbz_passiveCol;
if (liststart + pos != selected) { if (liststart + pos != selected) {
pbz_activeCol = COL_MENUCONTENT_PLUS_1; pbz_activeCol = COL_MENUCONTENT_PLUS_1;
@@ -1825,7 +1858,7 @@ void CChannelList::paintHead()
bool gotTime = g_Sectionsd->getIsTimeSet(); bool gotTime = g_Sectionsd->getIsTimeSet();
if(gotTime){ if(gotTime) {
strftime(timestr, 10, "%H:%M", tm); strftime(timestr, 10, "%H:%M", tm);
timestr_len = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(timestr, true); // UTF-8 timestr_len = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(timestr, true); // UTF-8
} }

View File

@@ -53,7 +53,7 @@ enum {
class CChannelList class CChannelList
{ {
private: private:
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;
unsigned int selected, selected_in_new_mode; unsigned int selected, selected_in_new_mode;
t_channel_id selected_chid; t_channel_id selected_chid;
@@ -91,7 +91,7 @@ class CChannelList
void hide(); void hide();
void showChannelLogo(); void showChannelLogo();
public: public:
CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false ); CChannelList(const char * const Name, bool historyMode = false, bool _vlist = false, bool new_mode_active = false );
~CChannelList(); ~CChannelList();
@@ -101,11 +101,19 @@ class CChannelList
CZapitChannel* getChannel(int number); CZapitChannel* getChannel(int number);
CZapitChannel* getChannel(t_channel_id channel_id); CZapitChannel* getChannel(t_channel_id channel_id);
CZapitChannel* getChannelFromIndex( uint32_t index) { if (chanlist.size() > index) return chanlist[index]; else return NULL;}; CZapitChannel* getChannelFromIndex( uint32_t index) {
CZapitChannel* operator[]( uint32_t index) { if (chanlist.size() > index) return chanlist[index]; else return NULL;}; if (chanlist.size() > index) return chanlist[index];
else return NULL;
};
CZapitChannel* operator[]( uint32_t index) {
if (chanlist.size() > index) return chanlist[index];
else return NULL;
};
int getKey(int); int getKey(int);
const char * getName (void) const { return name.c_str(); }; const char * getName (void) const {
return name.c_str();
};
const std::string & getActiveChannelName (void) const; // UTF-8 const std::string & getActiveChannelName (void) const; // UTF-8
t_satellite_position getActiveSatellitePosition(void) const; t_satellite_position getActiveSatellitePosition(void) const;
int getActiveChannelNumber (void) const; int getActiveChannelNumber (void) const;