diff options
Diffstat (limited to 'p2pvr/lib/globalDevices.cpp')
-rw-r--r-- | p2pvr/lib/globalDevices.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/p2pvr/lib/globalDevices.cpp b/p2pvr/lib/globalDevices.cpp index 8dfe77d..a21fe1f 100644 --- a/p2pvr/lib/globalDevices.cpp +++ b/p2pvr/lib/globalDevices.cpp @@ -57,3 +57,20 @@ GlobalDevices::ReleaseTuner(const P2PVR::TunerPrx & tuner, const Ice::Current & } } +int +GlobalDevices::TunerCount(const Ice::Current & ice) +{ + int total = 0; + auto ic = ice.adapter->getCommunicator(); + BOOST_FOREACH(const auto & pool, Devices) { + try { + auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); + total += poolprx->TunerCount(); + } + catch (...) { + // Not available, don't count 'em + } + } + return total; +} + |