summaryrefslogtreecommitdiff
path: root/plexgdm.h
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2014-11-25 21:27:19 +0100
committerchriszero <zerov83@gmail.com>2014-11-25 21:27:19 +0100
commita9dd0c6a322f139e03a0ba4570e2a78508ddd6c3 (patch)
tree89cbb7cd4ac6f1ab11a5ef111f97dc5245a76081 /plexgdm.h
parent90f4be4ba9500df310af39b5274d3a6da69cd90f (diff)
downloadvdr-plugin-plex-a9dd0c6a322f139e03a0ba4570e2a78508ddd6c3.tar.gz
vdr-plugin-plex-a9dd0c6a322f139e03a0ba4570e2a78508ddd6c3.tar.bz2
Discovers now multiple Plexmediaservers
Diffstat (limited to 'plexgdm.h')
-rw-r--r--plexgdm.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/plexgdm.h b/plexgdm.h
index f48f07f..8cbedea 100644
--- a/plexgdm.h
+++ b/plexgdm.h
@@ -8,6 +8,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <vector>
#include <Poco/Net/SocketAddress.h>
#include <Poco/Net/MulticastSocket.h>
@@ -23,7 +24,10 @@ namespace plexclient
class plexgdm : public cThread
{
public:
- plexgdm();
+ static plexgdm& GetInstance() {
+ static plexgdm instance;
+ return instance;
+ }
~plexgdm();
void clientDetails(std::string c_id, std::string c_name, std::string c_port, std::string c_product, std::string c_version);
std::string getClientDetails();
@@ -39,16 +43,15 @@ public:
//void stopAll();
void stopRegistration();
-
- PlexServer* GetPServer() {
- return m_pServer;
+ std::vector<PlexServer> &GetPlexservers() {
+ return m_vServers;
}
protected:
private:
-
+ plexgdm();
cMutex m_mutex;
cCondVar m_waitCondition;
@@ -68,7 +71,7 @@ protected:
std::string _clientId;
std::string _multicastAddress;
int _clientUpdatePort;
- PlexServer *m_pServer;
+ std::vector<PlexServer> m_vServers;
};
}