htc: implement mux side of connecting (and more)

This commit is contained in:
Michael Scire
2021-02-09 19:07:51 -08:00
committed by SciresM
parent 70aae4e27a
commit 42cf3f50d7
24 changed files with 474 additions and 12 deletions

View File

@@ -55,12 +55,30 @@ namespace ams::htclow::mux {
void UpdateMuxState();
public:
Result Open(impl::ChannelInternalType channel);
Result Close(impl::ChannelInternalType channel);
Result ConnectBegin(u32 *out_task_id, impl::ChannelInternalType channel);
Result ConnectEnd(impl::ChannelInternalType channel, u32 task_id);
ChannelState GetChannelState(impl::ChannelInternalType channel);
os::EventType *GetChannelStateEvent(impl::ChannelInternalType channel);
Result FlushBegin(u32 *out_task_id, impl::ChannelInternalType channel);
Result FlushEnd(u32 task_id);
os::EventType *GetTaskEvent(u32 task_id);
Result ReceiveBegin(u32 *out_task_id, impl::ChannelInternalType channel, bool blocking);
Result ReceiveEnd(size_t *out, void *dst, size_t dst_size, impl::ChannelInternalType channel, u32 task_id);
Result SendBegin(u32 *out_task_id, size_t *out, const void *src, size_t src_size, impl::ChannelInternalType channel);
Result SendEnd(u32 task_id);
void SetSendBuffer(impl::ChannelInternalType channel, void *buf, size_t buf_size, size_t max_packet_size);
void SetReceiveBuffer(impl::ChannelInternalType channel, void *buf, size_t buf_size);
void SetSendBufferWithData(impl::ChannelInternalType channel, const void *buf, size_t buf_size, size_t max_packet_size);
Result Shutdown(impl::ChannelInternalType channel);
private:
Result CheckChannelExist(impl::ChannelInternalType channel);