summaryrefslogtreecommitdiff
path: root/p2pvr/daemon/globalDevices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/daemon/globalDevices.cpp')
-rw-r--r--p2pvr/daemon/globalDevices.cpp89
1 files changed, 0 insertions, 89 deletions
diff --git a/p2pvr/daemon/globalDevices.cpp b/p2pvr/daemon/globalDevices.cpp
deleted file mode 100644
index 0705415..0000000
--- a/p2pvr/daemon/globalDevices.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-#include "globalDevices.h"
-#include <Ice/Ice.h>
-
-namespace po = boost::program_options;
-
-namespace P2PVR {
-GlobalDevices::Options::Options() :
- IceTray::Options("P2PVR Devices")
-{
-}
-
-ICETRAY_OPTIONS(GlobalDevices::Options,
- ("p2pvr.globaldevices.carddaemon", po::value(&Devices),
- "ICE address of remote device pools (<object>:<endpoint>)")
-)
-
-TunerPrx
-GlobalDevices::GetTunerSpecific(const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice)
-{
- auto ic = ice.adapter->getCommunicator();
- for (const auto & pool : options->Devices) {
- try {
- auto poolprx = DevicesPrx::checkedCast(ic->stringToProxy(pool));
- return poolprx->GetTunerSpecific(delivery);
- }
- catch (...) {
- }
- }
- throw NoSuitableDeviceAvailable();
-}
-
-TunerPrx
-GlobalDevices::GetTunerAny(const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice)
-{
- auto ic = ice.adapter->getCommunicator();
- for (const auto & pool : options->Devices) {
- try {
- auto poolprx = DevicesPrx::checkedCast(ic->stringToProxy(pool));
- return poolprx->GetTunerAny(delivery);
- }
- catch (...) {
- }
- }
- throw NoSuitableDeviceAvailable();
-}
-
-PrivateTunerPrx
-GlobalDevices::GetPrivateTuner(short type, const Ice::Current & ice)
-{
- auto ic = ice.adapter->getCommunicator();
- for (const auto & pool : options->Devices) {
- try {
- auto poolprx = DevicesPrx::checkedCast(ic->stringToProxy(pool));
- return poolprx->GetPrivateTuner(type);
- }
- catch (...) {
- }
- }
- throw NoSuitableDeviceAvailable();
-}
-
-void
-GlobalDevices::ReleaseTuner(const TunerPrx & tuner, const Ice::Current & ice)
-{
- auto ic = ice.adapter->getCommunicator();
- for (const auto & pool : options->Devices) {
- auto poolprx = DevicesPrx::checkedCast(ic->stringToProxy(pool));
- poolprx->ReleaseTuner(tuner);
- }
-}
-
-int
-GlobalDevices::TunerCount(const Ice::Current & ice)
-{
- int total = 0;
- auto ic = ice.adapter->getCommunicator();
- for (const auto & pool : options->Devices) {
- try {
- auto poolprx = DevicesPrx::checkedCast(ic->stringToProxy(pool));
- total += poolprx->TunerCount();
- }
- catch (...) {
- // Not available, don't count 'em
- }
- }
- return total;
-}
-}
-