From a9dd0c6a322f139e03a0ba4570e2a78508ddd6c3 Mon Sep 17 00:00:00 2001 From: chriszero Date: Tue, 25 Nov 2014 21:27:19 +0100 Subject: Discovers now multiple Plexmediaservers --- plexgdm.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'plexgdm.h') diff --git a/plexgdm.h b/plexgdm.h index f48f07f..8cbedea 100644 --- a/plexgdm.h +++ b/plexgdm.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -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 &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 m_vServers; }; } -- cgit v1.2.3