diff options
Diffstat (limited to 'Plexservice.h')
-rw-r--r-- | Plexservice.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Plexservice.h b/Plexservice.h index aad20a9..456341b 100644 --- a/Plexservice.h +++ b/Plexservice.h @@ -28,6 +28,9 @@ #include "user.h" #include "MediaContainer.h" +#include <Poco/ScopedLock.h> +#include <Poco/Mutex.h> + namespace plexclient { @@ -48,12 +51,15 @@ public: static MediaContainer* GetMediaContainer(std::string fullUrl); -private: + private: + Poco::Mutex m_mutex; + // Never Access m_sToken directly! => possible race condition + std::string m_sToken; + std::string USERAGENT; Poco::Net::HTTPClientSession *m_pPlexSession; PlexServer *pServer; - std::string m_sToken; Poco::Net::HTTPClientSession* GetHttpSession(bool createNew = false); Poco::Net::HTTPRequest* CreateRequest(std::string path); |