1 #ifndef ANDROID_PDX_UDS_CHANNEL_MANAGER_H_
2 #define ANDROID_PDX_UDS_CHANNEL_MANAGER_H_
5 #include <unordered_map>
7 #include <pdx/channel_handle.h>
8 #include <pdx/file_handle.h>
9 #include <uds/channel_event_set.h>
15 class ChannelManager : public ChannelManagerInterface {
17 static ChannelManager& Get();
19 LocalChannelHandle CreateHandle(LocalHandle data_fd,
20 LocalHandle pollin_event_fd,
21 LocalHandle pollhup_event_fd);
23 ChannelEventReceiver* GetChannelData(int32_t handle);
26 ChannelManager() = default;
28 void CloseHandle(int32_t handle) override;
31 std::unordered_map<int32_t, ChannelEventReceiver> channels_;
36 } // namespace android
38 #endif // ANDROID_PDX_UDS_CHANNEL_MANAGER_H_