diff options
author | chriszero <zerov83@gmail.com> | 2015-02-05 21:32:55 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-02-05 21:32:55 +0100 |
commit | 312c13f4f6b299a976787542869f96b1e66549cf (patch) | |
tree | 7ee2732eaec79d50e0c9718960fd58e2436f10f6 /ControlServer.cpp | |
parent | 1ecdb2a5d9e05e0d30dae89e3d675218ca4c255e (diff) | |
download | vdr-plugin-plex-312c13f4f6b299a976787542869f96b1e66549cf.tar.gz vdr-plugin-plex-312c13f4f6b299a976787542869f96b1e66549cf.tar.bz2 |
Plex remote support.
Control via Plexapps (Android, IOS...)
Diffstat (limited to 'ControlServer.cpp')
-rw-r--r-- | ControlServer.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ControlServer.cpp b/ControlServer.cpp index c727e20..31363ae 100644 --- a/ControlServer.cpp +++ b/ControlServer.cpp @@ -3,20 +3,29 @@ namespace plexclient { -ControlServer::ControlServer() { +ControlServer::ControlServer() +{ m_pSvs = new Poco::Net::ServerSocket(3200);; m_pSrv = new Poco::Net::HTTPServer(new PlexReqHandlerFactory, *m_pSvs, new Poco::Net::HTTPServerParams); } - -void ControlServer::Start() { - // start the HTTPServer - m_pSrv->start(); -} -void ControlServer::Stop() { +void ControlServer::Stop() +{ + Cancel(1); // Stop the HTTPServer m_pSrv->stop(); } +void ControlServer::Action() +{ + isyslog("[plex] Starting Controlserver..."); + // start the HTTPServer + m_pSrv->start(); + while(Running()) { + SubscriptionManager::GetInstance().Notify(); + cCondWait::SleepMs(1000); + } +} + } |