zapit/src/getservices.cpp: add params to ResetChannelNumbers

This commit is contained in:
[CST] Focus
2012-03-25 16:40:59 +04:00
parent 9c78b22e35
commit 2ee4c374a3
2 changed files with 6 additions and 3 deletions

View File

@@ -152,7 +152,7 @@ class CServiceManager
bool AddCurrentChannel(CZapitChannel * &channel);
bool AddNVODChannel(CZapitChannel * &channel);
void ResetChannelNumbers();
void ResetChannelNumbers(bool bouquets = true, bool numbers = false);
void RemoveChannel(const t_channel_id channel_id);
void RemoveAllChannels();
void RemoveCurrentChannels();

View File

@@ -124,7 +124,7 @@ bool CServiceManager::AddNVODChannel(CZapitChannel * &channel)
return ret.second;
}
void CServiceManager::ResetChannelNumbers()
void CServiceManager::ResetChannelNumbers(bool bouquets, bool numbers)
{
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end(); ++it) {
#if 0 /* force to get free numbers if there are any */
@@ -136,6 +136,9 @@ void CServiceManager::ResetChannelNumbers()
it->second.number = 0;
}
#endif
if(numbers)
it->second.number = 0;
if(bouquets)
it->second.has_bouquet = 0;
}
}