1 #ifndef ANDROID_PDX_MESSAGE_WRITER_H_ 2 #define ANDROID_PDX_MESSAGE_WRITER_H_ 3 4 #include <pdx/channel_handle.h> 5 #include <pdx/file_handle.h> 6 #include <pdx/status.h> 7 8 namespace android { 9 namespace pdx { 10 11 class OutputResourceMapper { 12 public: 13 virtual Status<FileReference> PushFileHandle(const LocalHandle& handle) = 0; 14 virtual Status<FileReference> PushFileHandle( 15 const BorrowedHandle& handle) = 0; 16 virtual Status<FileReference> PushFileHandle(const RemoteHandle& handle) = 0; 17 virtual Status<ChannelReference> PushChannelHandle( 18 const LocalChannelHandle& handle) = 0; 19 virtual Status<ChannelReference> PushChannelHandle( 20 const BorrowedChannelHandle& handle) = 0; 21 virtual Status<ChannelReference> PushChannelHandle( 22 const RemoteChannelHandle& handle) = 0; 23 24 protected: 25 virtual ~OutputResourceMapper() = default; 26 }; 27 28 class MessageWriter { 29 public: 30 virtual void* GetNextWriteBufferSection(size_t size) = 0; 31 virtual OutputResourceMapper* GetOutputResourceMapper() = 0; 32 33 protected: 34 virtual ~MessageWriter() = default; 35 }; 36 37 } // namespace pdx 38 } // namespace android 39 40 #endif // ANDROID_PDX_MESSAGE_WRITER_H_ 41