[tma2] [Ongoing] Continue implementing modules for tma2. (#1388)

* cs: add stub sysmodule to host command shell server

* cs: implement logic for main (linker error paradise, for now)

* cs: implement more of the system module's skeleton

* htcs: update client type names for libnx pr merge
This commit is contained in:
SciresM 2021-03-16 17:13:30 -07:00 committed by GitHub
parent 021d4c88fa
commit 5362ee9450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 1785 additions and 6 deletions

View file

@ -150,13 +150,13 @@ namespace ams::htcs::client {
}
Result RemoteSocket::Connect(sf::Out<s32> out_err, sf::Out<s32> out_res, const htcs::SockAddrHtcs &address) {
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::SockAddrHtcs));
return ::htcsSocketConnect(std::addressof(m_s), out_err.GetPointer(), out_res.GetPointer(), reinterpret_cast<const ::SockAddrHtcs *>(std::addressof(address)));
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::HtcsSockAddr));
return ::htcsSocketConnect(std::addressof(m_s), out_err.GetPointer(), out_res.GetPointer(), reinterpret_cast<const ::HtcsSockAddr *>(std::addressof(address)));
}
Result RemoteSocket::Bind(sf::Out<s32> out_err, sf::Out<s32> out_res, const htcs::SockAddrHtcs &address) {
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::SockAddrHtcs));
return ::htcsSocketBind(std::addressof(m_s), out_err.GetPointer(), out_res.GetPointer(), reinterpret_cast<const ::SockAddrHtcs *>(std::addressof(address)));
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::HtcsSockAddr));
return ::htcsSocketBind(std::addressof(m_s), out_err.GetPointer(), out_res.GetPointer(), reinterpret_cast<const ::HtcsSockAddr *>(std::addressof(address)));
}
Result RemoteSocket::Listen(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 backlog_count) {
@ -176,9 +176,9 @@ namespace ams::htcs::client {
}
Result RemoteSocket::AcceptResults(sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out, sf::Out<htcs::SockAddrHtcs> out_address, u32 task_id) {
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::SockAddrHtcs));
static_assert(sizeof(htcs::SockAddrHtcs) == sizeof(::HtcsSockAddr));
::HtcsSocket libnx_socket;
R_TRY(::htcsSocketAcceptResults(std::addressof(m_s), out_err.GetPointer(), std::addressof(libnx_socket), reinterpret_cast<::SockAddrHtcs *>(out_address.GetPointer()), task_id));
R_TRY(::htcsSocketAcceptResults(std::addressof(m_s), out_err.GetPointer(), std::addressof(libnx_socket), reinterpret_cast<::HtcsSockAddr *>(out_address.GetPointer()), task_id));
R_SUCCEED_IF(*out_err != 0);