diff options
author | chriszero <zerov83@gmail.com> | 2014-11-15 19:43:07 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2014-11-15 19:43:07 +0100 |
commit | 23f9f7712bfa33b5a488a447a6fabe6035cc3240 (patch) | |
tree | 06bbe8e0bc52496c5ad3c41accc7524aa597e670 /PlexServer.h | |
parent | a40adaf76fb1267d38b4c5e6386933ddb2d0d328 (diff) | |
download | vdr-plugin-plex-23f9f7712bfa33b5a488a447a6fabe6035cc3240.tar.gz vdr-plugin-plex-23f9f7712bfa33b5a488a447a6fabe6035cc3240.tar.bz2 |
initial commit
Diffstat (limited to 'PlexServer.h')
-rw-r--r-- | PlexServer.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/PlexServer.h b/PlexServer.h new file mode 100644 index 0000000..61438d3 --- /dev/null +++ b/PlexServer.h @@ -0,0 +1,81 @@ +#ifndef PLEXSERVER_H +#define PLEXSERVER_H + +#include <stdlib.h> +#include <string> +#include <sstream> +#include <iostream> +#include <vector> + +#include <Poco/String.h> +#include <Poco/Net/HTTPClientSession.h> +#include <Poco/Net/HTTPRequest.h> +#include <Poco/Net/MessageHeader.h> +#include <Poco/URI.h> + +namespace plexclient +{ + +class PlexServer +{ +public: + PlexServer(std::string data, std::string ip); + ~PlexServer(); + + int GetMaster() const { + return m_nMaster; + } + + int GetOwned() const { + return m_nOwned; + } + int GetPort() const { + return m_nPort; + } + const std::string& GetContentType() const { + return m_sContentType; + } + const std::string& GetDiscovery() const { + return m_sDiscovery; + } + const std::string& GetRole() const { + return m_sRole; + } + const std::string& GetServerName() const { + return m_sServerName; + } + long GetUpdated() const { + return m_nUpdated; + } + const std::string& GetUuid() const { + return m_sUuid; + } + const std::string& GetVersion() const { + return m_sVersion; + } + const std::string& GetIpAdress() const { + return m_sIpAddress; + } + + std::string GetUri(); + + void DiscoverSettings(); + +private: + std::string m_sDiscovery; + + int m_nOwned = 0; + int m_nMaster = 0; + std::string m_sRole; + std::string m_sContentType; + std::string m_sUuid; + std::string m_sServerName; + std::string m_sIpAddress; + int m_nPort; + long m_nUpdated; + std::string m_sVersion; + +}; + +} +#endif // PLEXSERVER_H |