#ifndef PLEXSERVICE_H #define PLEXSERVICE_H //#include "plexgdm.h" #include "PlexServer.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Config.h" #include "user.h" #include "MediaContainer.h" namespace plexclient { class Plexservice { public: Plexservice(PlexServer *server); Plexservice(PlexServer *server, std::string startUri); void DisplaySections(); std::shared_ptr GetSection(std::string section, bool putOnStack = true); std::shared_ptr GetLastSection(bool current = false); bool IsRoot(); void GetAuthDetails(); void Authenticate(); PlexServer* GetServer(); static std::string GetUniversalTranscodeUrl(Video* video, int offset = 0, PlexServer* server = 0); static std::string GetMyPlexToken(); static MediaContainer GetMediaContainer(std::string fullUrl); static std::string encode(std::string message); std::string StartUri; private: Poco::Mutex m_mutex; PlexServer *pServer; std::stack m_vUriStack; std::unique_ptr CreateRequest(std::string path); }; } #endif // PLEXSERVICE_H