1 #include <kms++/kms++.h> 2 #include <set> 3 #include <string> 4 5 namespace kms { 6 7 class ResourceManager 8 { 9 public: 10 ResourceManager(Card& card); 11 12 void reset(); 13 card()14 Card& card() const { return m_card; } 15 Connector* reserve_connector(const std::string& name = ""); 16 Connector* reserve_connector(Connector* conn); 17 Crtc* reserve_crtc(Connector* conn); 18 Crtc* reserve_crtc(Crtc* crtc); 19 Plane* reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format = PixelFormat::Undefined); 20 Plane* reserve_plane(Plane* plane); 21 Plane* reserve_generic_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined); 22 Plane* reserve_primary_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined); 23 Plane* reserve_overlay_plane(Crtc* crtc, PixelFormat format = PixelFormat::Undefined); 24 25 private: 26 Card& m_card; 27 std::set<Connector*> m_reserved_connectors; 28 std::set<Crtc*> m_reserved_crtcs; 29 std::set<Plane*> m_reserved_planes; 30 }; 31 32 } 33