mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
zapit/src/getservices.cpp: add helpers
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);
|
bool ReplaceProviderName(std::string &name, t_transport_stream_id tsid, t_original_network_id onid);
|
||||||
int GetFreeNumber(bool radio);
|
int GetFreeNumber(bool radio);
|
||||||
int GetMaxNumber(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__ */
|
#endif /* __getservices_h__ */
|
||||||
|
@@ -452,7 +452,7 @@ void CServiceManager::ParseSatTransponders(fe_type_t fType, xmlNodePtr search, t
|
|||||||
|
|
||||||
feparams.frequency = xmlGetNumericAttribute(tps, "frequency", 0);
|
feparams.frequency = xmlGetNumericAttribute(tps, "frequency", 0);
|
||||||
|
|
||||||
freq_id_t freq;
|
freq_id_t freq = 0;
|
||||||
|
|
||||||
feparams.inversion = INVERSION_AUTO;
|
feparams.inversion = INVERSION_AUTO;
|
||||||
|
|
||||||
@@ -1030,3 +1030,15 @@ int CServiceManager::GetMaxNumber(bool radio)
|
|||||||
}
|
}
|
||||||
return i+1;
|
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