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

Origin commit data
------------------
Branch: ni/coolstream
Commit: 2ee4c374a3
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-03-25 (Sun, 25 Mar 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-03-25 16:40:59 +04:00
parent 0cec978933
commit c42bc75eed
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,7 +136,10 @@ void CServiceManager::ResetChannelNumbers()
it->second.number = 0;
}
#endif
it->second.has_bouquet = 0;
if(numbers)
it->second.number = 0;
if(bouquets)
it->second.has_bouquet = 0;
}
}