1 #ifndef ANDROID_DVR_DISPLAY_MANAGER_CLIENT_H_ 2 #define ANDROID_DVR_DISPLAY_MANAGER_CLIENT_H_ 3 4 #include <string> 5 #include <vector> 6 7 #include <pdx/client.h> 8 #include <pdx/status.h> 9 #include <private/dvr/display_protocol.h> 10 11 namespace android { 12 namespace dvr { 13 14 class IonBuffer; 15 class ConsumerQueue; 16 17 namespace display { 18 19 class DisplayManagerClient : public pdx::ClientBase<DisplayManagerClient> { 20 public: 21 ~DisplayManagerClient() override; 22 23 pdx::Status<std::vector<SurfaceState>> GetSurfaceState(); 24 pdx::Status<std::unique_ptr<ConsumerQueue>> GetSurfaceQueue(int surface_id, 25 int queue_id); 26 27 using Client::event_fd; 28 GetEventMask(int events)29 pdx::Status<int> GetEventMask(int events) { 30 if (auto* client_channel = GetChannel()) 31 return client_channel->GetEventMask(events); 32 else 33 return pdx::ErrorStatus(EINVAL); 34 } 35 36 private: 37 friend BASE; 38 39 DisplayManagerClient(); 40 41 DisplayManagerClient(const DisplayManagerClient&) = delete; 42 void operator=(const DisplayManagerClient&) = delete; 43 }; 44 45 } // namespace display 46 } // namespace dvr 47 } // namespace android 48 49 #endif // ANDROID_DVR_DISPLAY_MANAGER_CLIENT_H_ 50