summaryrefslogtreecommitdiff
path: root/PlexServer.h
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-12-15 22:15:35 +0100
committerchriszero <zerov83@gmail.com>2015-12-15 22:15:35 +0100
commit7b64bf5062f3eb6ddff5d7606e44367bd5077e4c (patch)
tree258cbbc0d4edbe3bcabf58c6dee495d19384ed14 /PlexServer.h
parent135ed5d0ce1613f70f4b2ddcb9e8bca721ffca9e (diff)
downloadvdr-plugin-plex-7b64bf5062f3eb6ddff5d7606e44367bd5077e4c.tar.gz
vdr-plugin-plex-7b64bf5062f3eb6ddff5d7606e44367bd5077e4c.tar.bz2
Added SSL support, started support for remote
resources (servers). Browsing remote servers is working. plex.tv login is mandatory.
Diffstat (limited to 'PlexServer.h')
-rw-r--r--PlexServer.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/PlexServer.h b/PlexServer.h
index 0a36adb..e530aa9 100644
--- a/PlexServer.h
+++ b/PlexServer.h
@@ -10,6 +10,7 @@
#include <Poco/String.h>
#include <Poco/Net/HTTPClientSession.h>
+#include <Poco/Net/HTTPSClientSession.h>
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/MessageHeader.h>
#include <Poco/URI.h>
@@ -21,17 +22,17 @@ class PlexServer
{
friend class plexgdm;
-public:
+ public:
+ PlexServer(std::string uri, std::string name, std::string uuid, std::string accessToken, bool owned, bool local);
+ ~PlexServer();
+
int GetMaster() const {
return m_nMaster;
}
- int GetOwned() const {
+ int IsOwned() const {
return m_nOwned;
}
- int GetPort() const {
- return m_nPort;
- }
const std::string& GetContentType() const {
return m_sContentType;
}
@@ -53,11 +54,19 @@ public:
const std::string& GetVersion() const {
return m_sVersion;
}
- const std::string& GetIpAdress() const {
- return m_sIpAddress;
+ const std::string& GetAuthToken() const {
+ return m_authToken;
}
-
+ const bool& IsLocal() const {
+ return m_bLocal;
+ }
+
+ std::string GetHost();
+ int GetPort();
+
std::string GetUri();
+
+ Poco::Net::HTTPClientSession* GetClientSession();
void DiscoverSettings();
bool Offline;
@@ -73,15 +82,17 @@ private:
std::string m_sDiscovery;
int m_nOwned;
+ bool m_bLocal;
int m_nMaster;
std::string m_sRole;
std::string m_sContentType;
std::string m_sUuid;
std::string m_sServerName;
- std::string m_sIpAddress;
- int m_nPort;
+ std::string m_uri;
+ std::string m_authToken;
long m_nUpdated;
std::string m_sVersion;
+ Poco::Net::HTTPClientSession* m_httpSession;
};