summaryrefslogtreecommitdiff
path: root/p2pvr/lib/globalDevices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/lib/globalDevices.cpp')
-rw-r--r--p2pvr/lib/globalDevices.cpp39
1 files changed, 24 insertions, 15 deletions
diff --git a/p2pvr/lib/globalDevices.cpp b/p2pvr/lib/globalDevices.cpp
index c99fcea..4368cea 100644
--- a/p2pvr/lib/globalDevices.cpp
+++ b/p2pvr/lib/globalDevices.cpp
@@ -13,39 +13,48 @@ DECLARE_OPTIONS(GlobalDevices, "P2PVR Devices")
END_OPTIONS(GlobalDevices);
P2PVR::TunerPrx
-GlobalDevices::GetTunerSpecific(const DVBSI::DeliveryPtr & delivery, Ice::Long until, const Ice::Current & ice)
+GlobalDevices::GetTunerSpecific(const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice)
{
auto ic = ice.adapter->getCommunicator();
BOOST_FOREACH(const auto & pool, Devices) {
- auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
- auto tuner = poolprx->GetTunerSpecific(delivery, until);
- if (tuner) return tuner;
+ try {
+ auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
+ return poolprx->GetTunerSpecific(delivery);
+ }
+ catch (...) {
+ }
}
- return NULL;
+ throw P2PVR::NoSuitableDeviceAvailable();
}
P2PVR::TunerPrx
-GlobalDevices::GetTunerAny(short type, const DVBSI::DeliveryPtr & delivery, Ice::Long until, const Ice::Current & ice)
+GlobalDevices::GetTunerAny(short type, const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice)
{
auto ic = ice.adapter->getCommunicator();
BOOST_FOREACH(const auto & pool, Devices) {
- auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
- auto tuner = poolprx->GetTunerAny(type, delivery, until);
- if (tuner) return tuner;
+ try {
+ auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
+ return poolprx->GetTunerAny(type, delivery);
+ }
+ catch (...) {
+ }
}
- return NULL;
+ throw P2PVR::NoSuitableDeviceAvailable();
}
P2PVR::PrivateTunerPrx
-GlobalDevices::GetPrivateTuner(short type, Ice::Long until, const Ice::Current & ice)
+GlobalDevices::GetPrivateTuner(short type, const Ice::Current & ice)
{
auto ic = ice.adapter->getCommunicator();
BOOST_FOREACH(const auto & pool, Devices) {
- auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
- auto tuner = poolprx->GetPrivateTuner(type, until);
- if (tuner) return tuner;
+ try {
+ auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool));
+ return poolprx->GetPrivateTuner(type);
+ }
+ catch (...) {
+ }
}
- return NULL;
+ throw P2PVR::NoSuitableDeviceAvailable();
}
void