#ifndef CBROWSERGRID_H #define CBROWSERGRID_H #include #include #include #include "Plexservice.h" #include "plexgdm.h" #include "PlexServer.h" #include "viewGridNavigator.h" #include "libskindesigner/osdelements.h" class cDummyElement : public cGridElement { public: virtual std::string GetTitle(); virtual void AddTokens(std::shared_ptr grid, bool clear = true, std::function OnCached = NULL); }; class cServerElement : public cGridElement { private: plexclient::PlexServer* m_pServer; std::string m_sStartPath; std::string m_sStartName; public: cServerElement(plexclient::PlexServer* server, std::string startPath, std::string startName); virtual std::string GetTitle(); virtual void AddTokens(std::shared_ptr grid, bool clear = true, std::function OnCached = NULL); std::string StartPath() { return m_sStartPath; } plexclient::PlexServer* Server() { return m_pServer; } }; class cBrowserGrid : public cViewGridNavigator { private: bool m_bServersAreRoot; std::vector m_vServerElements; std::shared_ptr m_pContainer; std::shared_ptr m_pService; cDummyElement m_Dummy; void ProcessData(); void SetServerElements(); public: cBrowserGrid(cViewGrid* viewGrid); cBrowserGrid(cViewGrid* viewGrid, std::shared_ptr service); std::shared_ptr MediaContainer() { return m_pContainer; } virtual eOSState NavigateSelect(); virtual eOSState NavigateBack(); }; #endif // CBROWSERGRID_H