From e93d71d9329dcc824d0bbb21811c750da0e713a8 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 8 Apr 2021 01:46:16 -0700 Subject: [PATCH] tipc: tentative core serialization logic (missing imports, won't compile) --- .../libstratosphere/include/stratosphere.hpp | 1 + .../include/stratosphere/tipc.hpp | 19 + .../impl/tipc_impl_command_serialization.hpp | 618 ++++++++++++++++++ .../libvapours/include/vapours/results.hpp | 1 + .../include/vapours/results/tipc_results.hpp | 30 + .../vapours/svc/ipc/svc_message_buffer.hpp | 26 +- 6 files changed, 688 insertions(+), 7 deletions(-) create mode 100644 libraries/libstratosphere/include/stratosphere/tipc.hpp create mode 100644 libraries/libstratosphere/include/stratosphere/tipc/impl/tipc_impl_command_serialization.hpp create mode 100644 libraries/libvapours/include/vapours/results/tipc_results.hpp diff --git a/libraries/libstratosphere/include/stratosphere.hpp b/libraries/libstratosphere/include/stratosphere.hpp index 2e0743841..b2b5cfff4 100644 --- a/libraries/libstratosphere/include/stratosphere.hpp +++ b/libraries/libstratosphere/include/stratosphere.hpp @@ -84,6 +84,7 @@ #include #include #include +#include #include #include #include diff --git a/libraries/libstratosphere/include/stratosphere/tipc.hpp b/libraries/libstratosphere/include/stratosphere/tipc.hpp new file mode 100644 index 000000000..c8d6589f0 --- /dev/null +++ b/libraries/libstratosphere/include/stratosphere/tipc.hpp @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include diff --git a/libraries/libstratosphere/include/stratosphere/tipc/impl/tipc_impl_command_serialization.hpp b/libraries/libstratosphere/include/stratosphere/tipc/impl/tipc_impl_command_serialization.hpp new file mode 100644 index 000000000..619812b85 --- /dev/null +++ b/libraries/libstratosphere/include/stratosphere/tipc/impl/tipc_impl_command_serialization.hpp @@ -0,0 +1,618 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include + +namespace ams::tipc { + + struct ClientProcessId { + os::ProcessId value; + }; + static_assert(std::is_trivial::value && sizeof(ClientProcessId) == sizeof(os::ProcessId), "ClientProcessId"); + +} + +namespace ams::tipc::impl { + + /* Machinery for filtering type lists. */ + template + struct TupleCat; + + template + struct TupleCat, std::tuple> { + using type = std::tuple; + }; + + template