diff options
author | randomdan <randomdan@localhost> | 2014-09-19 23:52:30 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2014-09-19 23:52:30 +0000 |
commit | 28691c29e93fbc4fdb5ae4866287282840fba021 (patch) | |
tree | 8b83ca80afc3f3a5d11b04a56c440d2aa38f4e16 /p2pvr/daemon | |
parent | Support muxing directly in storage (diff) | |
download | p2pvr-28691c29e93fbc4fdb5ae4866287282840fba021.tar.bz2 p2pvr-28691c29e93fbc4fdb5ae4866287282840fba021.tar.xz p2pvr-28691c29e93fbc4fdb5ae4866287282840fba021.zip |
First bash at a slicer ice proxy for TMDb and an untested instantiation in p2pvr's core adapter
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r-- | p2pvr/daemon/Jamfile.jam | 2 | ||||
-rw-r--r-- | p2pvr/daemon/daemon.cpp | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/p2pvr/daemon/Jamfile.jam b/p2pvr/daemon/Jamfile.jam index 338f65e..96f60cb 100644 --- a/p2pvr/daemon/Jamfile.jam +++ b/p2pvr/daemon/Jamfile.jam @@ -14,7 +14,9 @@ lib p2pvrdaemon : <library>../ice//p2pvrice <library>../lib//p2pvrlib <library>../dvb//p2pvrdvb + <library>../../libtmdb//tmdb <library>..//p2sql <library>../devices//p2pvrdevices <library>../daemonbase//p2pvrdaemonbase + <implicit-dependency>../../libtmdb//tmdb ; diff --git a/p2pvr/daemon/daemon.cpp b/p2pvr/daemon/daemon.cpp index a2739eb..374a8b4 100644 --- a/p2pvr/daemon/daemon.cpp +++ b/p2pvr/daemon/daemon.cpp @@ -1,4 +1,5 @@ #include <daemonBase.h> +#include <options.h> #include "localDevices.h" #include "globalDevices.h" #include "maintenance.h" @@ -8,6 +9,24 @@ #include "recorder.h" #include "recordings.h" #include <Ice/ObjectAdapter.h> +#include <tmdb-proxy.h> + +// These configure external components and so they live here +class P2PVRTMDb { + public: + static std::string apikey; + static std::string baseUrl; + INITOPTIONS; +}; +std::string P2PVRTMDb::apikey; +std::string P2PVRTMDb::baseUrl; + +DECLARE_OPTIONS(P2PVRTMDb, "P2PVR TMDb configuration") +("p2pvr.tmdb.apikey", Options::value(&P2PVRTMDb::apikey, "48b32823d2b60c5c1085af36daed03fa"), + "The Movie Database API key") +("p2pvr.tmdb.baseurl", Options::value(&P2PVRTMDb::baseUrl, "http://private-5513-themoviedb.apiary-mock.com/3"), + "The Movie Database API base URL") +END_OPTIONS(P2PVRTMDb); class P2PvrDaemon : public DaemonBase { public: @@ -26,6 +45,7 @@ class P2PvrDaemon : public DaemonBase { adapter->add(new Storage(), ic->stringToIdentity("Storage")); adapter->add(new Recorder(adapter, timer), ic->stringToIdentity("Recorder")); adapter->add(new Recordings(), ic->stringToIdentity("Recordings")); + adapter->add(new TMDb::Proxy(P2PVRTMDb::baseUrl, P2PVRTMDb::apikey), ic->stringToIdentity("TMDb")); } }; |