Revert "hoc-clk: add live vdd2, live boost clock and basic pwm dimming"

This reverts commit 15b7df8ef1.
This commit is contained in:
souldbminersmwc
2025-11-09 16:14:52 -05:00
parent 22ec140738
commit 21a3f953d7
3804 changed files with 435 additions and 570162 deletions

View File

@@ -1,28 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/sf.hpp>
#include <stratosphere/fs/fs_directory.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_DIRECTORY_ACCESSOR_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, GetEntryCount, (ams::sf::Out<s64> out), (out)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, Read, (ams::sf::Out<s64> out, const ams::sf::OutMapAliasArray<fs::DirectoryEntry> &out_entries), (out, out_entries)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, SetPriorityForDirectory, (s32 priority), (priority)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, GetPriorityForDirectory, (ams::sf::Out<s32> out), (out))
AMS_SF_DEFINE_INTERFACE(ams::tma, IDirectoryAccessor, AMS_TMA_I_DIRECTORY_ACCESSOR_INTERFACE_INFO, 0x070BADB5)

View File

@@ -1,31 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/sf.hpp>
#include <stratosphere/fs/fs_file.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_FILE_ACCESSOR_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, ReadFile, (ams::sf::Out<s64> out, s64 offset, const ams::sf::OutNonSecureBuffer &buffer, ams::fs::ReadOption option), (out, offset, buffer, option)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, WriteFile, (s64 offset, const ams::sf::InNonSecureBuffer &buffer, ams::fs::WriteOption option), (offset, buffer, option)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, GetFileSize, (ams::sf::Out<s64> out), (out)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, SetFileSize, (s64 size), (size)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, FlushFile, (), ()) \
AMS_SF_METHOD_INFO(C, H, 5, Result, SetPriorityForFile, (s32 priority), (priority)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, GetPriorityForFile, (ams::sf::Out<s32> out), (out))
AMS_SF_DEFINE_INTERFACE(ams::tma, IFileAccessor, AMS_TMA_I_FILE_ACCESSOR_INTERFACE_INFO, 0x985A04E3)

View File

@@ -1,58 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/tma/tma_i_directory_accessor.hpp>
#include <stratosphere/tma/tma_i_file_accessor.hpp>
#include <stratosphere/tma/tma_path.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_FILE_MANAGER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out<sf::SharedPointer<tma::IFileAccessor>> out, const tma::Path &path, u32 open_mode, bool case_sensitive), (out, path, open_mode, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, FileExists, (sf::Out<bool> out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, DeleteFile, (const tma::Path &path, bool case_sensitive), (path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, RenameFile, (const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive), (old_path, new_path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, GetIOType, (sf::Out<s32> out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out<sf::SharedPointer<tma::IDirectoryAccessor>> out, const tma::Path &path, s32 open_mode, bool case_sensitive), (out, path, open_mode, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, DirectoryExists, (sf::Out<bool> out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 7, Result, CreateDirectory, (const tma::Path &path, bool case_sensitive), (path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path, bool recursively, bool case_sensitive), (path, recursively, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 9, Result, RenameDirectory, (const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive), (old_path, new_path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, CreateFile, (const tma::Path &path, s64 size, bool case_sensitive), (path, size, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 11, Result, GetFileTimeStamp, (sf::Out<u64> out_create, sf::Out<u64> out_access, sf::Out<u64> out_modify, const tma::Path &path, bool case_sensitive), (out_create, out_access, out_modify, path, case_sensitive)) \
AMS_SF_METHOD_INFO(C, H, 12, Result, GetCaseSensitivePath, (const tma::Path &path, const sf::OutBuffer &out), (path, out)) \
AMS_SF_METHOD_INFO(C, H, 13, Result, GetDiskFreeSpaceExW, (sf::Out<s64> out_free, sf::Out<s64> out_total, sf::Out<s64> out_total_free, const tma::Path &path), (out_free, out_total, out_total_free, path))
AMS_SF_DEFINE_INTERFACE(ams::tma, IFileManager, AMS_TMA_I_FILE_MANAGER_INTERFACE_INFO, 0xA15AF3E1)
/* Prior to system version 6.0.0, case sensitivity was not parameterized. */
#define AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out<sf::SharedPointer<tma::IFileAccessor>> out, const tma::Path &path, u32 open_mode), (out, path, open_mode)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, FileExists, (sf::Out<bool> out, const tma::Path &path), (out, path)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, DeleteFile, (const tma::Path &path), (path)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, RenameFile, (const tma::Path &old_path, const tma::Path &new_path), (old_path, new_path)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, GetIOType, (sf::Out<s32> out, const tma::Path &path), (out, path)) \
AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out<sf::SharedPointer<tma::IDirectoryAccessor>> out, const tma::Path &path, s32 open_mode), (out, path, open_mode)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, DirectoryExists, (sf::Out<bool> out, const tma::Path &path), (out, path)) \
AMS_SF_METHOD_INFO(C, H, 7, Result, CreateDirectory, (const tma::Path &path), (path)) \
AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path, bool recursively), (path, recursively)) \
AMS_SF_METHOD_INFO(C, H, 9, Result, RenameDirectory, (const tma::Path &old_path, const tma::Path &new_path), (old_path, new_path)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, CreateFile, (const tma::Path &path, s64 size), (path, size)) \
AMS_SF_METHOD_INFO(C, H, 11, Result, GetFileTimeStamp, (sf::Out<u64> out_create, sf::Out<u64> out_access, sf::Out<u64> out_modify, const tma::Path &path), (out_create, out_access, out_modify, path)) \
AMS_SF_METHOD_INFO(C, H, 12, Result, GetCaseSensitivePath, (const tma::Path &path, const sf::OutBuffer &out), (path, out)) \
AMS_SF_METHOD_INFO(C, H, 13, Result, GetDiskFreeSpaceExW, (sf::Out<s64> out_free, sf::Out<s64> out_total, sf::Out<s64> out_total_free, const tma::Path &path), (out_free, out_total, out_total_free, path))
AMS_SF_DEFINE_INTERFACE(ams::tma, IDeprecatedFileManager, AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO, 0xA15AF3E1)

View File

@@ -1,41 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_HTC_MANAGER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, GetEnvironmentVariable, (sf::Out<s32> out_size, const sf::OutBuffer &out, const sf::InBuffer &name), (out_size, out, name)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, GetEnvironmentVariableLength, (sf::Out<s32> out_size, const sf::InBuffer &name), (out_size, name)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, GetHostConnectionEvent, (sf::OutCopyHandle out), (out)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, GetHostDisconnectionEvent, (sf::OutCopyHandle out), (out)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, GetHostConnectionEventForSystem, (sf::OutCopyHandle out), (out)) \
AMS_SF_METHOD_INFO(C, H, 5, Result, GetHostDisconnectionEventForSystem, (sf::OutCopyHandle out), (out)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, GetBridgeIpAddress, (const sf::OutBuffer &out), (out)) \
AMS_SF_METHOD_INFO(C, H, 7, Result, GetBridgePort, (const sf::OutBuffer &out), (out)) \
AMS_SF_METHOD_INFO(C, H, 8, Result, SetCradleAttached, (bool attached), (attached)) \
AMS_SF_METHOD_INFO(C, H, 9, Result, GetBridgeSubnetMask, (const sf::OutBuffer &out), (out)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, GetBridgeMacAddress, (const sf::OutBuffer &out), (out)) \
AMS_SF_METHOD_INFO(C, H, 11, Result, GetWorkingDirectoryPath, (const sf::OutBuffer &out, s32 max_len), (out, max_len)) \
AMS_SF_METHOD_INFO(C, H, 12, Result, GetWorkingDirectoryPathSize, (sf::Out<s32> out_size), (out_size)) \
AMS_SF_METHOD_INFO(C, H, 13, Result, RunOnHostStart, (sf::Out<u32> out_id, sf::OutCopyHandle out, const sf::InBuffer &args), (out_id, out, args)) \
AMS_SF_METHOD_INFO(C, H, 14, Result, RunOnHostResults, (sf::Out<s32> out_result, u32 id), (out_result, id)) \
AMS_SF_METHOD_INFO(C, H, 15, Result, SetBridgeIpAddress, (const sf::InBuffer &arg), (arg)) \
AMS_SF_METHOD_INFO(C, H, 16, Result, SetBridgeSubnetMask, (const sf::InBuffer &arg), (arg)) \
AMS_SF_METHOD_INFO(C, H, 17, Result, SetBridgePort, (const sf::InBuffer &arg), (arg))
AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcManager, AMS_TMA_I_HTC_MANAGER_INTERFACE_INFO, 0x8591F069)

View File

@@ -1,43 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/htcs/htcs_types.hpp>
#include <stratosphere/tma/tma_i_socket.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_HTCS_MANAGER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, Socket, (sf::Out<s32> out_err, sf::Out<s32> out_sock), (out_err, out_sock)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, Close, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc), (out_err, out_res, desc)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, Connect, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, const htcs::SockAddrHtcs &address), (out_err, out_res, desc, address)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, Bind, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, const htcs::SockAddrHtcs &address), (out_err, out_res, desc, address)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, Listen, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 backlog_count), (out_err, out_res, desc, backlog_count)) \
AMS_SF_METHOD_INFO(C, H, 5, Result, Accept, (sf::Out<s32> out_err, sf::Out<s32> out_res, sf::Out<htcs::SockAddrHtcs> out_address, s32 desc), (out_err, out_res, out_address, desc)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, Recv, (sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::OutBuffer &buffer, s32 desc, s32 flags), (out_err, out_size, buffer, desc, flags)) \
AMS_SF_METHOD_INFO(C, H, 7, Result, Send, (sf::Out<s32> out_err, sf::Out<s64> out_size, s32 desc, const sf::InBuffer &buffer, s32 flags), (out_err, out_size, desc, buffer, flags)) \
AMS_SF_METHOD_INFO(C, H, 8, Result, Shutdown, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 how), (out_err, out_res, desc, how)) \
AMS_SF_METHOD_INFO(C, H, 9, Result, Fcntl, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 command, s32 value), (out_err, out_res, desc, command, value)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, GetPeerNameAny, (sf::Out<htcs::HtcsPeerName> out), (out)) \
AMS_SF_METHOD_INFO(C, H, 11, Result, GetDefaultHostName, (sf::Out<htcs::HtcsPeerName> out), (out)) \
AMS_SF_METHOD_INFO(C, H, 12, Result, CreateSocketOld, (sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out), (out_err, out)) \
AMS_SF_METHOD_INFO(C, H, 13, Result, CreateSocket, (sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out, bool enable_disconnection_emulation), (out_err, out, enable_disconnection_emulation)) \
AMS_SF_METHOD_INFO(C, H, 100, Result, RegisterProcessId, (const sf::ClientProcessId &client_pid), (client_pid)) \
AMS_SF_METHOD_INFO(C, H, 101, Result, MonitorManager, (const sf::ClientProcessId &client_pid), (client_pid)) \
AMS_SF_METHOD_INFO(C, H, 130, Result, StartSelect, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, const sf::InMapAliasArray<s32> &read_handles, const sf::InMapAliasArray<s32> &write_handles, const sf::InMapAliasArray<s32> &exception_handles, s64 tv_sec, s64 tv_usec), (out_task_id, out_event, read_handles, write_handles, exception_handles, tv_sec, tv_usec)) \
AMS_SF_METHOD_INFO(C, H, 131, Result, EndSelect, (sf::Out<s32> out_err, sf::Out<s32> out_count, const sf::OutMapAliasArray<s32> &read_handles, const sf::OutMapAliasArray<s32> &write_handles, const sf::OutMapAliasArray<s32> &exception_handles, u32 task_id), (out_err, out_count, read_handles, write_handles, exception_handles, task_id))
AMS_SF_DEFINE_INTERFACE(ams::tma, IHtcsManager, AMS_TMA_I_HTCS_MANAGER_INTERFACE_INFO, 0x91ECD04F)

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/htcs/htcs_types.hpp>
#include <stratosphere/tma/tma_i_socket.hpp>
/* NOTE: Minimum firmware version not enforced for any commands. */
#define AMS_TMA_I_SOCKET_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, Close, (sf::Out<s32> out_err, sf::Out<s32> out_res), (out_err, out_res)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, Connect, (sf::Out<s32> out_err, sf::Out<s32> out_res, const htcs::SockAddrHtcs &address), (out_err, out_res, address)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, Bind, (sf::Out<s32> out_err, sf::Out<s32> out_res, const htcs::SockAddrHtcs &address), (out_err, out_res, address)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, Listen, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 backlog_count), (out_err, out_res, backlog_count)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, Accept, (sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out, sf::Out<htcs::SockAddrHtcs> out_address), (out_err, out, out_address)) \
AMS_SF_METHOD_INFO(C, H, 5, Result, Recv, (sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::OutAutoSelectBuffer &buffer, s32 flags), (out_err, out_size, buffer, flags)) \
AMS_SF_METHOD_INFO(C, H, 6, Result, Send, (sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::InAutoSelectBuffer &buffer, s32 flags), (out_err, out_size, buffer, flags)) \
AMS_SF_METHOD_INFO(C, H, 7, Result, Shutdown, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 how), (out_err, out_res, how)) \
AMS_SF_METHOD_INFO(C, H, 8, Result, Fcntl, (sf::Out<s32> out_err, sf::Out<s32> out_res, s32 command, s32 value), (out_err, out_res, command, value)) \
AMS_SF_METHOD_INFO(C, H, 9, Result, AcceptStart, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event), (out_task_id, out_event)) \
AMS_SF_METHOD_INFO(C, H, 10, Result, AcceptResults, (sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out, sf::Out<htcs::SockAddrHtcs> out_address, u32 task_id), (out_err, out, out_address, task_id)) \
AMS_SF_METHOD_INFO(C, H, 11, Result, RecvStart, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, s32 mem_size, s32 flags), (out_task_id, out_event, mem_size, flags)) \
AMS_SF_METHOD_INFO(C, H, 12, Result, RecvResults, (sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id), (out_err, out_size, buffer, task_id)) \
AMS_SF_METHOD_INFO(C, H, 13, Result, RecvLargeStart, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, s32 unaligned_size_start, s32 unaligned_size_end, s64 aligned_size, sf::CopyHandle &&mem_handle, s32 flags), (out_task_id, out_event, unaligned_size_start, unaligned_size_end, aligned_size, std::move(mem_handle), flags)) \
AMS_SF_METHOD_INFO(C, H, 14, Result, SendStartOld, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &buffer, s32 flags), (out_task_id, out_event, buffer, flags)) \
AMS_SF_METHOD_INFO(C, H, 15, Result, SendLargeStart, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, const sf::InAutoSelectBuffer &start_buffer, const sf::InAutoSelectBuffer &end_buffer, sf::CopyHandle &&mem_handle, s64 aligned_size, s32 flags), (out_task_id, out_event, start_buffer, end_buffer, std::move(mem_handle), aligned_size, flags)) \
AMS_SF_METHOD_INFO(C, H, 16, Result, SendResults, (sf::Out<s32> out_err, sf::Out<s64> out_size, u32 task_id), (out_err, out_size, task_id)) \
AMS_SF_METHOD_INFO(C, H, 17, Result, StartSend, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, sf::Out<s64> out_max_size, s64 size, s32 flags), (out_task_id, out_event, out_max_size, size, flags)) \
AMS_SF_METHOD_INFO(C, H, 18, Result, ContinueSendOld, (sf::Out<s64> out_size, sf::Out<bool> out_wait, const sf::InAutoSelectBuffer &buffer, u32 task_id), (out_size, out_wait, buffer, task_id)) \
AMS_SF_METHOD_INFO(C, H, 19, Result, EndSend, (sf::Out<s32> out_err, sf::Out<s64> out_size, u32 task_id), (out_err, out_size, task_id)) \
AMS_SF_METHOD_INFO(C, H, 20, Result, StartRecv, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, s64 size, s32 flags), (out_task_id, out_event, size, flags)) \
AMS_SF_METHOD_INFO(C, H, 21, Result, EndRecv, (sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::OutAutoSelectBuffer &buffer, u32 task_id), (out_err, out_size, buffer, task_id)) \
AMS_SF_METHOD_INFO(C, H, 22, Result, SendStart, (sf::Out<u32> out_task_id, sf::OutCopyHandle out_event, const sf::InNonSecureAutoSelectBuffer &buffer, s32 flags), (out_task_id, out_event, buffer, flags)) \
AMS_SF_METHOD_INFO(C, H, 23, Result, ContinueSend, (sf::Out<s64> out_size, sf::Out<bool> out_wait, const sf::InNonSecureAutoSelectBuffer &buffer, u32 task_id), (out_size, out_wait, buffer, task_id)) \
AMS_SF_METHOD_INFO(C, H, 130, Result, GetPrimitive, (sf::Out<s32> out), (out))
AMS_SF_DEFINE_INTERFACE(ams::tma, ISocket, AMS_TMA_I_SOCKET_INTERFACE_INFO, 0x34CFC7C1)

View File

@@ -1,49 +0,0 @@
/*
* Copyright (c) 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
#include <stratosphere/fs/fs_common.hpp>
#include <stratosphere/fs/fs_directory.hpp>
#include <stratosphere/sf/sf_buffer_tags.hpp>
namespace ams::tma {
struct Path : ams::sf::LargeData {
char str[fs::EntryNameLengthMax + 1];
static constexpr Path Encode(const char *p) {
Path path = {};
for (size_t i = 0; i < sizeof(path) - 1; i++) {
path.str[i] = p[i];
if (p[i] == '\x00') {
break;
}
}
return path;
}
static constexpr size_t GetLength(const Path &path) {
size_t len = 0;
for (size_t i = 0; i < sizeof(path) - 1 && path.str[i] != '\x00'; i++) {
len++;
}
return len;
}
};
static_assert(util::is_pod<Path>::value && sizeof(Path) == fs::EntryNameLengthMax + 1);
}