mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
zapit/src/getservices.cpp: add helpers
Origin commit data
------------------
Commit: faf98f43d3
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-03-27 (Tue, 27 Mar 2012)
This commit is contained in:
@@ -193,6 +193,8 @@ class CServiceManager
|
||||
bool ReplaceProviderName(std::string &name, t_transport_stream_id tsid, t_original_network_id onid);
|
||||
int GetFreeNumber(bool radio);
|
||||
int GetMaxNumber(bool radio);
|
||||
void SetServiceChanged(bool changed) { services_changed = changed; }
|
||||
void FreeNumber(int number, bool radio);
|
||||
void UseNumber(int number, bool radio);
|
||||
void SetServicesChanged(bool changed) { services_changed = changed; }
|
||||
};
|
||||
#endif /* __getservices_h__ */
|
||||
|
@@ -452,7 +452,7 @@ void CServiceManager::ParseSatTransponders(fe_type_t fType, xmlNodePtr search, t
|
||||
|
||||
feparams.frequency = xmlGetNumericAttribute(tps, "frequency", 0);
|
||||
|
||||
freq_id_t freq;
|
||||
freq_id_t freq = 0;
|
||||
|
||||
feparams.inversion = INVERSION_AUTO;
|
||||
|
||||
@@ -1030,3 +1030,15 @@ int CServiceManager::GetMaxNumber(bool radio)
|
||||
}
|
||||
return i+1;
|
||||
}
|
||||
|
||||
void CServiceManager::FreeNumber(int number, bool radio)
|
||||
{
|
||||
service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers;
|
||||
channel_numbers->erase(number);
|
||||
}
|
||||
|
||||
void CServiceManager::UseNumber(int number, bool radio)
|
||||
{
|
||||
service_number_map_t * channel_numbers = radio ? &radio_numbers : &tv_numbers;
|
||||
channel_numbers->insert(number);
|
||||
}
|
||||
|
Reference in New Issue
Block a user