mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
zapit/src/getservices.cpp: add GetTransponder() by id
This commit is contained in:
@@ -166,7 +166,8 @@ class CServiceManager
|
||||
void SetServicesChanged(bool changed) { services_changed = changed; }
|
||||
void UpdateSatTransponders(t_satellite_position satellitePosition);
|
||||
|
||||
bool GetTransponder(transponder &t);
|
||||
bool GetTransponder(transponder_id_t tid, transponder &t);
|
||||
transponder_list_t & GetTransponders() { return transponders; }
|
||||
transponder_list_t & GetSatelliteTransponders(t_satellite_position position) { return satelliteTransponders[position]; }
|
||||
};
|
||||
#endif /* __getservices_h__ */
|
||||
|
@@ -1055,13 +1055,12 @@ void CServiceManager::UseNumber(int number, bool radio)
|
||||
channel_numbers->insert(number);
|
||||
}
|
||||
|
||||
bool CServiceManager::GetTransponder(transponder &t)
|
||||
bool CServiceManager::GetTransponder(transponder_id_t tid, transponder &t)
|
||||
{
|
||||
for (transponder_list_t::iterator tI = transponders.begin(); tI != transponders.end(); tI++) {
|
||||
if (t == tI->second) {
|
||||
t = tI->second;
|
||||
return true;
|
||||
}
|
||||
stiterator tI = transponders.find(tid);
|
||||
if(tI != transponders.end()) {
|
||||
t = tI->second;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user