htc: add remaining worker receive thread logic

This commit is contained in:
Michael Scire
2021-02-08 23:44:30 -08:00
committed by SciresM
parent 6fc24d8883
commit 2cdfde6637
11 changed files with 477 additions and 36 deletions

View File

@@ -26,9 +26,15 @@ namespace ams::htclow::ctrl {
using PacketList = util::IntrusiveListBaseTraits<HtcctrlPacket>::ListType;
private:
HtcctrlPacketFactory *m_packet_factory;
PacketList m_packet_list;
PacketList m_prior_packet_list;
PacketList m_posterior_packet_list;
private:
bool IsPriorPacket(HtcctrlPacketType packet_type) const;
bool IsPosteriorPacket(HtcctrlPacketType packet_type) const;
public:
HtcctrlSendBuffer(HtcctrlPacketFactory *pf) : m_packet_factory(pf), m_packet_list() { /* ... */ }
HtcctrlSendBuffer(HtcctrlPacketFactory *pf) : m_packet_factory(pf), m_prior_packet_list(), m_posterior_packet_list() { /* ... */ }
void AddPacket(std::unique_ptr<HtcctrlPacket, HtcctrlPacketDeleter> ptr);
};
}