id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
8,069
os_unsafe_memory_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_unsafe_memory_api.hpp
/* * 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 <stratosphere/os/os_memory_common.hpp> namespace ams::os { Result AllocateUnsafeMemory(uintptr_t *out_address, size_t size); Result FreeUnsafeMemory(uintptr_t address, size_t size); }
853
C++
.h
21
38.380952
76
0.76087
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,070
os_timer_event_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_timer_event_api.hpp
/* * 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/os/os_event_common.hpp> namespace ams::os { struct TimerEventType; struct MultiWaitHolderType; void InitializeTimerEvent(TimerEventType *event, EventClearMode clear_mode); void FinalizeTimerEvent(TimerEventType *event); void StartOneShotTimerEvent(TimerEventType *event, TimeSpan first_time); void StartPeriodicTimerEvent(TimerEventType *event, TimeSpan first_time, TimeSpan interval); void StopTimerEvent(TimerEventType *event); void WaitTimerEvent(TimerEventType *event); bool TryWaitTimerEvent(TimerEventType *event); void SignalTimerEvent(TimerEventType *event); void ClearTimerEvent(TimerEventType *event); void InitializeMultiWaitHolder(MultiWaitHolderType *multi_wait_holder, TimerEventType *event); }
1,460
C++
.h
32
42.40625
98
0.784355
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,071
os_common_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_common_types.hpp
/* * 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/os/os_common_config.hpp> #if defined(AMS_OS_IMPL_USE_PTHREADS) #include <pthread.h> #endif namespace ams::os { enum class TriBool { False = 0, True = 1, Undefined = 2, }; enum class MessageQueueWaitKind { ForNotEmpty, ForNotFull, }; struct ProcessId { u64 value; inline constexpr explicit operator u64() const { return this->value; } /* Invalid Process ID. */ static const ProcessId Invalid; }; inline constexpr const ProcessId ProcessId::Invalid = {static_cast<u64>(-1ull)}; inline constexpr const ProcessId InvalidProcessId = ProcessId::Invalid; inline constexpr bool operator==(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value == rhs.value; } inline constexpr bool operator!=(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value != rhs.value; } inline constexpr bool operator<(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value < rhs.value; } inline constexpr bool operator<=(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value <= rhs.value; } inline constexpr bool operator>(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value > rhs.value; } inline constexpr bool operator>=(const ProcessId &lhs, const ProcessId &rhs) { return lhs.value >= rhs.value; } }
2,157
C++
.h
60
30.783333
84
0.684767
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,072
os_light_semaphore_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_light_semaphore_types.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> #include <stratosphere/os/impl/os_internal_busy_mutex.hpp> #include <stratosphere/os/impl/os_internal_light_event.hpp> namespace ams::os { namespace impl { using LightSemaphoreMutex = InternalBusyMutex; using LightSemaphoreMutexStorage = InternalBusyMutexStorage; } struct LightSemaphoreType { enum State { State_NotInitialized = 0, State_Initialized = 1, }; u8 state; s32 count; s32 max_count; mutable impl::LightSemaphoreMutexStorage mutex; impl::InternalLightEventStorage ev_not_zero; }; static_assert(std::is_trivial<LightSemaphoreType>::value); }
1,423
C++
.h
38
32.789474
76
0.719477
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,073
os_rw_lock.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_rw_lock.hpp
/* * 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 <stratosphere/os/os_rw_lock_common.hpp> #include <stratosphere/os/os_rw_lock_types.hpp> #include <stratosphere/os/os_rw_lock_api.hpp> namespace ams::os { class ReaderWriterLock { NON_COPYABLE(ReaderWriterLock); NON_MOVEABLE(ReaderWriterLock); private: ReaderWriterLockType m_rw_lock; public: constexpr explicit ReaderWriterLock() : m_rw_lock {{ { MakeConstantInitializedLockCount(), 0 } }, 0, ::ams::os::ReaderWriterLockType::State_Initialized, nullptr, 0, {AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER}, {AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER} } { /* ... */ } constexpr ~ReaderWriterLock() { if (!std::is_constant_evaluated()) { os::FinalizeReaderWriterLock(std::addressof(m_rw_lock)); } } void AcquireReadLock() { return os::AcquireReadLock(std::addressof(m_rw_lock)); } bool TryAcquireReadLock() { return os::TryAcquireReadLock(std::addressof(m_rw_lock)); } void ReleaseReadLock() { return os::ReleaseReadLock(std::addressof(m_rw_lock)); } void AcquireWriteLock() { return os::AcquireWriteLock(std::addressof(m_rw_lock)); } bool TryAcquireWriteLock() { return os::TryAcquireWriteLock(std::addressof(m_rw_lock)); } void ReleaseWriteLock() { return os::ReleaseWriteLock(std::addressof(m_rw_lock)); } bool IsReadLockHeld() const { return os::IsReadLockHeld(std::addressof(m_rw_lock)); } bool IsWriteLockHeldByCurrentThread() const { return os::IsWriteLockHeldByCurrentThread(std::addressof(m_rw_lock)); } bool IsLockOwner() const { return os::IsReaderWriterLockOwnerThread(std::addressof(m_rw_lock)); } void lock_shared() { return this->AcquireReadLock(); } bool try_lock_shared() { return this->TryAcquireReadLock(); } void unlock_shared() { return this->ReleaseReadLock(); } void lock() { return this->AcquireWriteLock(); } bool try_lock() { return this->TryAcquireWriteLock(); } void unlock() { return this->ReleaseWriteLock(); } operator ReaderWriterLockType &() { return m_rw_lock; } operator const ReaderWriterLockType &() const { return m_rw_lock; } ReaderWriterLockType *GetBase() { return std::addressof(m_rw_lock); } }; }
3,638
C++
.h
90
29.155556
307
0.578559
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,074
os_debug_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_debug_types.hpp
/* * 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> namespace ams::os { struct MemoryInfo { u64 total_available_memory_size; size_t total_used_memory_size; size_t total_memory_heap_size; size_t allocated_memory_heap_size; size_t program_size; size_t total_thread_stack_size; int thread_count; }; }
984
C++
.h
28
31.25
76
0.717733
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,075
os_event_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_event_api.hpp
/* * 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/os/os_event_common.hpp> namespace ams::os { struct EventType; struct MultiWaitHolderType; void InitializeEvent(EventType *event, bool signaled, EventClearMode clear_mode); void FinalizeEvent(EventType *event); void SignalEvent(EventType *event); void WaitEvent(EventType *event); bool TryWaitEvent(EventType *event); bool TimedWaitEvent(EventType *event, TimeSpan timeout); void ClearEvent(EventType *event); void InitializeMultiWaitHolder(MultiWaitHolderType *multi_wait_holder, EventType *event); }
1,242
C++
.h
30
38.366667
93
0.766805
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,076
os_busy_mutex_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_busy_mutex_api.hpp
/* * 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> namespace ams::os { struct BusyMutexType; void InitializeBusyMutex(BusyMutexType *mutex); void FinalizeBusyMutex(BusyMutexType *mutex); void LockBusyMutex(BusyMutexType *mutex); bool TryLockBusyMutex(BusyMutexType *mutex); void UnlockBusyMutex(BusyMutexType *mutex); }
970
C++
.h
25
36.04
76
0.765708
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,077
os_light_message_queue_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_light_message_queue_api.hpp
/* * 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> namespace ams::os { struct LightMessageQueueType; void InitializeLightMessageQueue(LightMessageQueueType *mq, uintptr_t *buffer, size_t count); void FinalizeLightMessageQueue(LightMessageQueueType *mq); /* Sending (FIFO functionality) */ void SendLightMessageQueue(LightMessageQueueType *mq, uintptr_t data); bool TrySendLightMessageQueue(LightMessageQueueType *mq, uintptr_t data); bool TimedSendLightMessageQueue(LightMessageQueueType *mq, uintptr_t data, TimeSpan timeout); /* Jamming (LIFO functionality) */ void JamLightMessageQueue(LightMessageQueueType *mq, uintptr_t data); bool TryJamLightMessageQueue(LightMessageQueueType *mq, uintptr_t data); bool TimedJamLightMessageQueue(LightMessageQueueType *mq, uintptr_t data, TimeSpan timeout); /* Receive functionality */ void ReceiveLightMessageQueue(uintptr_t *out, LightMessageQueueType *mq); bool TryReceiveLightMessageQueue(uintptr_t *out, LightMessageQueueType *mq); bool TimedReceiveLightMessageQueue(uintptr_t *out, LightMessageQueueType *mq, TimeSpan timeout); /* Peek functionality */ void PeekLightMessageQueue(uintptr_t *out, const LightMessageQueueType *mq); bool TryPeekLightMessageQueue(uintptr_t *out, const LightMessageQueueType *mq); bool TimedPeekLightMessageQueue(uintptr_t *out, const LightMessageQueueType *mq, TimeSpan timeout); }
2,064
C++
.h
38
50.710526
103
0.782846
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,078
os_message_queue_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_message_queue_types.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> #include <stratosphere/os/impl/os_internal_condition_variable.hpp> namespace ams::os { namespace impl { class MultiWaitObjectList; } struct MessageQueueType { enum State { State_NotInitialized = 0, State_Initialized = 1, }; util::TypedStorage<impl::MultiWaitObjectList, sizeof(util::IntrusiveListNode), alignof(util::IntrusiveListNode)> waitlist_not_full; util::TypedStorage<impl::MultiWaitObjectList, sizeof(util::IntrusiveListNode), alignof(util::IntrusiveListNode)> waitlist_not_empty; uintptr_t *buffer; s32 capacity; s32 count; s32 offset; u8 state; mutable impl::InternalCriticalSectionStorage cs_queue; mutable impl::InternalConditionVariableStorage cv_not_full; mutable impl::InternalConditionVariableStorage cv_not_empty; }; static_assert(std::is_trivial<MessageQueueType>::value); }
1,689
C++
.h
41
36.02439
140
0.725442
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,079
os_interrupt_event_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_interrupt_event_api.hpp
/* * 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/os/os_interrupt_event_common.hpp> #include <stratosphere/os/os_native_handle.hpp> namespace ams::os { struct InterruptEventType; struct MultiWaitHolderType; void InitializeInterruptEvent(InterruptEventType *event, InterruptName name, EventClearMode clear_mode); void FinalizeInterruptEvent(InterruptEventType *event); void WaitInterruptEvent(InterruptEventType *event); bool TryWaitInterruptEvent(InterruptEventType *event); bool TimedWaitInterruptEvent(InterruptEventType *event, TimeSpan timeout); void ClearInterruptEvent(InterruptEventType *event); NativeHandle GetInterruptEventHandle(const InterruptEventType *event); void InitializeMultiWaitHolder(MultiWaitHolderType *multi_wait_holder, InterruptEventType *event); }
1,467
C++
.h
31
44.322581
108
0.795518
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,080
os_multiple_wait.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_multiple_wait.hpp
/* * 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 <stratosphere/os/os_multiple_wait_types.hpp> #include <stratosphere/os/os_multiple_wait_api.hpp> #include <stratosphere/os/os_multiple_wait_utils.hpp>
808
C++
.h
19
40.789474
76
0.768061
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,081
os_system_event.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_system_event.hpp
/* * 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 <stratosphere/os/os_event_common.hpp> #include <stratosphere/os/os_system_event_types.hpp> #include <stratosphere/os/os_system_event_api.hpp> namespace ams::os { class SystemEvent { NON_COPYABLE(SystemEvent); NON_MOVEABLE(SystemEvent); private: SystemEventType m_system_event; public: SystemEvent() { m_system_event.state = SystemEventType::State_NotInitialized; } explicit SystemEvent(EventClearMode clear_mode, bool inter_process) { R_ABORT_UNLESS(CreateSystemEvent(std::addressof(m_system_event), clear_mode, inter_process)); } explicit SystemEvent(NativeHandle read_handle, bool manage_read_handle, NativeHandle write_handle, bool manage_write_handle, EventClearMode clear_mode) { AttachSystemEvent(std::addressof(m_system_event), read_handle, manage_read_handle, write_handle, manage_write_handle, clear_mode); } ~SystemEvent() { if (m_system_event.state == SystemEventType::State_NotInitialized) { return; } DestroySystemEvent(std::addressof(m_system_event)); } void Attach(NativeHandle read_handle, bool manage_read_handle, NativeHandle write_handle, bool manage_write_handle, EventClearMode clear_mode) { AMS_ABORT_UNLESS(m_system_event.state == SystemEventType::State_NotInitialized); return AttachSystemEvent(std::addressof(m_system_event), read_handle, manage_read_handle, write_handle, manage_write_handle, clear_mode); } void AttachReadableHandle(NativeHandle read_handle, bool manage_read_handle, EventClearMode clear_mode) { AMS_ABORT_UNLESS(m_system_event.state == SystemEventType::State_NotInitialized); return AttachReadableHandleToSystemEvent(std::addressof(m_system_event), read_handle, manage_read_handle, clear_mode); } void AttachWritableHandle(NativeHandle write_handle, bool manage_write_handle, EventClearMode clear_mode) { AMS_ABORT_UNLESS(m_system_event.state == SystemEventType::State_NotInitialized); return AttachWritableHandleToSystemEvent(std::addressof(m_system_event), write_handle, manage_write_handle, clear_mode); } NativeHandle DetachReadableHandle() { return DetachReadableHandleOfSystemEvent(std::addressof(m_system_event)); } NativeHandle DetachWritableHandle() { return DetachWritableHandleOfSystemEvent(std::addressof(m_system_event)); } void Wait() { return WaitSystemEvent(std::addressof(m_system_event)); } bool TryWait() { return TryWaitSystemEvent(std::addressof(m_system_event)); } bool TimedWait(TimeSpan timeout) { return TimedWaitSystemEvent(std::addressof(m_system_event), timeout); } void Signal() { return SignalSystemEvent(std::addressof(m_system_event)); } void Clear() { return ClearSystemEvent(std::addressof(m_system_event)); } NativeHandle GetReadableHandle() const { return GetReadableHandleOfSystemEvent(std::addressof(m_system_event)); } NativeHandle GetWritableHandle() const { return GetWritableHandleOfSystemEvent(std::addressof(m_system_event)); } operator SystemEventType &() { return m_system_event; } operator const SystemEventType &() const { return m_system_event; } SystemEventType *GetBase() { return std::addressof(m_system_event); } }; }
4,607
C++
.h
91
39.208791
165
0.641522
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,082
os_interrupt_event_common.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_interrupt_event_common.hpp
/* * 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> namespace ams::os { #if defined(ATMOSPHERE_OS_HORIZON) using InterruptName = s32; #elif defined(ATMOSPHERE_OS_WINDOWS) using InterruptName = const char *; #elif defined(ATMOSPHERE_OS_LINUX) using InterruptName = const char *; #elif defined(ATMOSPHERE_OS_MACOS) using InterruptName = const char *; #endif }
1,015
C++
.h
28
33.392857
76
0.742132
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,083
os_io_region_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_io_region_types.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> #include <stratosphere/os/os_native_handle.hpp> namespace ams::os { struct IoRegionType { enum State { State_NotInitialized = 0, State_Initialized = 1, State_Mapped = 2, State_Detached = 3, }; NativeHandle handle; u8 state; size_t size; void *mapped_address; bool handle_managed; mutable impl::InternalCriticalSectionStorage cs_io_region; }; static_assert(std::is_trivial<IoRegionType>::value); }
1,280
C++
.h
36
30.555556
76
0.687399
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,084
os_sdk_condition_variable.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_sdk_condition_variable.hpp
/* * 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/os/os_sdk_mutex.hpp> #include <stratosphere/os/os_sdk_recursive_mutex.hpp> #include <stratosphere/os/impl/os_internal_condition_variable.hpp> namespace ams::os { struct SdkConditionVariableType { union { s32 _arr[sizeof(impl::InternalConditionVariableStorage) / sizeof(s32)]; impl::InternalConditionVariableStorage _storage; impl::InternalConditionVariableStorageTypeForConstantInitialize _storage_for_constant_initialize; }; ALWAYS_INLINE void Initialize() { GetReference(this->_storage).Initialize(); } void Wait(SdkMutexType &mutex); bool TimedWait(SdkMutexType &mutex, TimeSpan timeout); void Wait(SdkRecursiveMutexType &mutex); bool TimedWait(SdkRecursiveMutexType &mutex, TimeSpan timeout); ALWAYS_INLINE void Signal() { GetReference(this->_storage).Signal(); } ALWAYS_INLINE void Broadcast() { GetReference(this->_storage).Broadcast(); } }; static_assert(std::is_trivial<SdkConditionVariableType>::value); class SdkConditionVariable { private: SdkConditionVariableType m_cv; public: constexpr SdkConditionVariable() : m_cv{{AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER}} { /* ... */ } ALWAYS_INLINE void Wait(SdkMutex &m) { return m_cv.Wait(m.m_mutex); } ALWAYS_INLINE bool TimedWait(SdkMutex &m, TimeSpan timeout) { return m_cv.TimedWait(m.m_mutex, timeout); } ALWAYS_INLINE void Wait(SdkRecursiveMutex &m) { return m_cv.Wait(m.m_mutex); } ALWAYS_INLINE bool TimedWait(SdkRecursiveMutex &m, TimeSpan timeout) { return m_cv.TimedWait(m.m_mutex, timeout); } ALWAYS_INLINE void Signal() { return m_cv.Signal(); } ALWAYS_INLINE void Broadcast() { return m_cv.Broadcast(); } }; }
2,777
C++
.h
67
33.014925
129
0.650334
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,085
os_message_queue_common.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_message_queue_common.hpp
/* * 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> namespace ams::os { enum class MessageQueueWaitType { ForNotFull = 1, ForNotEmpty = 2, }; }
790
C++
.h
23
31.608696
76
0.734641
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,086
os_multiple_wait_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_multiple_wait_api.hpp
/* * 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/os/os_message_queue_common.hpp> #include <stratosphere/os/os_native_handle.hpp> namespace ams::os { struct MultiWaitHolderType; struct MultiWaitType; void InitializeMultiWait(MultiWaitType *multi_wait); void FinalizeMultiWait(MultiWaitType *multi_wait); MultiWaitHolderType *WaitAny(MultiWaitType *multi_wait); MultiWaitHolderType *TryWaitAny(MultiWaitType *multi_wait); MultiWaitHolderType *TimedWaitAny(MultiWaitType *multi_wait, TimeSpan timeout); void FinalizeMultiWaitHolder(MultiWaitHolderType *holder); void LinkMultiWaitHolder(MultiWaitType *multi_wait, MultiWaitHolderType *holder); void UnlinkMultiWaitHolder(MultiWaitHolderType *holder); void UnlinkAllMultiWaitHolder(MultiWaitType *multi_wait); void MoveAllMultiWaitHolder(MultiWaitType *dst, MultiWaitType *src); void SetMultiWaitHolderUserData(MultiWaitHolderType *holder, uintptr_t user_data); uintptr_t GetMultiWaitHolderUserData(const MultiWaitHolderType *holder); void InitializeMultiWaitHolder(MultiWaitHolderType *holder, NativeHandle handle); }
1,780
C++
.h
36
46.111111
86
0.794694
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,087
os_mutex_common.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_mutex_common.hpp
/* * 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> namespace ams::os { constexpr inline s32 MutexLockLevelMin = 1; constexpr inline s32 MutexLockLevelMax = BITSIZEOF(s32) - 1; constexpr inline s32 MutexLockLevelInitial = 0; constexpr inline s32 MutexRecursiveLockCountMax = (1 << BITSIZEOF(u16)) - 1; }
950
C++
.h
23
38.869565
80
0.748918
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,088
os_message_queue.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_message_queue.hpp
/* * 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 <stratosphere/os/os_message_queue_common.hpp> #include <stratosphere/os/os_message_queue_types.hpp> #include <stratosphere/os/os_message_queue_api.hpp> namespace ams::os { class MessageQueue { NON_COPYABLE(MessageQueue); NON_MOVEABLE(MessageQueue); private: MessageQueueType m_mq; public: explicit MessageQueue(uintptr_t *buf, size_t count) { InitializeMessageQueue(std::addressof(m_mq), buf, count); } ~MessageQueue() { FinalizeMessageQueue(std::addressof(m_mq)); } /* Sending (FIFO functionality) */ void Send(uintptr_t data) { return SendMessageQueue(std::addressof(m_mq), data); } bool TrySend(uintptr_t data) { return TrySendMessageQueue(std::addressof(m_mq), data); } bool TimedSend(uintptr_t data, TimeSpan timeout) { return TimedSendMessageQueue(std::addressof(m_mq), data, timeout); } /* Jamming (LIFO functionality) */ void Jam(uintptr_t data) { return JamMessageQueue(std::addressof(m_mq), data); } bool TryJam(uintptr_t data) { return TryJamMessageQueue(std::addressof(m_mq), data); } bool TimedJam(uintptr_t data, TimeSpan timeout) { return TimedJamMessageQueue(std::addressof(m_mq), data, timeout); } /* Receive functionality */ void Receive(uintptr_t *out) { return ReceiveMessageQueue(out, std::addressof(m_mq)); } bool TryReceive(uintptr_t *out) { return TryReceiveMessageQueue(out, std::addressof(m_mq)); } bool TimedReceive(uintptr_t *out, TimeSpan timeout) { return TimedReceiveMessageQueue(out, std::addressof(m_mq), timeout); } /* Peek functionality */ void Peek(uintptr_t *out) const { return PeekMessageQueue(out, std::addressof(m_mq)); } bool TryPeek(uintptr_t *out) const { return TryPeekMessageQueue(out, std::addressof(m_mq)); } bool TimedPeek(uintptr_t *out, TimeSpan timeout) const { return TimedPeekMessageQueue(out, std::addressof(m_mq), timeout); } operator MessageQueueType &() { return m_mq; } operator const MessageQueueType &() const { return m_mq; } MessageQueueType *GetBase() { return std::addressof(m_mq); } }; }
3,383
C++
.h
81
31.061728
84
0.595064
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,089
os_shared_memory.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_shared_memory.hpp
/* * 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/os/os_shared_memory_types.hpp> #include <stratosphere/os/os_shared_memory_api.hpp> namespace ams::os { class SharedMemory { NON_COPYABLE(SharedMemory); NON_MOVEABLE(SharedMemory); private: SharedMemoryType m_shared_memory; public: constexpr SharedMemory() : m_shared_memory{ .state = SharedMemoryType::State_NotInitialized } { /* ... */ } SharedMemory(size_t size, MemoryPermission my_perm, MemoryPermission other_perm) { R_ABORT_UNLESS(CreateSharedMemory(std::addressof(m_shared_memory), size, my_perm, other_perm)); } SharedMemory(size_t size, NativeHandle handle, bool managed) { this->Attach(size, handle, managed); } ~SharedMemory() { if (m_shared_memory.state == SharedMemoryType::State_NotInitialized) { return; } DestroySharedMemory(std::addressof(m_shared_memory)); } void Attach(size_t size, NativeHandle handle, bool managed) { return AttachSharedMemory(std::addressof(m_shared_memory), size, handle, managed); } void *Map(MemoryPermission perm) { return MapSharedMemory(std::addressof(m_shared_memory), perm); } void Unmap() { return UnmapSharedMemory(std::addressof(m_shared_memory)); } void *GetMappedAddress() const { return GetSharedMemoryAddress(std::addressof(m_shared_memory)); } size_t GetSize() const { return GetSharedMemorySize(std::addressof(m_shared_memory)); } NativeHandle GetHandle() const { return GetSharedMemoryHandle(std::addressof(m_shared_memory)); } operator SharedMemoryType &() { return m_shared_memory; } operator const SharedMemoryType &() const { return m_shared_memory; } SharedMemoryType *GetBase() { return std::addressof(m_shared_memory); } }; }
2,924
C++
.h
70
31.428571
111
0.609584
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,090
os_memory_permission.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_memory_permission.hpp
/* * 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/os/os_common_types.hpp> #include <stratosphere/os/os_memory_common.hpp> namespace ams::os { void SetMemoryPermission(uintptr_t address, size_t size, MemoryPermission perm); }
876
C++
.h
22
37.863636
84
0.766157
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,091
os_sdk_recursive_mutex.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_sdk_recursive_mutex.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> namespace ams::os { class SdkConditionVariable; struct SdkRecursiveMutexType { #if !defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD) os::ThreadType *owner_thread; #endif union { s32 _arr[sizeof(impl::InternalCriticalSectionStorage) / sizeof(s32)]; impl::InternalCriticalSectionStorage _storage; impl::InternalCriticalSectionStorageTypeForConstantInitialize _storage_for_constant_initialize; }; u32 recursive_count; }; static_assert(std::is_trivial<SdkRecursiveMutexType>::value); void InitializeSdkRecursiveMutex(SdkRecursiveMutexType *rmutex); void LockSdkRecursiveMutex(SdkRecursiveMutexType *rmutex); bool TryLockSdkRecursiveMutex(SdkRecursiveMutexType *rmutex); void UnlockSdkRecursiveMutex(SdkRecursiveMutexType *rmutex); bool IsSdkRecursiveMutexLockedByCurrentThread(const SdkRecursiveMutexType *rmutex); class SdkRecursiveMutex { private: friend class SdkConditionVariable; private: SdkRecursiveMutexType m_mutex; public: #if defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD) constexpr SdkRecursiveMutex() : m_mutex{ { AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CONSTANT_INITIALIZER }, 0 } { /* ... */ } #else constexpr SdkRecursiveMutex() : m_mutex{ nullptr, { AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CONSTANT_INITIALIZER }, 0 } { /* ... */ } #endif ALWAYS_INLINE void Lock() { return os::LockSdkRecursiveMutex(std::addressof(m_mutex)); } ALWAYS_INLINE bool TryLock() { return os::TryLockSdkRecursiveMutex(std::addressof(m_mutex)); } ALWAYS_INLINE void Unlock() { return os::UnlockSdkRecursiveMutex(std::addressof(m_mutex)); } ALWAYS_INLINE bool IsLockedByCurrentThread() const { return os::IsSdkRecursiveMutexLockedByCurrentThread(std::addressof(m_mutex)); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } }; }
2,973
C++
.h
57
45.087719
144
0.705923
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,092
os_memory_heap_common.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_memory_heap_common.hpp
/* * 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/os/os_common_types.hpp> #include <stratosphere/os/os_memory_common.hpp> namespace ams::os { constexpr inline size_t MemoryHeapUnitSize = 2_MB; constexpr inline size_t MemoryBlockUnitSize = 2_MB; constexpr inline size_t MemoryPageSize = 4_KB; }
955
C++
.h
24
37.541667
76
0.760518
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,093
os_barrier.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_barrier.hpp
/* * 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/os/os_barrier_types.hpp> #include <stratosphere/os/os_barrier_api.hpp> namespace ams::os { class Barrier { NON_COPYABLE(Barrier); NON_MOVEABLE(Barrier); private: BarrierType m_barrier; public: explicit Barrier(int num_threads) { InitializeBarrier(std::addressof(m_barrier), num_threads); } ~Barrier() { FinalizeBarrier(std::addressof(m_barrier)); } void Await() { return AwaitBarrier(std::addressof(m_barrier)); } operator BarrierType &() { return m_barrier; } operator const BarrierType &() const { return m_barrier; } BarrierType *GetBase() { return std::addressof(m_barrier); } }; }
1,581
C++
.h
46
26.521739
76
0.621232
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,094
os_light_event_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_light_event_api.hpp
/* * 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/os/os_event_common.hpp> namespace ams::os { struct LightEventType; void InitializeLightEvent(LightEventType *event, bool signaled, EventClearMode clear_mode); void FinalizeLightEvent(LightEventType *event); void SignalLightEvent(LightEventType *event); void WaitLightEvent(LightEventType *event); bool TryWaitLightEvent(LightEventType *event); bool TimedWaitLightEvent(LightEventType *event, TimeSpan timeout); void ClearLightEvent(LightEventType *event); }
1,190
C++
.h
28
39.642857
95
0.775952
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,095
os_native_handle_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_native_handle_types.hpp
/* * 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> namespace ams::os { #if defined(ATMOSPHERE_OS_HORIZON) using NativeHandle = svc::Handle; static_assert(std::unsigned_integral<NativeHandle>); constexpr inline NativeHandle InvalidNativeHandle = svc::InvalidHandle; #elif defined(ATMOSPHERE_OS_WINDOWS) using NativeHandle = void *; constexpr inline NativeHandle InvalidNativeHandle = nullptr; #elif defined(ATMOSPHERE_OS_LINUX) || defined(ATMOSPHERE_OS_MACOS) using NativeHandle = s32; constexpr inline NativeHandle InvalidNativeHandle = -1; #else #error "Unknown OS for os::NativeHandle" #endif }
1,314
C++
.h
32
36.59375
79
0.734437
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,096
os_light_semaphore_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_light_semaphore_api.hpp
/* * 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> namespace ams::os { struct LightSemaphoreType; void InitializeLightSemaphore(LightSemaphoreType *sema, s32 count, s32 max_count); void FinalizeLightSemaphore(LightSemaphoreType *sema); void AcquireLightSemaphore(LightSemaphoreType *sema); bool TryAcquireLightSemaphore(LightSemaphoreType *sema); bool TimedAcquireLightSemaphore(LightSemaphoreType *sema, TimeSpan timeout); void ReleaseLightSemaphore(LightSemaphoreType *sema); void ReleaseLightSemaphore(LightSemaphoreType *sema, s32 count); s32 GetCurrentLightSemaphoreCount(const LightSemaphoreType *sema); }
1,276
C++
.h
28
42.5
86
0.787097
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,097
os_multiple_wait_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_multiple_wait_types.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> namespace ams::os { namespace impl { class MultiWaitImpl; struct MultiWaitHolderImpl; } struct MultiWaitType { enum State { State_NotInitialized, State_Initialized, }; u8 state; bool is_waiting; util::TypedStorage<impl::MultiWaitImpl, util::AlignUp(sizeof(util::IntrusiveListNode) + sizeof(impl::InternalCriticalSection) + 2 * sizeof(void *) + sizeof(NativeHandle), alignof(void *)), alignof(void *)> impl_storage; }; static_assert(std::is_trivial<MultiWaitType>::value); struct MultiWaitHolderType { util::TypedStorage<impl::MultiWaitHolderImpl, 2 * sizeof(util::IntrusiveListNode) + 3 * sizeof(void *), alignof(void *)> impl_storage; uintptr_t user_data; }; static_assert(std::is_trivial<MultiWaitHolderType>::value); }
1,594
C++
.h
39
36.025641
227
0.710407
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,098
os_barrier_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/os_barrier_api.hpp
/* * 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> namespace ams::os { struct BarrierType; void InitializeBarrier(BarrierType *barrier, int num_threads); void FinalizeBarrier(BarrierType *barrier); void AwaitBarrier(BarrierType *barrier); }
883
C++
.h
23
35.826087
76
0.761124
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,099
os_internal_rw_busy_mutex_impl.os.macos.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.macos.hpp
/* * 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/os/impl/os_internal_rw_busy_mutex_value.hpp> namespace ams::os::impl { /* NOTE: The current implementation is based on load/linked store conditional, we should figure out how to do this on x64. */ class InternalReaderWriterBusyMutexImpl { private: u32 m_value; public: constexpr InternalReaderWriterBusyMutexImpl() : m_value(0) { if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } } constexpr void Initialize() { m_value = 0; if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } } void AcquireReadLock() { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } void ReleaseReadLock() { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } void AcquireWriteLock() { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } void ReleaseWriteLock() { AMS_ABORT("TODO: macOS InternalReaderWriterBusyMutexImpl"); } }; #define AMS_OS_INTERNAL_READER_WRITER_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZER {0} }
1,828
C++
.h
33
50.181818
173
0.723964
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,100
os_internal_light_event_impl.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_light_event_impl.os.horizon.hpp
/* * 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> namespace ams::os::impl { class TimeoutHelper; class InternalLightEventImpl { private: std::atomic<s32> m_state; u32 m_padding; public: explicit InternalLightEventImpl(bool signaled) { this->Initialize(signaled); } ~InternalLightEventImpl() { this->Finalize(); } void Initialize(bool signaled); void Finalize(); void SignalWithAutoClear(); void SignalWithManualClear(); void Clear(); void WaitWithAutoClear(); void WaitWithManualClear(); bool TryWaitWithAutoClear(); bool TryWaitWithManualClear(); bool TimedWaitWithAutoClear(const TimeoutHelper &timeout_helper); bool TimedWaitWithManualClear(const TimeoutHelper &timeout_helper); }; }
1,526
C++
.h
39
32.179487
90
0.679756
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,101
os_internal_condition_variable_impl.os.windows.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_condition_variable_impl.os.windows.hpp
/* * 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/os/os_condition_variable_common.hpp> #include <stratosphere/os/impl/os_internal_critical_section.hpp> namespace ams::os::impl { class TimeoutHelper; struct WindowsConditionVariable; using WindowsConditionVariableStorage = util::TypedStorage<WindowsConditionVariable, sizeof(void *), alignof(void *)>; #if defined(ATMOSPHERE_ARCH_X64) #define AMS_OS_WINDOWS_CONDITION_VARIABLE_CONSTANT_INITIALIZE_ARRAY_VALUES 0, 0 #elif defined(ATMOSPHERE_ARCH_X86) #define AMS_OS_WINDOWS_CONDITION_VARIABLE_CONSTANT_INITIALIZE_ARRAY_VALUES 0 #else #error "Unknown architecture for WindowsConditionVariable initializer" #endif class InternalConditionVariableImpl { private: u32 m_value; public: union { s32 _arr[sizeof(WindowsConditionVariableStorage) / sizeof(s32)]; WindowsConditionVariableStorage m_windows_cv_storage; }; constexpr InternalConditionVariableImpl() : _arr{AMS_OS_WINDOWS_CONDITION_VARIABLE_CONSTANT_INITIALIZE_ARRAY_VALUES} { /* ... */ } constexpr ~InternalConditionVariableImpl() { if (!std::is_constant_evaluated()) { this->Finalize(); } } void Initialize(); void Finalize(); void Signal(); void Broadcast(); void Wait(InternalCriticalSection *cs); ConditionVariableStatus TimedWait(InternalCriticalSection *cs, const TimeoutHelper &timeout_helper); }; struct InternalConditionVariableStorageTypeForConstantInitialize { s32 _arr[sizeof(WindowsConditionVariableStorage) / sizeof(s32)]; }; #define AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER { AMS_OS_WINDOWS_CONDITION_VARIABLE_CONSTANT_INITIALIZE_ARRAY_VALUES } }
2,552
C++
.h
54
39.981481
143
0.705433
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,102
os_internal_light_event.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_light_event.hpp
/* * 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> #if defined(ATMOSPHERE_OS_HORIZON) #include <stratosphere/os/impl/os_internal_light_event_impl.os.horizon.hpp> #elif defined(ATMOSPHERE_OS_WINDOWS) || defined(ATMOSPHERE_OS_LINUX) || defined(ATMOSPHERE_OS_MACOS) #include <stratosphere/os/impl/os_internal_light_event_impl.os.generic.hpp> #else #error "Unknown OS for ams::os::impl::InternalLightEventImpl" #endif namespace ams::os::impl { class InternalLightEvent { private: InternalLightEventImpl m_impl; public: explicit InternalLightEvent(bool signaled) : m_impl(signaled) { /* ... */ } ALWAYS_INLINE void SignalWithAutoClear() { return m_impl.SignalWithAutoClear(); } ALWAYS_INLINE void SignalWithManualClear() { return m_impl.SignalWithManualClear(); } ALWAYS_INLINE void Clear() { return m_impl.Clear(); } ALWAYS_INLINE void WaitWithAutoClear() { return m_impl.WaitWithAutoClear(); } ALWAYS_INLINE void WaitWithManualClear() { return m_impl.WaitWithManualClear(); } ALWAYS_INLINE bool TryWaitWithAutoClear() { return m_impl.TryWaitWithAutoClear(); } ALWAYS_INLINE bool TryWaitWithManualClear() { return m_impl.TryWaitWithManualClear(); } ALWAYS_INLINE bool TimedWaitWithAutoClear(const TimeoutHelper &timeout_helper) { return m_impl.TimedWaitWithAutoClear(timeout_helper); } ALWAYS_INLINE bool TimedWaitWithManualClear(const TimeoutHelper &timeout_helper) { return m_impl.TimedWaitWithManualClear(timeout_helper); } }; using InternalLightEventStorage = util::TypedStorage<InternalLightEvent>; }
2,305
C++
.h
42
49.190476
152
0.730906
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,103
os_internal_busy_mutex_impl.os.generic.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_busy_mutex_impl.os.generic.hpp
/* * 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> namespace ams::os::impl { class InternalBusyMutexImpl { private: std::atomic<bool> m_value{false}; u8 m_padding[3]{}; public: constexpr InternalBusyMutexImpl() = default; ALWAYS_INLINE void Initialize() { m_value.store(false, std::memory_order_relaxed); } ALWAYS_INLINE void Finalize() { /* ... */ } ALWAYS_INLINE bool IsLocked() const { return m_value.load(std::memory_order_acquire); } ALWAYS_INLINE bool TryLock() { bool expected = false; return m_value.compare_exchange_weak(expected, true, std::memory_order_acquire, std::memory_order_acquire); } ALWAYS_INLINE void Lock() { while (!this->TryLock()) { #if defined(ATMOSPHERE_ARCH_X64) || defined(ATMOSPHERE_ARCH_X86) _mm_pause(); #elif defined(ATMOSPHERE_ARCH_ARM64) || defined(ATMOSPHERE_ARCH_ARM) __asm__ __volatile__("yield" ::: "memory"); #else #error "InternalBusyMutex requires yield intrinsics" #endif } } ALWAYS_INLINE void Unlock() { m_value.store(false, std::memory_order_release); } }; static_assert(sizeof(InternalBusyMutexImpl) == sizeof(u32)); #define AMS_OS_INTERNAL_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZE_ARRAY_VALUES 0 }
2,182
C++
.h
49
34.653061
123
0.610849
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,104
os_internal_rw_busy_mutex_impl.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.horizon.hpp
/* * 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/os/impl/os_internal_rw_busy_mutex_value.hpp> namespace ams::os::impl { class InternalReaderWriterBusyMutexImpl { private: u32 m_value; public: constexpr InternalReaderWriterBusyMutexImpl() : m_value(0) { /* ... */ } constexpr void Initialize() { m_value = 0; } void AcquireReadLock(); void ReleaseReadLock(); void AcquireWriteLock(); void ReleaseWriteLock(); }; #define AMS_OS_INTERNAL_READER_WRITER_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZER {0} }
1,257
C++
.h
32
34.09375
84
0.697617
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,105
os_internal_condition_variable_impl.pthread.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_condition_variable_impl.pthread.hpp
/* * 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/os/os_condition_variable_common.hpp> #include <stratosphere/os/impl/os_internal_critical_section.hpp> namespace ams::os::impl { class TimeoutHelper; class InternalConditionVariableImpl { private: pthread_cond_t m_pthread_cond = PTHREAD_COND_INITIALIZER; public: constexpr InternalConditionVariableImpl() = default; constexpr ~InternalConditionVariableImpl() { if (!std::is_constant_evaluated()) { this->Finalize(); } } void Initialize(); void Finalize(); void Signal(); void Broadcast(); void Wait(InternalCriticalSection *cs); ConditionVariableStatus TimedWait(InternalCriticalSection *cs, const TimeoutHelper &timeout_helper); }; using InternalConditionVariableStorageTypeForConstantInitialize = pthread_cond_t; #define AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER ._storage_for_constant_initialize = PTHREAD_COND_INITIALIZER }
1,759
C++
.h
41
36.219512
133
0.702402
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,106
os_internal_critical_section_impl.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_critical_section_impl.os.horizon.hpp
/* * 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> namespace ams::os::impl { #if defined(ATMOSPHERE_OS_HORIZON) class ReaderWriterLockHorizonImpl; #endif class InternalConditionVariableImpl; class InternalCriticalSectionImpl { private: #if defined(ATMOSPHERE_OS_HORIZON) friend class ReaderWriterLockHorizonImpl; #endif friend class InternalConditionVariableImpl; private: u32 m_thread_handle; public: constexpr InternalCriticalSectionImpl() : m_thread_handle(svc::InvalidHandle) { /* ... */ } constexpr void Initialize() { m_thread_handle = svc::InvalidHandle; } constexpr void Finalize() { /* ... */ } void Enter(); bool TryEnter(); void Leave(); bool IsLockedByCurrentThread() const; ALWAYS_INLINE void Lock() { return this->Enter(); } ALWAYS_INLINE bool TryLock() { return this->TryEnter(); } ALWAYS_INLINE void Unlock() { return this->Leave(); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } }; using InternalCriticalSectionStorageTypeForConstantInitialize = u32; #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CONSTANT_INITIALIZER {0} #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD }
2,170
C++
.h
49
36.897959
103
0.667142
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,107
os_internal_critical_section_impl.pthread.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_critical_section_impl.pthread.hpp
/* * 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/os/os_common_types.hpp> namespace ams::os::impl { class InternalConditionVariableImpl; /* NOTE: macOS (and possibly other targets) do not provide adaptive mutex. */ #if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) #define AMS_OS_IMPL_PTHREAD_MUTEX_INITIALIZER PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP #else #define AMS_OS_IMPL_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #endif #if defined(ATMOSPHERE_OS_LINUX) #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD #else //#define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD #endif class InternalCriticalSectionImpl { private: friend class InternalConditionVariableImpl; private: pthread_mutex_t m_pthread_mutex = AMS_OS_IMPL_PTHREAD_MUTEX_INITIALIZER; public: constexpr InternalCriticalSectionImpl() = default; constexpr ~InternalCriticalSectionImpl() { if (!std::is_constant_evaluated()) { this->Finalize(); } } void Initialize(); void Finalize(); void Enter(); bool TryEnter(); void Leave(); #if defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD) bool IsLockedByCurrentThread() const; #endif ALWAYS_INLINE void Lock() { return this->Enter(); } ALWAYS_INLINE bool TryLock() { return this->TryEnter(); } ALWAYS_INLINE void Unlock() { return this->Leave(); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } }; using InternalCriticalSectionStorageTypeForConstantInitialize = pthread_mutex_t; #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CONSTANT_INITIALIZER ._storage_for_constant_initialize = AMS_OS_IMPL_PTHREAD_MUTEX_INITIALIZER }
2,788
C++
.h
61
38.081967
144
0.67711
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,108
os_internal_light_event_impl.os.generic.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_light_event_impl.os.generic.hpp
/* * 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/os/impl/os_internal_critical_section.hpp> #include <stratosphere/os/impl/os_internal_condition_variable.hpp> namespace ams::os::impl { class TimeoutHelper; class InternalLightEventImpl { private: u16 m_counter_low; u8 m_counter_high; std::atomic<u8> m_signal_state; InternalCriticalSection m_cs; InternalConditionVariable m_cv; public: explicit InternalLightEventImpl(bool signaled) { this->Initialize(signaled); } ~InternalLightEventImpl() { this->Finalize(); } void Initialize(bool signaled); void Finalize(); void SignalWithAutoClear(); void SignalWithManualClear(); void Clear(); void WaitWithAutoClear(); void WaitWithManualClear(); bool TryWaitWithAutoClear(); bool TryWaitWithManualClear(); bool TimedWaitWithAutoClear(const TimeoutHelper &timeout_helper); bool TimedWaitWithManualClear(const TimeoutHelper &timeout_helper); }; }
1,785
C++
.h
44
33.477273
90
0.686308
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,109
os_internal_busy_mutex.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_busy_mutex.hpp
/* * 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> #if defined(ATMOSPHERE_OS_HORIZON) #include <stratosphere/os/impl/os_internal_busy_mutex_impl.os.horizon.hpp> #elif defined(ATMOSPHERE_OS_WINDOWS) || defined(ATMOSPHERE_OS_LINUX) || defined(ATMOSPHERE_OS_MACOS) #include <stratosphere/os/impl/os_internal_busy_mutex_impl.os.generic.hpp> #else #error "Unknown OS for ams::os::impl::InternalBusyMutexImpl" #endif namespace ams::os::impl { class InternalBusyMutex { private: InternalBusyMutexImpl m_impl; public: constexpr InternalBusyMutex() : m_impl() { /* ... */ } ALWAYS_INLINE void Initialize() { m_impl.Initialize(); } ALWAYS_INLINE void Finalize() { m_impl.Finalize(); } ALWAYS_INLINE bool IsLocked() const { return m_impl.IsLocked(); } ALWAYS_INLINE void Lock() { return m_impl.Lock(); } ALWAYS_INLINE bool TryLock() { return m_impl.TryLock(); } ALWAYS_INLINE void Unlock() { return m_impl.Unlock(); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } }; using InternalBusyMutexStorage = util::TypedStorage<InternalBusyMutex>; }
1,962
C++
.h
42
41.047619
100
0.682199
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,110
os_internal_condition_variable.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_condition_variable.hpp
/* * 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/os/os_condition_variable_common.hpp> #if defined(AMS_OS_IMPL_USE_PTHREADS) #include <stratosphere/os/impl/os_internal_condition_variable_impl.pthread.hpp> #elif defined(ATMOSPHERE_OS_HORIZON) #include <stratosphere/os/impl/os_internal_condition_variable_impl.os.horizon.hpp> #elif defined(ATMOSPHERE_OS_WINDOWS) #include <stratosphere/os/impl/os_internal_condition_variable_impl.os.windows.hpp> #else #error "Unknown OS for ams::os::impl::InternalConditionVariableImpl" #endif namespace ams::os::impl { class InternalConditionVariable { private: InternalConditionVariableImpl m_impl; public: constexpr InternalConditionVariable() : m_impl() { /* ... */ } void Initialize() { m_impl.Initialize(); } void Finalize() { m_impl.Finalize(); } void Signal() { m_impl.Signal(); } void Broadcast() { m_impl.Broadcast(); } void Wait(InternalCriticalSection *cs) { m_impl.Wait(cs); } ConditionVariableStatus TimedWait(InternalCriticalSection *cs, const TimeoutHelper &timeout_helper) { return m_impl.TimedWait(cs, timeout_helper); } }; using InternalConditionVariableStorage = util::TypedStorage<InternalConditionVariable>; }
2,129
C++
.h
54
32.240741
113
0.669413
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,111
os_internal_rw_busy_mutex.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex.hpp
/* * 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> #if defined(ATMOSPHERE_OS_HORIZON) #include <stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.horizon.hpp> #elif defined(ATMOSPHERE_OS_WINDOWS) #include <stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.windows.hpp> #elif defined(ATMOSPHERE_OS_LINUX) #include <stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.linux.hpp> #elif defined(ATMOSPHERE_OS_MACOS) #include <stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.macos.hpp> #else #error "Unknown OS for ams::os::impl::InternalReaderWriterBusyMutexImpl" #endif namespace ams::os::impl { class InternalReaderWriterBusyMutex { private: InternalReaderWriterBusyMutexImpl m_impl; public: constexpr InternalReaderWriterBusyMutex() : m_impl() { /* ... */ } ALWAYS_INLINE void AcquireReadLock() { return m_impl.AcquireReadLock(); } ALWAYS_INLINE void ReleaseReadLock() { return m_impl.ReleaseReadLock(); } ALWAYS_INLINE void AcquireWriteLock() { return m_impl.AcquireWriteLock(); } ALWAYS_INLINE void ReleaseWriteLock() { return m_impl.ReleaseWriteLock(); } }; using InternalReaderWriterBusyMutexStorage = util::TypedStorage<InternalReaderWriterBusyMutex>; }
1,926
C++
.h
41
42.512195
99
0.738412
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,112
os_internal_busy_mutex_impl.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_busy_mutex_impl.os.horizon.hpp
/* * 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> namespace ams::os::impl { class InternalBusyMutexImpl { private: u32 m_value; public: constexpr InternalBusyMutexImpl() : m_value(0) { /* ... */ } constexpr void Initialize() { m_value = 0; } constexpr void Finalize() { /* ... */ } constexpr bool IsLocked() const { return m_value != 0; } void Lock(); bool TryLock(); void Unlock(); }; #define AMS_OS_INTERNAL_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZE_ARRAY_VALUES 0 }
1,216
C++
.h
32
32.4375
78
0.663265
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,113
os_internal_critical_section_impl.os.windows.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_critical_section_impl.os.windows.hpp
/* * 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> namespace ams::os::impl { class InternalConditionVariableImpl; struct WindowsCriticalSection; using WindowsCriticalSectionStorage = util::TypedStorage<WindowsCriticalSection, 8 + 4 * sizeof(void *), alignof(void *)>; #if defined(ATMOSPHERE_ARCH_X64) #define AMS_OS_WINDOWS_CRITICAL_SECTION_CONSTANT_INITIALIZE_ARRAY_VALUES -1, -1, -1, 0, 0, 0, 0, 0, 0, 0 #elif defined(ATMOSPHERE_ARCH_X86) #define AMS_OS_WINDOWS_CRITICAL_SECTION_CONSTANT_INITIALIZE_ARRAY_VALUES -1, -1, 0, 0, 0, 0 #else #error "Unknown architecture for WindowsCriticalSection initializer" #endif class InternalCriticalSectionImpl { private: friend class InternalConditionVariableImpl; private: union { s32 _arr[sizeof(WindowsCriticalSectionStorage) / sizeof(s32)]; WindowsCriticalSectionStorage m_windows_critical_section_storage; }; public: constexpr InternalCriticalSectionImpl() : _arr{AMS_OS_WINDOWS_CRITICAL_SECTION_CONSTANT_INITIALIZE_ARRAY_VALUES} { /* ... */ } constexpr ~InternalCriticalSectionImpl() { if (!std::is_constant_evaluated()) { this->Finalize(); } } void Initialize(); void Finalize(); void Enter(); bool TryEnter(); void Leave(); bool IsLockedByCurrentThread() const; ALWAYS_INLINE void Lock() { return this->Enter(); } ALWAYS_INLINE bool TryLock() { return this->TryEnter(); } ALWAYS_INLINE void Unlock() { return this->Leave(); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } }; struct InternalCriticalSectionStorageTypeForConstantInitialize { s32 _arr[sizeof(WindowsCriticalSectionStorage) / sizeof(s32)]; }; #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CONSTANT_INITIALIZER { AMS_OS_WINDOWS_CRITICAL_SECTION_CONSTANT_INITIALIZE_ARRAY_VALUES } #define AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD }
2,932
C++
.h
60
40.766667
139
0.669118
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,114
os_internal_critical_section.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_critical_section.hpp
/* * 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> #if defined(AMS_OS_IMPL_USE_PTHREADS) #include <stratosphere/os/impl/os_internal_critical_section_impl.pthread.hpp> #elif defined(ATMOSPHERE_OS_HORIZON) #include <stratosphere/os/impl/os_internal_critical_section_impl.os.horizon.hpp> #elif defined(ATMOSPHERE_OS_WINDOWS) #include <stratosphere/os/impl/os_internal_critical_section_impl.os.windows.hpp> #else #error "Unknown OS for ams::os::impl::InternalCriticalSectionImpl" #endif namespace ams::os::impl { class InternalCriticalSection { private: InternalCriticalSectionImpl m_impl; public: constexpr InternalCriticalSection() : m_impl() { /* ... */ } void Initialize() { m_impl.Initialize(); } void Finalize() { m_impl.Finalize(); } void Enter() { return m_impl.Enter(); } bool TryEnter() { return m_impl.TryEnter(); } void Leave() { return m_impl.Leave(); } #if defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD) bool IsLockedByCurrentThread() const { return m_impl.IsLockedByCurrentThread(); } #endif ALWAYS_INLINE void Lock() { return this->Enter(); } ALWAYS_INLINE bool TryLock() { return this->TryEnter(); } ALWAYS_INLINE void Unlock() { return this->Leave(); } ALWAYS_INLINE void lock() { return this->Lock(); } ALWAYS_INLINE bool try_lock() { return this->TryLock(); } ALWAYS_INLINE void unlock() { return this->Unlock(); } InternalCriticalSectionImpl *Get() { return std::addressof(m_impl); } const InternalCriticalSectionImpl *Get() const { return std::addressof(m_impl); } }; using InternalCriticalSectionStorage = util::TypedStorage<InternalCriticalSection>; }
2,574
C++
.h
55
39.563636
97
0.663208
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,115
os_internal_rw_busy_mutex_impl.os.windows.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.windows.hpp
/* * 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/os/impl/os_internal_rw_busy_mutex_value.hpp> namespace ams::os::impl { /* NOTE: The current implementation is based on load/linked store conditional, we should figure out how to do this on x64. */ /* We could also consider using https://docs.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks */ class InternalReaderWriterBusyMutexImpl { private: u32 m_value; public: constexpr InternalReaderWriterBusyMutexImpl() : m_value(0) { if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } } constexpr void Initialize() { m_value = 0; if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } } void AcquireReadLock() { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } void ReleaseReadLock() { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } void AcquireWriteLock() { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } void ReleaseWriteLock() { AMS_ABORT("TODO: Windows InternalReaderWriterBusyMutexImpl"); } }; #define AMS_OS_INTERNAL_READER_WRITER_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZER {0} }
1,962
C++
.h
34
52.5
175
0.72642
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,116
os_memory_fence_api.os.generic.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_memory_fence_api.os.generic.hpp
/* * 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> #if defined(ATMOSPHERE_ARCH_X64) #include <xmmintrin.h> #include <emmintrin.h> #endif namespace ams::os::impl { #if defined(ATMOSPHERE_ARCH_X64) ALWAYS_INLINE void FenceMemoryStoreStore() { __asm__ __volatile__("" ::: "memory"); _mm_sfence(); } ALWAYS_INLINE void FenceMemoryStoreLoad() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryStoreAny() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryLoadStore() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryLoadLoad() { __asm__ __volatile__("" ::: "memory"); _mm_lfence(); } ALWAYS_INLINE void FenceMemoryLoadAny() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryAnyStore() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryAnyLoad() { __asm__ __volatile__("" ::: "memory"); _mm_mfence(); } ALWAYS_INLINE void FenceMemoryAnyAny() {__asm__ __volatile__("" ::: "memory"); _mm_mfence(); } #elif defined(ATMOSPHERE_ARCH_ARM64) ALWAYS_INLINE void FenceMemoryStoreStore() { __asm__ __volatile__("dmb ishst" ::: "memory"); } ALWAYS_INLINE void FenceMemoryStoreLoad() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryStoreAny() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadStore() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadLoad() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadAny() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyStore() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyLoad() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyAny() { __asm__ __volatile__("dmb ish" ::: "memory"); } #else #error "Unknown architecture for os::impl::FenceMemory* (Generic)" #endif }
2,870
C++
.h
46
57.152174
107
0.62789
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,117
os_internal_rw_busy_mutex_value.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex_value.hpp
/* * 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> namespace ams::os::impl { #if defined(ATMOSPHERE_OS_HORIZON) || defined(ATMOSPHERE_OS_WINDOWS) || defined(ATMOSPHERE_OS_LINUX) || defined(ATMOSPHERE_OS_MACOS) class InternalReaderWriterBusyMutexValue { public: static constexpr inline u8 WriterCountMax = std::numeric_limits<u8>::max(); static constexpr ALWAYS_INLINE u16 GetReaderCount(u32 v) { return static_cast<u16>(v >> 0); } static constexpr ALWAYS_INLINE u8 GetWriterCurrent(u32 v) { return static_cast<u8>(v >> 16); } static constexpr ALWAYS_INLINE u8 GetWriterNext(u32 v) { return static_cast<u8>(v >> 24); } static constexpr ALWAYS_INLINE u32 IncrementWriterNext(u32 v) { return v + (1u << 24); } static constexpr ALWAYS_INLINE bool IsWriteLocked(u32 v) { return GetWriterCurrent(v) != GetWriterNext(v); } static ALWAYS_INLINE u8 *GetWriterCurrentPointer(u32 *p) { if constexpr (util::IsLittleEndian()) { return reinterpret_cast<u8 *>(reinterpret_cast<uintptr_t>(p)) + 2; } else { return reinterpret_cast<u8 *>(reinterpret_cast<uintptr_t>(p)) + 1; } } }; #else #error "Unknown OS for ams::os::impl::InternalReaderWriterBusyMutexValue" #endif }
2,248
C++
.h
49
34.918367
136
0.602558
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,118
os_memory_fence_api.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_memory_fence_api.os.horizon.hpp
/* * 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> namespace ams::os::impl { #if defined(ATMOSPHERE_ARCH_ARM64) ALWAYS_INLINE void FenceMemoryStoreStore() { __asm__ __volatile__("dmb ishst" ::: "memory"); } ALWAYS_INLINE void FenceMemoryStoreLoad() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryStoreAny() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadStore() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadLoad() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryLoadAny() { __asm__ __volatile__("dmb ishld" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyStore() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyLoad() { __asm__ __volatile__("dmb ish" ::: "memory"); } ALWAYS_INLINE void FenceMemoryAnyAny() { __asm__ __volatile__("dmb ish" ::: "memory"); } #else #error "Unknown architecture for os::impl::FenceMemory* (Horizon)" #endif }
1,770
C++
.h
32
50.71875
102
0.654714
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,119
os_internal_rw_busy_mutex_impl.os.linux.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_rw_busy_mutex_impl.os.linux.hpp
/* * 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/os/impl/os_internal_rw_busy_mutex_value.hpp> namespace ams::os::impl { /* NOTE: The current implementation is based on load/linked store conditional, we should figure out how to do this on x64. */ class InternalReaderWriterBusyMutexImpl { private: u32 m_value; public: constexpr InternalReaderWriterBusyMutexImpl() : m_value(0) { if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } } constexpr void Initialize() { m_value = 0; if (!std::is_constant_evaluated()) { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } } void AcquireReadLock() { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } void ReleaseReadLock() { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } void AcquireWriteLock() { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } void ReleaseWriteLock() { AMS_ABORT("TODO: Linux InternalReaderWriterBusyMutexImpl"); } }; #define AMS_OS_INTERNAL_READER_WRITER_BUSY_MUTEX_IMPL_CONSTANT_INITIALIZER {0} }
1,828
C++
.h
33
50.181818
173
0.723964
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,120
os_internal_condition_variable_impl.os.horizon.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/os/impl/os_internal_condition_variable_impl.os.horizon.hpp
/* * 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/os/os_condition_variable_common.hpp> #include <stratosphere/os/impl/os_internal_critical_section.hpp> namespace ams::os::impl { class TimeoutHelper; class InternalConditionVariableImpl { private: u32 m_value; public: constexpr InternalConditionVariableImpl() : m_value(0) { /* ... */ } constexpr void Initialize() { m_value = 0; } constexpr void Finalize() { /* ... */ } void Signal(); void Broadcast(); void Wait(InternalCriticalSection *cs); ConditionVariableStatus TimedWait(InternalCriticalSection *cs, const TimeoutHelper &timeout_helper); }; using InternalConditionVariableStorageTypeForConstantInitialize = u32; #define AMS_OS_INTERNAL_CONDITION_VARIABLE_IMPL_CONSTANT_INITIALIZER {0} }
1,558
C++
.h
38
35.157895
112
0.698675
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,121
lr_i_location_resolver_manager.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver_manager.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_i_location_resolver.hpp> #include <stratosphere/lr/lr_i_add_on_content_location_resolver.hpp> #include <stratosphere/lr/lr_i_registered_location_resolver.hpp> #define AMS_LR_I_LOCATION_RESOLVER_MANAGER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenLocationResolver, (sf::Out<ams::sf::SharedPointer<lr::ILocationResolver>> out, ncm::StorageId storage_id), (out, storage_id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, OpenRegisteredLocationResolver, (sf::Out<ams::sf::SharedPointer<lr::IRegisteredLocationResolver>> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, RefreshLocationResolver, (ncm::StorageId storage_id), (storage_id)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, OpenAddOnContentLocationResolver, (sf::Out<ams::sf::SharedPointer<lr::IAddOnContentLocationResolver>> out), (out), hos::Version_2_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, SetEnabled, (const ams::sf::InMapAliasArray<ncm::StorageId> &storages), (storages), hos::Version_15_0_0) AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolverManager, AMS_LR_I_LOCATION_RESOLVER_MANAGER_INTERFACE_INFO, 0xB2950191)
2,229
C++
.h
27
80.185185
204
0.61528
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,122
lr_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_i_location_resolver.hpp> namespace ams::lr { class LocationResolver { NON_COPYABLE(LocationResolver); private: sf::SharedPointer<ILocationResolver> m_interface; public: LocationResolver() : m_interface(nullptr) { /* ... */ } explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : m_interface(intf) { /* ... */ } LocationResolver(LocationResolver &&rhs) { m_interface = std::move(rhs.m_interface); } LocationResolver &operator=(LocationResolver &&rhs) { LocationResolver(std::move(rhs)).swap(*this); return *this; } void swap(LocationResolver &rhs) { std::swap(m_interface, rhs.m_interface); } public: Result ResolveProgramPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveProgramPath(out, id)); } void RedirectProgramPath(const Path &path, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_ABORT_UNLESS(m_interface->RedirectProgramPath(path, id)); } Result ResolveApplicationControlPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveApplicationControlPath(out, id)); } Result ResolveApplicationHtmlDocumentPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveApplicationHtmlDocumentPath(out, id)); } Result ResolveDataPath(Path *out, ncm::DataId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveDataPath(out, id)); } void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectApplicationControlPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectApplicationControlPathDeprecated(path, id)); } } void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id)); } } Result ResolveApplicationLegalInformationPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveApplicationLegalInformationPath(out, id)); } void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPathDeprecated(path, id)); } } Result Refresh() { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->Refresh()); } void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathDeprecated(path, id)); } } Result ClearApplicationRedirection() { AMS_ASSERT(m_interface != nullptr); AMS_ASSERT(hos::GetVersion() < hos::Version_9_0_0); R_RETURN(this->ClearApplicationRedirection(nullptr, 0)); } Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_RETURN(m_interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids))); } else { R_RETURN(m_interface->ClearApplicationRedirectionDeprecated()); } } Result EraseProgramRedirection(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->EraseProgramRedirection(id)); } Result EraseApplicationControlRedirection(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->EraseApplicationControlRedirection(id)); } Result EraseApplicationHtmlDocumentRedirection(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->EraseApplicationHtmlDocumentRedirection(id)); } Result EraseApplicationLegalInformationRedirection(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->EraseApplicationLegalInformationRedirection(id)); } Result ResolveProgramPathForDebug(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveProgramPathForDebug(out, id)); } void RedirectProgramPathForDebug(const Path &path, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_ABORT_UNLESS(m_interface->RedirectProgramPathForDebug(path, id)); } void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebug(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebugDeprecated(path, id)); } } Result EraseProgramRedirectionForDebug(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->EraseProgramRedirectionForDebug(id)); } Result Disable() { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->Disable()); } }; }
7,987
C++
.h
152
38.822368
124
0.594467
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,123
lr_location_resolver_manager_impl.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_location_resolver_manager_impl.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_i_location_resolver_manager.hpp> #include <stratosphere/ncm/ncm_bounded_map.hpp> namespace ams::lr { class LocationResolverManagerImpl { private: static constexpr size_t ResolverCountMax = 5; private: /* Resolver storage. */ ncm::BoundedMap<ncm::StorageId, sf::SharedPointer<ILocationResolver>, ResolverCountMax> m_location_resolvers{}; ncm::BoundedMap<ncm::StorageId, bool, ResolverCountMax> m_location_resolvers_enabled{}; bool m_default_enabled = true; sf::SharedPointer<IRegisteredLocationResolver> m_registered_location_resolver = nullptr; sf::SharedPointer<IAddOnContentLocationResolver> m_add_on_content_location_resolver = nullptr; os::SdkMutex m_mutex{}; public: /* Actual commands. */ Result OpenLocationResolver(sf::Out<sf::SharedPointer<ILocationResolver>> out, ncm::StorageId storage_id); Result OpenRegisteredLocationResolver(sf::Out<sf::SharedPointer<IRegisteredLocationResolver>> out); Result RefreshLocationResolver(ncm::StorageId storage_id); Result OpenAddOnContentLocationResolver(sf::Out<sf::SharedPointer<IAddOnContentLocationResolver>> out); Result SetEnabled(const sf::InMapAliasArray<ncm::StorageId> &storages); }; static_assert(IsILocationResolverManager<LocationResolverManagerImpl>); }
2,140
C++
.h
41
45.756098
123
0.726839
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,124
lr_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_api.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_location_resolver.hpp> #include <stratosphere/lr/lr_add_on_content_location_resolver.hpp> #include <stratosphere/lr/lr_registered_location_resolver.hpp> namespace ams::lr { /* Management. */ void Initialize(); void Finalize(); /* Service API. */ Result OpenLocationResolver(LocationResolver *out, ncm::StorageId storage_id); Result OpenRegisteredLocationResolver(RegisteredLocationResolver *out); Result OpenAddOnContentLocationResolver(AddOnContentLocationResolver *out); Result RefreshLocationResolver(ncm::StorageId storage_id); }
1,288
C++
.h
30
40.233333
82
0.772546
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,125
lr_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_types.hpp
/* * 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_directory.hpp> #include <stratosphere/sf/sf_buffer_tags.hpp> namespace ams::lr { struct alignas(4) Path : ams::sf::LargeData { char str[fs::EntryNameLengthMax]; static constexpr Path Encode(const char *p) { Path path = {}; /* Copy C string to path, terminating when a null byte is found. */ for (size_t i = 0; i < sizeof(path) - 1; i++) { path.str[i] = p[i]; if (p[i] == '\x00') { break; } } return path; } constexpr inline size_t GetLength() const { /* Determine length from the first null byte occurence. */ size_t len = 0; for (size_t i = 0; i < sizeof(this->str) - 1 && this->str[i] != '\x00'; i++) { len++; } return len; } constexpr inline bool IsValid() const { /* Determine validity by presence of a terminating null byte. */ for (size_t i = 0; i < sizeof(this->str); i++) { if (this->str[i] == '\x00') { return true; } } return false; } }; static_assert(util::is_pod<Path>::value && sizeof(Path) == fs::EntryNameLengthMax); struct PathByMapAlias : public Path, ams::sf::PrefersMapAliasTransferMode{}; static_assert(util::is_pod<PathByMapAlias>::value); static_assert(sizeof(PathByMapAlias) == sizeof(Path)); }
2,211
C++
.h
56
31.214286
90
0.589469
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,126
lr_i_registered_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_i_registered_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #define AMS_LR_I_REGISTERED_LOCATION_RESOLVER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, ResolveProgramPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RegisterProgramPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_1_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RegisterProgramPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 2, Result, UnregisterProgramPath, (ncm::ProgramId id), (id)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, RedirectProgramPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_1_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 3, Result, RedirectProgramPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, ResolveHtmlDocumentPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id), hos::Version_2_0_0) \ AMS_SF_METHOD_INFO(C, H, 5, Result, RegisterHtmlDocumentPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_2_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 5, Result, RegisterHtmlDocumentPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 6, Result, UnregisterHtmlDocumentPath, (ncm::ProgramId id), (id), hos::Version_2_0_0) \ AMS_SF_METHOD_INFO(C, H, 7, Result, RedirectHtmlDocumentPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_2_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 7, Result, RedirectHtmlDocumentPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 8, Result, Refresh, (), (), hos::Version_7_0_0) \ AMS_SF_METHOD_INFO(C, H, 9, Result, RefreshExcluding, (const sf::InArray<ncm::ProgramId> &ids), (ids), hos::Version_9_0_0) AMS_SF_DEFINE_INTERFACE(ams::lr, IRegisteredLocationResolver, AMS_LR_I_REGISTERED_LOCATION_RESOLVER_INTERFACE_INFO, 0x35346AC9)
3,917
C++
.h
33
115.484848
207
0.528472
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,127
lr_i_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_i_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #define AMS_LR_I_LOCATION_RESOLVER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, ResolveProgramPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RedirectProgramPath, (const lr::Path &path, ncm::ProgramId id), (path, id)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, ResolveApplicationControlPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, ResolveApplicationHtmlDocumentPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, ResolveDataPath, (sf::Out<lr::Path> out, ncm::DataId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 5, Result, RedirectApplicationControlPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_1_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 5, Result, RedirectApplicationControlPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 6, Result, RedirectApplicationHtmlDocumentPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_1_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 6, Result, RedirectApplicationHtmlDocumentPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 7, Result, ResolveApplicationLegalInformationPath, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id)) \ AMS_SF_METHOD_INFO(C, H, 8, Result, RedirectApplicationLegalInformationPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_1_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 8, Result, RedirectApplicationLegalInformationPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 9, Result, Refresh, (), ()) \ AMS_SF_METHOD_INFO(C, H, 10, Result, RedirectApplicationProgramPathDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_5_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 10, Result, RedirectApplicationProgramPath, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 11, Result, ClearApplicationRedirectionDeprecated, (), (), hos::Version_5_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 11, Result, ClearApplicationRedirection, (const sf::InArray<ncm::ProgramId> &excluding_ids), (excluding_ids), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 12, Result, EraseProgramRedirection, (ncm::ProgramId id), (id), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 13, Result, EraseApplicationControlRedirection, (ncm::ProgramId id), (id), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 14, Result, EraseApplicationHtmlDocumentRedirection, (ncm::ProgramId id), (id), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 15, Result, EraseApplicationLegalInformationRedirection, (ncm::ProgramId id), (id), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 16, Result, ResolveProgramPathForDebug, (sf::Out<lr::Path> out, ncm::ProgramId id), (out, id), hos::Version_7_0_0) \ AMS_SF_METHOD_INFO(C, H, 17, Result, RedirectProgramPathForDebug, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_7_0_0) \ AMS_SF_METHOD_INFO(C, H, 18, Result, RedirectApplicationProgramPathForDebugDeprecated, (const lr::Path &path, ncm::ProgramId id), (path, id), hos::Version_7_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 18, Result, RedirectApplicationProgramPathForDebug, (const lr::Path &path, ncm::ProgramId id, ncm::ProgramId owner_id), (path, id, owner_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 19, Result, EraseProgramRedirectionForDebug, (ncm::ProgramId id), (id), hos::Version_7_0_0) \ AMS_SF_METHOD_INFO(C, H, 20, Result, Disable, (), (), hos::Version_15_0_0) AMS_SF_DEFINE_INTERFACE(ams::lr, ILocationResolver, AMS_LR_I_LOCATION_RESOLVER_INTERFACE_INFO, 0xB36C8B0E)
7,050
C++
.h
46
149.521739
223
0.480571
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,128
lr_registered_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_registered_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_i_registered_location_resolver.hpp> namespace ams::lr { class RegisteredLocationResolver { NON_COPYABLE(RegisteredLocationResolver); private: sf::SharedPointer<IRegisteredLocationResolver> m_interface; public: RegisteredLocationResolver() : m_interface(nullptr) { /* ... */ } explicit RegisteredLocationResolver(sf::SharedPointer<IRegisteredLocationResolver> intf) : m_interface(intf) { /* ... */ } RegisteredLocationResolver(RegisteredLocationResolver &&rhs) { m_interface = std::move(rhs.m_interface); } RegisteredLocationResolver &operator=(RegisteredLocationResolver &&rhs) { RegisteredLocationResolver(std::move(rhs)).Swap(*this); return *this; } void Swap(RegisteredLocationResolver &rhs) { std::swap(m_interface, rhs.m_interface); } public: /* Actual commands. */ Result ResolveProgramPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveProgramPath(out, id)); } Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_RETURN(m_interface->RegisterProgramPath(path, id, owner_id)); } else { R_RETURN(m_interface->RegisterProgramPathDeprecated(path, id)); } } Result UnregisterProgramPath(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->UnregisterProgramPath(id)); } void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectProgramPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectProgramPathDeprecated(path, id)); } } Result ResolveHtmlDocumentPath(Path *out, ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveHtmlDocumentPath(out, id)); } Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_RETURN(m_interface->RegisterHtmlDocumentPath(path, id, owner_id)); } else { R_RETURN(m_interface->RegisterHtmlDocumentPathDeprecated(path, id)); } } Result UnregisterHtmlDocumentPath(ncm::ProgramId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->UnregisterHtmlDocumentPath(id)); } void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_ABORT_UNLESS(m_interface->RedirectHtmlDocumentPath(path, id, owner_id)); } else { R_ABORT_UNLESS(m_interface->RedirectHtmlDocumentPathDeprecated(path, id)); } } Result Refresh() { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->Refresh()); } Result RefreshExcluding(const ncm::ProgramId *excluding_ids, size_t num_ids) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->RefreshExcluding(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids))); } }; }
4,786
C++
.h
96
37.364583
134
0.595121
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,129
lr_add_on_content_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_add_on_content_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #include <stratosphere/lr/lr_i_add_on_content_location_resolver.hpp> namespace ams::lr { class AddOnContentLocationResolver { NON_COPYABLE(AddOnContentLocationResolver); private: sf::SharedPointer<IAddOnContentLocationResolver> m_interface; public: AddOnContentLocationResolver() : m_interface(nullptr) { /* ... */ } explicit AddOnContentLocationResolver(sf::SharedPointer<IAddOnContentLocationResolver> intf) : m_interface(intf) { /* ... */ } AddOnContentLocationResolver(AddOnContentLocationResolver &&rhs) { m_interface = std::move(rhs.m_interface); } AddOnContentLocationResolver &operator=(AddOnContentLocationResolver &&rhs) { AddOnContentLocationResolver(std::move(rhs)).Swap(*this); return *this; } void Swap(AddOnContentLocationResolver &rhs) { std::swap(m_interface, rhs.m_interface); } public: /* Actual commands. */ Result ResolveAddOnContentPath(Path *out, ncm::DataId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->ResolveAddOnContentPath(out, id)); } Result RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) { AMS_ASSERT(m_interface != nullptr); if (hos::GetVersion() >= hos::Version_9_0_0) { R_RETURN(m_interface->RegisterAddOnContentStorage(id, application_id, storage_id)); } else { R_RETURN(m_interface->RegisterAddOnContentStorageDeprecated(id, storage_id)); } } Result UnregisterAllAddOnContentPath() { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->UnregisterAllAddOnContentPath()); } Result RefreshApplicationAddOnContent(const ncm::ApplicationId *ids, size_t num_ids) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->RefreshApplicationAddOnContent(sf::InArray<ncm::ApplicationId>(ids, num_ids))); } Result UnregisterApplicationAddOnContent(ncm::ApplicationId id) { AMS_ASSERT(m_interface != nullptr); R_RETURN(m_interface->UnregisterApplicationAddOnContent(id)); } }; }
3,164
C++
.h
64
39.046875
138
0.642603
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,130
lr_i_add_on_content_location_resolver.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/lr/lr_i_add_on_content_location_resolver.hpp
/* * 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 <stratosphere/lr/lr_types.hpp> #define AMS_LR_I_ADD_ON_CONTENT_LOCATION_RESOLVER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, ResolveAddOnContentPath, (sf::Out<lr::Path> out, ncm::DataId id), (out, id), hos::Version_2_0_0) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RegisterAddOnContentStorageDeprecated, (ncm::DataId id, ncm::StorageId storage_id), (id, storage_id), hos::Version_2_0_0, hos::Version_8_1_1) \ AMS_SF_METHOD_INFO(C, H, 1, Result, RegisterAddOnContentStorage, (ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id), (id, application_id, storage_id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 2, Result, UnregisterAllAddOnContentPath, (), (), hos::Version_2_0_0) \ AMS_SF_METHOD_INFO(C, H, 3, Result, RefreshApplicationAddOnContent, (const sf::InArray<ncm::ApplicationId> &ids), (ids), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, UnregisterApplicationAddOnContent, (ncm::ApplicationId id), (id), hos::Version_9_0_0) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetRegisteredAddOnContentPaths, (sf::Out<lr::PathByMapAlias> out, sf::Out<lr::PathByMapAlias> out2, ncm::DataId id), (out, out2, id), hos::Version_15_0_0) \ AMS_SF_METHOD_INFO(C, H, 6, Result, RegisterAddOnContentPath, (ncm::DataId id, ncm::ApplicationId application_id, const lr::PathByMapAlias &path), (id, application_id, path), hos::Version_15_0_0) \ AMS_SF_METHOD_INFO(C, H, 7, Result, RegisterAddOnContentPaths, (ncm::DataId id, ncm::ApplicationId application_id, const lr::PathByMapAlias &path, const lr::PathByMapAlias &path2), (id, application_id, path, path2), hos::Version_15_0_0) AMS_SF_DEFINE_INTERFACE(ams::lr, IAddOnContentLocationResolver, AMS_LR_I_ADD_ON_CONTENT_LOCATION_RESOLVER_INTERFACE_INFO, 0x77617E39)
3,545
C++
.h
28
123.678571
273
0.50242
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,131
patcher_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/patcher/patcher_api.hpp
/* * 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 <stratosphere/ro/ro_types.hpp> namespace ams::patcher { /* Helper for applying to code binaries. */ void LocateAndApplyIpsPatchesToModule(const char *mount_name, const char *patch_dir, size_t protected_size, size_t offset, const ro::ModuleId *module_id, u8 *mapped_module, size_t mapped_size); }
966
C++
.h
21
43.714286
197
0.757447
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,132
erpt_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/erpt_types.hpp
/* * 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/os.hpp> #include <stratosphere/time/time_posix_time.hpp> #include <stratosphere/erpt/erpt_ids.autogen.hpp> namespace ams::erpt { #define GENERATE_ENUM(NAME, ID, ...) NAME = ID, enum FieldType { AMS_ERPT_FOREACH_FIELD_TYPE(GENERATE_ENUM) FieldType_Count, }; #undef GENERATE_ENUM #define GENERATE_ENUM(NAME, ID, ...) CategoryId_##NAME = ID, enum CategoryId { AMS_ERPT_FOREACH_CATEGORY(GENERATE_ENUM) }; #undef GENERATE_ENUM #define GENERATE_ENUM(NAME, ID, ...) FieldId_##NAME = ID, enum FieldId { AMS_ERPT_FOREACH_FIELD(GENERATE_ENUM) }; #undef GENERATE_ENUM constexpr inline u32 ArrayBufferSizeDefault = 0x100; constexpr inline u32 ArrayBufferSizeMax = 96_KB; constexpr inline u32 ArrayFieldSizeMax = 16_KB - 1; enum ReportType { ReportType_Start = 0, ReportType_Visible = ReportType_Start, ReportType_Invisible = 1, ReportType_End = 2, ReportType_Count = ReportType_End, ReportType_Any = ReportType_Count, }; constexpr inline u32 ReportCountMax = 50; constexpr inline u32 AttachmentsPerReportMax = 5; constexpr inline u32 AttachmentCountMax = ReportCountMax * AttachmentsPerReportMax; constexpr inline u32 ReportMetaDataSize = 0x20; struct ReportMetaData { u8 user_data[ReportMetaDataSize]; }; constexpr inline u32 ReportIdSize = 20; struct ReportId { union { u8 id[ReportIdSize]; util::Uuid uuid; #pragma pack(push, 1) struct { u32 time_low; u16 time_mid; u16 time_high_and_version; u8 clock_high; u8 clock_low; u64 node; } uuid_data; #pragma pack(pop) }; }; static_assert(sizeof(ReportId) == ReportIdSize); inline bool operator==(const ReportId &lhs, const ReportId &rhs) { return std::memcmp(lhs.id, rhs.id, sizeof(lhs.uuid)) == 0; } inline bool operator!=(const ReportId &lhs, const ReportId &rhs) { return !(lhs == rhs); } struct ReportFlag { using Transmitted = util::BitFlagSet<BITSIZEOF(u32), ReportFlag>::Flag<0>; using HasAttachment = util::BitFlagSet<BITSIZEOF(u32), ReportFlag>::Flag<1>; }; using ReportFlagSet = util::BitFlagSet<BITSIZEOF(u32), ReportFlag>; static_assert(util::is_pod<ReportFlagSet>::value); static_assert(sizeof(ReportFlagSet) == sizeof(u32)); struct CreateReportOptionFlag { using SubmitFsInfo = util::BitFlagSet<BITSIZEOF(u32), CreateReportOptionFlag>::Flag<0>; }; using CreateReportOptionFlagSet = util::BitFlagSet<BITSIZEOF(u32), CreateReportOptionFlag>; static_assert(util::is_pod<CreateReportOptionFlagSet>::value); static_assert(sizeof(CreateReportOptionFlagSet) == sizeof(u32)); struct ReportInfo { ReportType type; ReportId id; ReportMetaData meta_data; ReportFlagSet flags; time::PosixTime timestamp_user; time::PosixTime timestamp_network; s64 report_size; u64 reserved[3]; }; struct ReportList { u32 report_count; ReportInfo reports[ReportCountMax]; }; constexpr inline u32 AttachmentIdSize = 20; struct AttachmentId { union { u8 id[AttachmentIdSize]; util::Uuid uuid; }; }; static_assert(sizeof(AttachmentId) == AttachmentIdSize); inline bool operator==(const AttachmentId &lhs, const AttachmentId &rhs) { return std::memcmp(lhs.id, rhs.id, sizeof(lhs.uuid)) == 0; } inline bool operator!=(const AttachmentId &lhs, const AttachmentId &rhs) { return !(lhs == rhs); } struct AttachmentFlag { using HasOwner = util::BitFlagSet<BITSIZEOF(u32), AttachmentFlag>::Flag<1>; }; using AttachmentFlagSet = util::BitFlagSet<BITSIZEOF(u32), AttachmentFlag>; static_assert(util::is_pod<AttachmentFlagSet>::value); static_assert(sizeof(AttachmentFlagSet) == sizeof(u32)); constexpr inline u32 AttachmentNameSizeMax = 0x20; struct AttachmentInfo { ReportId owner_report_id; AttachmentId attachment_id; AttachmentFlagSet flags; s64 attachment_size; char attachment_name[AttachmentNameSizeMax]; }; struct AttachmentList { u32 attachment_count; AttachmentInfo attachments[AttachmentsPerReportMax]; }; constexpr inline u32 AttachmentSizeMax = 512_KB; struct FieldEntry { FieldId id; FieldType type; union { u64 value_u64; u32 value_u32; u16 value_u16; u8 value_u8; s64 value_i64; s32 value_i32; s16 value_i16; s8 value_i8; bool value_bool; struct { u32 start_idx; u32 size; } value_array; }; }; constexpr inline u32 FieldsPerContext = 20; struct ContextEntry { u32 version; u32 field_count; CategoryId category; FieldEntry fields[FieldsPerContext]; u8 *array_buffer; u32 array_free_count; u32 array_buffer_size; }; struct StorageUsageStatistics { util::Uuid journal_uuid; u32 used_storage_size; s64 max_report_size; u32 report_count[ReportType_Count]; u32 transmitted_count[ReportType_Count]; u32 untransmitted_count[ReportType_Count]; }; /* https://github.com/msgpack/msgpack/blob/master/spec.md#overview */ enum class ValueTypeTag { FixMap = 0x80, FixArray = 0x90, FixStr = 0xA0, False = 0xC2, True = 0xC3, Bin8 = 0xC4, Bin16 = 0xC5, U8 = 0xCC, U16 = 0xCD, U32 = 0xCE, U64 = 0xCF, I8 = 0xD0, I16 = 0xD1, I32 = 0xD2, I64 = 0xD3, Str8 = 0xD9, Str16 = 0xDA, Array16 = 0xDC, Map16 = 0xDE, }; }
6,981
C++
.h
199
27.472362
95
0.620828
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,133
erpt_ids.autogen.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/erpt_ids.autogen.hpp
/* * 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: This file is auto-generated. */ /* Do not make edits to this file by hand. */ #define AMS_ERPT_FOREACH_FIELD_TYPE(HANDLER) \ HANDLER(FieldType_NumericU64, 0 ) \ HANDLER(FieldType_NumericU32, 1 ) \ HANDLER(FieldType_NumericI64, 2 ) \ HANDLER(FieldType_NumericI32, 3 ) \ HANDLER(FieldType_String, 4 ) \ HANDLER(FieldType_U8Array, 5 ) \ HANDLER(FieldType_U32Array, 6 ) \ HANDLER(FieldType_U64Array, 7 ) \ HANDLER(FieldType_I32Array, 8 ) \ HANDLER(FieldType_I64Array, 9 ) \ HANDLER(FieldType_Bool, 10) \ HANDLER(FieldType_NumericU16, 11) \ HANDLER(FieldType_NumericU8, 12) \ HANDLER(FieldType_NumericI16, 13) \ HANDLER(FieldType_NumericI8, 14) \ HANDLER(FieldType_I8Array, 15) #define AMS_ERPT_FOREACH_CATEGORY(HANDLER) \ HANDLER(Test, 0 ) \ HANDLER(ErrorInfo, 1 ) \ HANDLER(ConnectionStatusInfo, 2 ) \ HANDLER(NetworkInfo, 3 ) \ HANDLER(NXMacAddressInfo, 4 ) \ HANDLER(StealthNetworkInfo, 5 ) \ HANDLER(LimitHighCapacityInfo, 6 ) \ HANDLER(NATTypeInfo, 7 ) \ HANDLER(WirelessAPMacAddressInfo, 8 ) \ HANDLER(GlobalIPAddressInfo, 9 ) \ HANDLER(EnableWirelessInterfaceInfo, 10 ) \ HANDLER(EnableWifiInfo, 11 ) \ HANDLER(EnableBluetoothInfo, 12 ) \ HANDLER(EnableNFCInfo, 13 ) \ HANDLER(NintendoZoneSSIDListVersionInfo, 14 ) \ HANDLER(LANAdapterMacAddressInfo, 15 ) \ HANDLER(ApplicationInfo, 16 ) \ HANDLER(OccurrenceInfo, 17 ) \ HANDLER(ProductModelInfo, 18 ) \ HANDLER(CurrentLanguageInfo, 19 ) \ HANDLER(UseNetworkTimeProtocolInfo, 20 ) \ HANDLER(TimeZoneInfo, 21 ) \ HANDLER(ControllerFirmwareInfo, 22 ) \ HANDLER(VideoOutputInfo, 23 ) \ HANDLER(NANDFreeSpaceInfo, 24 ) \ HANDLER(SDCardFreeSpaceInfo, 25 ) \ HANDLER(ScreenBrightnessInfo, 26 ) \ HANDLER(AudioFormatInfo, 27 ) \ HANDLER(MuteOnHeadsetUnpluggedInfo, 28 ) \ HANDLER(NumUserRegisteredInfo, 29 ) \ HANDLER(DataDeletionInfo, 30 ) \ HANDLER(ControllerVibrationInfo, 31 ) \ HANDLER(LockScreenInfo, 32 ) \ HANDLER(InternalBatteryLotNumberInfo, 33 ) \ HANDLER(LeftControllerSerialNumberInfo, 34 ) \ HANDLER(RightControllerSerialNumberInfo, 35 ) \ HANDLER(NotificationInfo, 36 ) \ HANDLER(TVInfo, 37 ) \ HANDLER(SleepInfo, 38 ) \ HANDLER(ConnectionInfo, 39 ) \ HANDLER(NetworkErrorInfo, 40 ) \ HANDLER(FileAccessPathInfo, 41 ) \ HANDLER(GameCardCIDInfo, 42 ) \ HANDLER(NANDCIDInfoDeprecated, 43 ) \ HANDLER(MicroSDCIDInfoDeprecated, 44 ) \ HANDLER(NANDSpeedModeInfo, 45 ) \ HANDLER(MicroSDSpeedModeInfo, 46 ) \ HANDLER(GameCardSpeedModeInfo, 47 ) \ HANDLER(UserAccountInternalIDInfo, 48 ) \ HANDLER(NetworkServiceAccountInternalIDInfo, 49 ) \ HANDLER(NintendoAccountInternalIDInfo, 50 ) \ HANDLER(USB3AvailableInfo, 51 ) \ HANDLER(CallStackInfo, 52 ) \ HANDLER(SystemStartupLogInfo, 53 ) \ HANDLER(RegionSettingInfo, 54 ) \ HANDLER(NintendoZoneConnectedInfo, 55 ) \ HANDLER(ForceSleepInfo, 56 ) \ HANDLER(ChargerInfo, 57 ) \ HANDLER(RadioStrengthInfo, 58 ) \ HANDLER(ErrorInfoAuto, 59 ) \ HANDLER(AccessPointInfo, 60 ) \ HANDLER(ErrorInfoDefaults, 61 ) \ HANDLER(SystemPowerStateInfo, 62 ) \ HANDLER(PerformanceInfo, 63 ) \ HANDLER(ThrottlingInfo, 64 ) \ HANDLER(GameCardErrorInfo, 65 ) \ HANDLER(EdidInfo, 66 ) \ HANDLER(ThermalInfo, 67 ) \ HANDLER(CradleFirmwareInfo, 68 ) \ HANDLER(RunningApplicationInfo, 69 ) \ HANDLER(RunningAppletInfo, 70 ) \ HANDLER(FocusedAppletHistoryInfo, 71 ) \ HANDLER(CompositorInfo, 72 ) \ HANDLER(BatteryChargeInfo, 73 ) \ HANDLER(NANDExtendedCsdDeprecated, 74 ) \ HANDLER(NANDPatrolInfo, 75 ) \ HANDLER(NANDErrorInfo, 76 ) \ HANDLER(NANDDriverLog, 77 ) \ HANDLER(SdCardSizeSpec, 78 ) \ HANDLER(SdCardErrorInfo, 79 ) \ HANDLER(SdCardDriverLog , 80 ) \ HANDLER(FsProxyErrorInfo, 81 ) \ HANDLER(SystemAppletSceneInfo, 82 ) \ HANDLER(VideoInfo, 83 ) \ HANDLER(GpuErrorInfo, 84 ) \ HANDLER(PowerClockInfo, 85 ) \ HANDLER(AdspErrorInfo, 86 ) \ HANDLER(NvDispDeviceInfo, 87 ) \ HANDLER(NvDispDcWindowInfo, 88 ) \ HANDLER(NvDispDpModeInfo, 89 ) \ HANDLER(NvDispDpLinkSpec, 90 ) \ HANDLER(NvDispDpLinkStatus, 91 ) \ HANDLER(NvDispDpHdcpInfo, 92 ) \ HANDLER(NvDispDpAuxCecInfo, 93 ) \ HANDLER(NvDispDcInfo, 94 ) \ HANDLER(NvDispDsiInfo, 95 ) \ HANDLER(NvDispErrIDInfo, 96 ) \ HANDLER(SdCardMountInfo, 97 ) \ HANDLER(RetailInteractiveDisplayInfo, 98 ) \ HANDLER(CompositorStateInfo, 99 ) \ HANDLER(CompositorLayerInfo, 100 ) \ HANDLER(CompositorDisplayInfo, 101 ) \ HANDLER(CompositorHWCInfo, 102 ) \ HANDLER(MonitorCapability, 103 ) \ HANDLER(ErrorReportSharePermissionInfo, 104 ) \ HANDLER(MultimediaInfo, 105 ) \ HANDLER(ConnectedControllerInfo, 106 ) \ HANDLER(FsMemoryInfo, 107 ) \ HANDLER(UserClockContextInfo, 108 ) \ HANDLER(NetworkClockContextInfo, 109 ) \ HANDLER(AcpGeneralSettingsInfo, 110 ) \ HANDLER(AcpPlayLogSettingsInfo, 111 ) \ HANDLER(AcpAocSettingsInfo, 112 ) \ HANDLER(AcpBcatSettingsInfo, 113 ) \ HANDLER(AcpStorageSettingsInfo, 114 ) \ HANDLER(AcpRatingSettingsInfo, 115 ) \ HANDLER(MonitorSettings, 116 ) \ HANDLER(RebootlessSystemUpdateVersionInfo, 117 ) \ HANDLER(NifmConnectionTestInfo, 118 ) \ HANDLER(PcieLoggedStateInfo, 119 ) \ HANDLER(NetworkSecurityCertificateInfo, 120 ) \ HANDLER(AcpNeighborDetectionInfo, 121 ) \ HANDLER(GpuCrashInfo, 122 ) \ HANDLER(UsbStateInfo, 123 ) \ HANDLER(NvHostErrInfo, 124 ) \ HANDLER(RunningUlaInfo, 125 ) \ HANDLER(InternalPanelInfo, 126 ) \ HANDLER(ResourceLimitLimitInfo, 127 ) \ HANDLER(ResourceLimitPeakInfo, 128 ) \ HANDLER(TouchScreenInfo, 129 ) \ HANDLER(AcpUserAccountSettingsInfo, 130 ) \ HANDLER(AudioDeviceInfo, 131 ) \ HANDLER(AbnormalWakeInfo, 132 ) \ HANDLER(ServiceProfileInfo, 133 ) \ HANDLER(BluetoothAudioInfo, 134 ) \ HANDLER(BluetoothPairingCountInfo, 135 ) \ HANDLER(FsProxyErrorInfo2, 136 ) \ HANDLER(BuiltInWirelessOUIInfo, 137 ) \ HANDLER(WirelessAPOUIInfo, 138 ) \ HANDLER(EthernetAdapterOUIInfo, 139 ) \ HANDLER(NANDTypeInfoDeprecated, 140 ) \ HANDLER(MicroSDTypeInfo, 141 ) \ HANDLER(AttachmentFileInfo, 142 ) \ HANDLER(TestNx, 1000) \ HANDLER(NANDTypeInfo, 1001) \ HANDLER(NANDExtendedCsd, 1002) \ #define AMS_ERPT_FOREACH_FIELD(HANDLER) \ HANDLER(TestU64, 0, Test, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(TestU32, 1, Test, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(TestI64, 2, Test, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(TestI32, 3, Test, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(TestString, 4, Test, FieldType_String, FieldFlag_None ) \ HANDLER(TestU8Array, 5, Test, FieldType_U8Array, FieldFlag_None ) \ HANDLER(TestU32Array, 6, Test, FieldType_U32Array, FieldFlag_None ) \ HANDLER(TestU64Array, 7, Test, FieldType_U64Array, FieldFlag_None ) \ HANDLER(TestI32Array, 8, Test, FieldType_I32Array, FieldFlag_None ) \ HANDLER(TestI64Array, 9, Test, FieldType_I64Array, FieldFlag_None ) \ HANDLER(ErrorCode, 10, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ErrorDescription, 11, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(OccurrenceTimestamp, 12, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ReportIdentifier, 13, ErrorInfoAuto, FieldType_String, FieldFlag_None ) \ HANDLER(ConnectionStatus, 14, ConnectionStatusInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AccessPointSSID, 15, AccessPointInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AccessPointSecurityType, 16, AccessPointInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RadioStrength, 17, RadioStrengthInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NXMacAddress, 18, NXMacAddressInfo, FieldType_String, FieldFlag_None ) \ HANDLER(IPAddressAcquisitionMethod, 19, NetworkInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CurrentIPAddress, 20, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SubnetMask, 21, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GatewayIPAddress, 22, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(DNSType, 23, NetworkInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PriorityDNSIPAddress, 24, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AlternateDNSIPAddress, 25, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(UseProxyFlag, 26, NetworkInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ProxyIPAddress, 27, NetworkInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ProxyPort, 28, NetworkInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ProxyAutoAuthenticateFlag, 29, NetworkInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(MTU, 30, NetworkInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ConnectAutomaticallyFlag, 31, NetworkInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(UseStealthNetworkFlag, 32, StealthNetworkInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(LimitHighCapacityFlag, 33, LimitHighCapacityInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NATType, 34, NATTypeInfo, FieldType_String, FieldFlag_None ) \ HANDLER(WirelessAPMacAddress, 35, WirelessAPMacAddressInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GlobalIPAddress, 36, GlobalIPAddressInfo, FieldType_String, FieldFlag_None ) \ HANDLER(EnableWirelessInterfaceFlag, 37, EnableWirelessInterfaceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(EnableWifiFlag, 38, EnableWifiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(EnableBluetoothFlag, 39, EnableBluetoothInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(EnableNFCFlag, 40, EnableNFCInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NintendoZoneSSIDListVersion, 41, NintendoZoneSSIDListVersionInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LANAdapterMacAddress, 42, LANAdapterMacAddressInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ApplicationID, 43, ApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ApplicationTitle, 44, ApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ApplicationVersion, 45, ApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ApplicationStorageLocation, 46, ApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(DownloadContentType, 47, OccurrenceInfo, FieldType_String, FieldFlag_None ) \ HANDLER(InstallContentType, 48, OccurrenceInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ConsoleStartingUpFlag, 49, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(SystemStartingUpFlag, 50, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ConsoleFirstInitFlag, 51, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(HomeMenuScreenDisplayedFlag, 52, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(DataManagementScreenDisplayedFlag, 53, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ConnectionTestingFlag, 54, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ApplicationRunningFlag, 55, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(DataCorruptionDetectedFlag, 56, OccurrenceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ProductModel, 57, ProductModelInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CurrentLanguage, 58, CurrentLanguageInfo, FieldType_String, FieldFlag_None ) \ HANDLER(UseNetworkTimeProtocolFlag, 59, UseNetworkTimeProtocolInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(TimeZone, 60, TimeZoneInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ControllerFirmware, 61, ControllerFirmwareInfo, FieldType_String, FieldFlag_None ) \ HANDLER(VideoOutputSetting, 62, VideoOutputInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NANDFreeSpace, 63, NANDFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SDCardFreeSpace, 64, SDCardFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SerialNumber, 65, ErrorInfoAuto, FieldType_String, FieldFlag_None ) \ HANDLER(OsVersion, 66, ErrorInfoAuto, FieldType_String, FieldFlag_None ) \ HANDLER(ScreenBrightnessAutoAdjustFlag, 67, ScreenBrightnessInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(HdmiAudioOutputMode, 68, AudioFormatInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SpeakerAudioOutputMode, 69, AudioFormatInfo, FieldType_String, FieldFlag_None ) \ HANDLER(HeadphoneAudioOutputMode, 70, AudioFormatInfo, FieldType_String, FieldFlag_None ) \ HANDLER(MuteOnHeadsetUnpluggedFlag, 71, MuteOnHeadsetUnpluggedInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NumUserRegistered, 72, NumUserRegisteredInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(StorageAutoOrganizeFlag, 73, DataDeletionInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ControllerVibrationVolume, 74, ControllerVibrationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LockScreenFlag, 75, LockScreenInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(InternalBatteryLotNumber, 76, InternalBatteryLotNumberInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LeftControllerSerialNumber, 77, LeftControllerSerialNumberInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RightControllerSerialNumber, 78, RightControllerSerialNumberInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NotifyInGameDownloadCompletionFlag, 79, NotificationInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NotificationSoundFlag, 80, NotificationInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(TVResolutionSetting, 81, TVInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RGBRangeSetting, 82, TVInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ReduceScreenBurnFlag, 83, TVInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(TVAllowsCecFlag, 84, TVInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(HandheldModeTimeToScreenSleep, 85, SleepInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ConsoleModeTimeToScreenSleep, 86, SleepInfo, FieldType_String, FieldFlag_None ) \ HANDLER(StopAutoSleepDuringContentPlayFlag, 87, SleepInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(LastConnectionTestDownloadSpeed, 88, ConnectionInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(LastConnectionTestUploadSpeed, 89, ConnectionInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(DEPRECATED_ServerFQDN, 90, NetworkErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(HTTPRequestContents, 91, NetworkErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(HTTPRequestResponseContents, 92, NetworkErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(EdgeServerIPAddress, 93, NetworkErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CDNContentPath, 94, NetworkErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(FileAccessPath, 95, FileAccessPathInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GameCardCID, 96, GameCardCIDInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NANDCIDDeprecated, 97, NANDCIDInfoDeprecated, FieldType_U8Array, FieldFlag_None ) \ HANDLER(MicroSDCIDDeprecated, 98, MicroSDCIDInfoDeprecated, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NANDSpeedMode, 99, NANDSpeedModeInfo, FieldType_String, FieldFlag_None ) \ HANDLER(MicroSDSpeedMode, 100, MicroSDSpeedModeInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GameCardSpeedMode, 101, GameCardSpeedModeInfo, FieldType_String, FieldFlag_None ) \ HANDLER(UserAccountInternalID, 102, UserAccountInternalIDInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NetworkServiceAccountInternalID, 103, NetworkServiceAccountInternalIDInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NintendoAccountInternalID, 104, NintendoAccountInternalIDInfo, FieldType_String, FieldFlag_None ) \ HANDLER(USB3AvailableFlag, 105, USB3AvailableInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(CallStack, 106, CallStackInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SystemStartupLog, 107, SystemStartupLogInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RegionSetting, 108, RegionSettingInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NintendoZoneConnectedFlag, 109, NintendoZoneConnectedInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ForcedSleepHighTemperatureReading, 110, ForceSleepInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ForcedSleepFanSpeedReading, 111, ForceSleepInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ForcedSleepHWInfo, 112, ForceSleepInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AbnormalPowerStateInfo, 113, ChargerInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ScreenBrightnessLevel, 114, ScreenBrightnessInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ProgramId, 115, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AbortFlag, 116, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ReportVisibilityFlag, 117, ErrorInfoAuto, FieldType_Bool, FieldFlag_None ) \ HANDLER(FatalFlag, 118, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(OccurrenceTimestampNet, 119, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ResultBacktrace, 120, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(GeneralRegisterAarch32, 121, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(StackBacktrace32, 122, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(ExceptionInfoAarch32, 123, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(GeneralRegisterAarch64, 124, ErrorInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(ExceptionInfoAarch64, 125, ErrorInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(StackBacktrace64, 126, ErrorInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(RegisterSetFlag32, 127, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(RegisterSetFlag64, 128, ErrorInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(ProgramMappedAddr32, 129, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ProgramMappedAddr64, 130, ErrorInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AbortType, 131, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PrivateOsVersion, 132, ErrorInfoAuto, FieldType_String, FieldFlag_None ) \ HANDLER(CurrentSystemPowerState, 133, SystemPowerStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PreviousSystemPowerState, 134, SystemPowerStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(DestinationSystemPowerState, 135, SystemPowerStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PscTransitionCurrentState, 136, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PscTransitionPreviousState, 137, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PscInitializedList, 138, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(PscCurrentPmStateList, 139, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PscNextPmStateList, 140, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PerformanceMode, 141, PerformanceInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PerformanceConfiguration, 142, PerformanceInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(Throttled, 143, ThrottlingInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ThrottlingDuration, 144, ThrottlingInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ThrottlingTimestamp, 145, ThrottlingInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(GameCardCrcErrorCount, 146, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardAsicCrcErrorCount, 147, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardRefreshCount, 148, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardReadRetryCount, 149, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(EdidBlock, 150, EdidInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EdidExtensionBlock, 151, EdidInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(CreateProcessFailureFlag, 152, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(TemperaturePcb, 153, ThermalInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(TemperatureSoc, 154, ThermalInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(CurrentFanDuty, 155, ThermalInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(LastDvfsThresholdTripped, 156, ThermalInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(CradlePdcHFwVersion, 157, CradleFirmwareInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CradlePdcAFwVersion, 158, CradleFirmwareInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CradleMcuFwVersion, 159, CradleFirmwareInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CradleDp2HdmiFwVersion, 160, CradleFirmwareInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(RunningApplicationId, 161, RunningApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningApplicationTitle, 162, RunningApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningApplicationVersion, 163, RunningApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningApplicationStorageLocation, 164, RunningApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningAppletList, 165, RunningAppletInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(FocusedAppletHistory, 166, FocusedAppletHistoryInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(CompositorState, 167, CompositorStateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CompositorLayerState, 168, CompositorLayerInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CompositorDisplayState, 169, CompositorDisplayInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CompositorHWCState, 170, CompositorHWCInfo, FieldType_String, FieldFlag_None ) \ HANDLER(InputCurrentLimit, 171, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(BoostModeCurrentLimitDeprecated, 172, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FastChargeCurrentLimit, 173, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ChargeVoltageLimit, 174, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ChargeConfigurationDeprecated, 175, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(HizModeDeprecated, 176, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ChargeEnabled, 177, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(PowerSupplyPathDeprecated, 178, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(BatteryTemperature, 179, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(BatteryChargePercent, 180, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(BatteryChargeVoltage, 181, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(BatteryAge, 182, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PowerRole, 183, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PowerSupplyType, 184, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PowerSupplyVoltage, 185, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PowerSupplyCurrent, 186, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FastBatteryChargingEnabled, 187, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ControllerPowerSupplyAcquiredDeprecated, 188, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(OtgRequestedDeprecated, 189, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NANDPreEolInfoDeprecated, 190, NANDExtendedCsdDeprecated, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDDeviceLifeTimeEstTypADeprecated, 191, NANDExtendedCsdDeprecated, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDDeviceLifeTimeEstTypBDeprecated, 192, NANDExtendedCsdDeprecated, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDPatrolCount, 193, NANDPatrolInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDNumActivationFailures, 194, NANDErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDNumActivationErrorCorrections, 195, NANDErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDNumReadWriteFailures, 196, NANDErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDNumReadWriteErrorCorrections, 197, NANDErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDErrorLog, 198, NANDDriverLog, FieldType_String, FieldFlag_None ) \ HANDLER(SdCardUserAreaSize, 199, SdCardSizeSpec, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SdCardProtectedAreaSize, 200, SdCardSizeSpec, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SdCardNumActivationFailures, 201, SdCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SdCardNumActivationErrorCorrections, 202, SdCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SdCardNumReadWriteFailures, 203, SdCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SdCardNumReadWriteErrorCorrections, 204, SdCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SdCardErrorLog, 205, SdCardDriverLog , FieldType_String, FieldFlag_None ) \ HANDLER(EncryptionKey, 206, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EncryptedExceptionInfo, 207, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(GameCardTimeoutRetryErrorCount, 208, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsRemountForDataCorruptCount, 209, FsProxyErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsRemountForDataCorruptRetryOutCount, 210, FsProxyErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardInsertionCount, 211, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardRemovalCount, 212, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardAsicInitializeCount, 213, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(TestU16, 214, Test, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(TestU8, 215, Test, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(TestI16, 216, Test, FieldType_NumericI16, FieldFlag_None ) \ HANDLER(TestI8, 217, Test, FieldType_NumericI8, FieldFlag_None ) \ HANDLER(SystemAppletScene, 218, SystemAppletSceneInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(CodecType, 219, VideoInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(DecodeBuffers, 220, VideoInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FrameWidth, 221, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FrameHeight, 222, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ColorPrimaries, 223, VideoInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(TransferCharacteristics, 224, VideoInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(MatrixCoefficients, 225, VideoInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(DisplayWidth, 226, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(DisplayHeight, 227, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(DARWidth, 228, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(DARHeight, 229, VideoInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ColorFormat, 230, VideoInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(ColorSpace, 231, VideoInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SurfaceLayout, 232, VideoInfo, FieldType_String, FieldFlag_None ) \ HANDLER(BitStream, 233, VideoInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(VideoDecState, 234, VideoInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GpuErrorChannelId, 235, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorAruId, 236, GpuErrorInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(GpuErrorType, 237, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorFaultInfo, 238, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorWriteAccess, 239, GpuErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(GpuErrorFaultAddress, 240, GpuErrorInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(GpuErrorFaultUnit, 241, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorFaultType, 242, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorHwContextPointer, 243, GpuErrorInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(GpuErrorContextStatus, 244, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaIntr, 245, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaErrorType, 246, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaHeaderShadow, 247, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaHeader, 248, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaGpShadow0, 249, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuErrorPbdmaGpShadow1, 250, GpuErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AccessPointChannel, 251, AccessPointInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(ThreadName, 252, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AdspExceptionRegistersDeprecated, 253, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionSpsrDeprecated, 254, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionProgramCounter, 255, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionLinkRegister, 256, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionStackPointer, 257, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionArmModeRegistersDeprecated, 258, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionStackAddressDeprecated, 259, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionStackDumpDeprecated, 260, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionReasonDeprecated, 261, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(OscillatorClock, 262, PowerClockInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CpuDvfsTableClocksDeprecated, 263, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(CpuDvfsTableVoltagesDeprecated, 264, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(GpuDvfsTableClocksDeprecated, 265, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(GpuDvfsTableVoltagesDeprecated, 266, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(EmcDvfsTableClocksDeprecated, 267, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(EmcDvfsTableVoltagesDeprecated, 268, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(ModuleClockFrequencies, 269, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(ModuleClockEnableFlags, 270, PowerClockInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ModulePowerEnableFlags, 271, PowerClockInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ModuleResetAssertFlags, 272, PowerClockInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ModuleMinimumVoltageClockRates, 273, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PowerDomainEnableFlagsDeprecated, 274, PowerClockInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(PowerDomainVoltagesDeprecated, 275, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(AccessPointRssi, 276, RadioStrengthInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FuseInfoDeprecated, 277, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(VideoLog, 278, VideoInfo, FieldType_String, FieldFlag_None ) \ HANDLER(GameCardDeviceId, 279, GameCardCIDInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(GameCardAsicReinitializeCount, 280, GameCardErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(GameCardAsicReinitializeFailureCount, 281, GameCardErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(GameCardAsicReinitializeFailureDetail, 282, GameCardErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(GameCardRefreshSuccessCount, 283, GameCardErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(GameCardAwakenCount, 284, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardAwakenFailureCount, 285, GameCardErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(GameCardReadCountFromInsert, 286, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardReadCountFromAwaken, 287, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardLastReadErrorPageAddress, 288, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardLastReadErrorPageCount, 289, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AppletManagerContextTrace, 290, ErrorInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(NvDispIsRegistered, 291, NvDispDeviceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispIsSuspend, 292, NvDispDeviceInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDC0SurfaceNum, 293, NvDispDeviceInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(NvDispDC1SurfaceNum, 294, NvDispDeviceInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(NvDispWindowSrcRectX, 295, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowSrcRectY, 296, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowSrcRectWidth, 297, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowSrcRectHeight, 298, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowDstRectX, 299, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowDstRectY, 300, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowDstRectWidth, 301, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowDstRectHeight, 302, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowIndex, 303, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowBlendOperation, 304, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowAlphaOperation, 305, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowDepth, 306, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowAlpha, 307, NvDispDcWindowInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispWindowHFilter, 308, NvDispDcWindowInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispWindowVFilter, 309, NvDispDcWindowInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispWindowOptions, 310, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispWindowSyncPointId, 311, NvDispDcWindowInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPSorPower, 312, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPClkType, 313, NvDispDpModeInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDPEnable, 314, NvDispDpModeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPState, 315, NvDispDpModeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPEdid, 316, NvDispDpModeInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NvDispDPEdidSize, 317, NvDispDpModeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPEdidExtSize, 318, NvDispDpModeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPFakeMode, 319, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPModeNumber, 320, NvDispDpModeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPPlugInOut, 321, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPAuxIntHandler, 322, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPForceMaxLinkBW, 323, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPIsConnected, 324, NvDispDpModeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkValid, 325, NvDispDpLinkSpec, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkMaxBW, 326, NvDispDpLinkSpec, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDPLinkMaxLaneCount, 327, NvDispDpLinkSpec, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDPLinkDownSpread, 328, NvDispDpLinkSpec, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkSupportEnhancedFraming, 329, NvDispDpLinkSpec, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkBpp, 330, NvDispDpLinkSpec, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkScaramberCap, 331, NvDispDpLinkSpec, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkBW, 332, NvDispDpLinkStatus, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDPLinkLaneCount, 333, NvDispDpLinkStatus, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDPLinkEnhancedFraming, 334, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkScrambleEnable, 335, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkActivePolarity, 336, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkActiveCount, 337, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkTUSize, 338, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkActiveFrac, 339, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkWatermark, 340, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkHBlank, 341, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkVBlank, 342, NvDispDpLinkStatus, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDPLinkOnlyEnhancedFraming, 343, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkOnlyEdpCap, 344, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkSupportFastLT, 345, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkLTDataValid, 346, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkTsp3Support, 347, NvDispDpLinkStatus, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDPLinkAuxInterval, 348, NvDispDpLinkStatus, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispHdcpCreated, 349, NvDispDpHdcpInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispHdcpUserRequest, 350, NvDispDpHdcpInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispHdcpPlugged, 351, NvDispDpHdcpInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispHdcpState, 352, NvDispDpHdcpInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispHdcpFailCount, 353, NvDispDpHdcpInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispHdcpHdcp22, 354, NvDispDpHdcpInfo, FieldType_NumericI8, FieldFlag_None ) \ HANDLER(NvDispHdcpMaxRetry, 355, NvDispDpHdcpInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispHdcpHpd, 356, NvDispDpHdcpInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispHdcpRepeater, 357, NvDispDpHdcpInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispCecRxBuf, 358, NvDispDpAuxCecInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NvDispCecRxLength, 359, NvDispDpAuxCecInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispCecTxBuf, 360, NvDispDpAuxCecInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NvDispCecTxLength, 361, NvDispDpAuxCecInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispCecTxRet, 362, NvDispDpAuxCecInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispCecState, 363, NvDispDpAuxCecInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispCecTxInfo, 364, NvDispDpAuxCecInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispCecRxInfo, 365, NvDispDpAuxCecInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDCIndex, 366, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCInitialize, 367, NvDispDcInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDCClock, 368, NvDispDcInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDCFrequency, 369, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCFailed, 370, NvDispDcInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDCModeWidth, 371, NvDispDcInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispDCModeHeight, 372, NvDispDcInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(NvDispDCModeBpp, 373, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCPanelFrequency, 374, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCWinDirty, 375, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCWinEnable, 376, NvDispDcInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDCVrr, 377, NvDispDcInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDCPanelInitialize, 378, NvDispDcInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDsiDataFormat, 379, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiVideoMode, 380, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiRefreshRate, 381, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiLpCmdModeFrequency, 382, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiHsCmdModeFrequency, 383, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiPanelResetTimeout, 384, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiPhyFrequency, 385, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiFrequency, 386, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDsiInstance, 387, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDcDsiHostCtrlEnable, 388, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiInit, 389, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiEnable, 390, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiHsMode, 391, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiVendorId, 392, NvDispDsiInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NvDispDcDsiLcdVendorNum, 393, NvDispDsiInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NvDispDcDsiHsClockControl, 394, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDcDsiEnableHsClockInLpMode, 395, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiTeFrameUpdate, 396, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispDcDsiGangedType, 397, NvDispDsiInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispDcDsiHbpInPktSeq, 398, NvDispDsiInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NvDispErrID, 399, NvDispErrIDInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispErrData0, 400, NvDispErrIDInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvDispErrData1, 401, NvDispErrIDInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SdCardMountStatus, 402, SdCardMountInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SdCardMountUnexpectedResult, 403, SdCardMountInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NANDTotalSize, 404, NANDFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SdCardTotalSize, 405, SDCardFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(ElapsedTimeSinceInitialLaunch, 406, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ElapsedTimeSincePowerOn, 407, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ElapsedTimeSinceLastAwake, 408, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(OccurrenceTick, 409, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(RetailInteractiveDisplayFlag, 410, RetailInteractiveDisplayInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(FatFsError, 411, FsProxyErrorInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsExtraError, 412, FsProxyErrorInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsErrorDrive, 413, FsProxyErrorInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsErrorName, 414, FsProxyErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(MonitorManufactureCode, 415, MonitorCapability, FieldType_String, FieldFlag_None ) \ HANDLER(MonitorProductCode, 416, MonitorCapability, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(MonitorSerialNumber, 417, MonitorCapability, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(MonitorManufactureYear, 418, MonitorCapability, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PhysicalAddress, 419, MonitorCapability, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(Is4k60Hz, 420, MonitorCapability, FieldType_Bool, FieldFlag_None ) \ HANDLER(Is4k30Hz, 421, MonitorCapability, FieldType_Bool, FieldFlag_None ) \ HANDLER(Is1080P60Hz, 422, MonitorCapability, FieldType_Bool, FieldFlag_None ) \ HANDLER(Is720P60Hz, 423, MonitorCapability, FieldType_Bool, FieldFlag_None ) \ HANDLER(PcmChannelMax, 424, MonitorCapability, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(CrashReportHash, 425, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ErrorReportSharePermission, 426, ErrorReportSharePermissionInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(VideoCodecTypeEnum, 427, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(VideoBitRate, 428, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(VideoFrameRate, 429, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(VideoWidth, 430, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(VideoHeight, 431, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(AudioCodecTypeEnum, 432, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(AudioSampleRate, 433, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(AudioChannelCount, 434, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(AudioBitRate, 435, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaContainerType, 436, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaProfileType, 437, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaLevelType, 438, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaCacheSizeEnum, 439, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaErrorStatusEnum, 440, MultimediaInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(MultimediaErrorLog, 441, MultimediaInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ServerFqdn, 442, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ServerIpAddress, 443, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(TestStringEncrypt, 444, Test, FieldType_String, FieldFlag_Encrypt) \ HANDLER(TestU8ArrayEncrypt, 445, Test, FieldType_U8Array, FieldFlag_Encrypt) \ HANDLER(TestU32ArrayEncrypt, 446, Test, FieldType_U32Array, FieldFlag_Encrypt) \ HANDLER(TestU64ArrayEncrypt, 447, Test, FieldType_U64Array, FieldFlag_Encrypt) \ HANDLER(TestI32ArrayEncrypt, 448, Test, FieldType_I32Array, FieldFlag_Encrypt) \ HANDLER(TestI64ArrayEncrypt, 449, Test, FieldType_I64Array, FieldFlag_Encrypt) \ HANDLER(CipherKey, 450, ErrorInfoAuto, FieldType_U8Array, FieldFlag_None ) \ HANDLER(FileSystemPath, 451, ErrorInfo, FieldType_String, FieldFlag_Encrypt) \ HANDLER(WebMediaPlayerOpenUrl, 452, ErrorInfo, FieldType_String, FieldFlag_Encrypt) \ HANDLER(WebMediaPlayerLastSocketErrors, 453, ErrorInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(UnknownControllerCount, 454, ConnectedControllerInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AttachedControllerCount, 455, ConnectedControllerInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothControllerCount, 456, ConnectedControllerInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(UsbControllerCount, 457, ConnectedControllerInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(ControllerTypeList, 458, ConnectedControllerInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ControllerInterfaceList, 459, ConnectedControllerInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ControllerStyleList, 460, ConnectedControllerInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(FsPooledBufferPeakFreeSize, 461, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsPooledBufferRetriedCount, 462, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsPooledBufferReduceAllocationCount, 463, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsBufferManagerPeakFreeSize, 464, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsBufferManagerRetriedCount, 465, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsExpHeapPeakFreeSize, 466, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsBufferPoolPeakFreeSize, 467, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsPatrolReadAllocateBufferSuccessCount, 468, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsPatrolReadAllocateBufferFailureCount, 469, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SteadyClockInternalOffset, 470, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SteadyClockCurrentTimePointValue, 471, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(UserClockContextOffset, 472, UserClockContextInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(UserClockContextTimeStampValue, 473, UserClockContextInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(NetworkClockContextOffset, 474, NetworkClockContextInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(NetworkClockContextTimeStampValue, 475, NetworkClockContextInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemAbortFlag, 476, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ApplicationAbortFlag, 477, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(NifmErrorCode, 478, ConnectionStatusInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LcsApplicationId, 479, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LcsContentMetaKeyIdList, 480, ErrorInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(LcsContentMetaKeyVersionList, 481, ErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(LcsContentMetaKeyTypeList, 482, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(LcsContentMetaKeyInstallTypeList, 483, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(LcsSenderFlag, 484, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(LcsApplicationRequestFlag, 485, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(LcsHasExFatDriverFlag, 486, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(LcsIpAddress, 487, ErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AcpStartupUserAccount, 488, AcpUserAccountSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpAocRegistrationType, 489, AcpAocSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpAttributeFlag, 490, AcpGeneralSettingsInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AcpSupportedLanguageFlag, 491, AcpGeneralSettingsInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AcpParentalControlFlag, 492, AcpGeneralSettingsInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AcpScreenShot, 493, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpVideoCapture, 494, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpDataLossConfirmation, 495, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpPlayLogPolicy, 496, AcpPlayLogSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpPresenceGroupId, 497, AcpGeneralSettingsInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AcpRatingAge, 498, AcpRatingSettingsInfo, FieldType_I8Array, FieldFlag_None ) \ HANDLER(AcpAocBaseId, 499, AcpAocSettingsInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AcpSaveDataOwnerId, 500, AcpStorageSettingsInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AcpUserAccountSaveDataSize, 501, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpUserAccountSaveDataJournalSize, 502, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpDeviceSaveDataSize, 503, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpDeviceSaveDataJournalSize, 504, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpBcatDeliveryCacheStorageSize, 505, AcpBcatSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpApplicationErrorCodeCategory, 506, AcpGeneralSettingsInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AcpLocalCommunicationId, 507, AcpGeneralSettingsInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(AcpLogoType, 508, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpLogoHandling, 509, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpRuntimeAocInstall, 510, AcpAocSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpCrashReport, 511, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpHdcp, 512, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpSeedForPseudoDeviceId, 513, AcpGeneralSettingsInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AcpBcatPassphrase, 514, AcpBcatSettingsInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AcpUserAccountSaveDataSizeMax, 515, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpUserAccountSaveDataJournalSizeMax, 516, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpDeviceSaveDataSizeMax, 517, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpDeviceSaveDataJournalSizeMax, 518, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpTemporaryStorageSize, 519, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpCacheStorageSize, 520, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpCacheStorageJournalSize, 521, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpCacheStorageDataAndJournalSizeMax, 522, AcpStorageSettingsInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpCacheStorageIndexMax, 523, AcpStorageSettingsInfo, FieldType_NumericI16, FieldFlag_None ) \ HANDLER(AcpPlayLogQueryableApplicationId, 524, AcpPlayLogSettingsInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(AcpPlayLogQueryCapability, 525, AcpPlayLogSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AcpRepairFlag, 526, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(RunningApplicationPatchStorageLocation, 527, RunningApplicationInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningApplicationVersionNumber, 528, RunningApplicationInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsRecoveredByInvalidateCacheCount, 529, FsProxyErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsSaveDataIndexCount, 530, FsProxyErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsBufferManagerPeakTotalAllocatableSize, 531, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(MonitorCurrentWidth, 532, MonitorSettings, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(MonitorCurrentHeight, 533, MonitorSettings, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(MonitorCurrentRefreshRate, 534, MonitorSettings, FieldType_String, FieldFlag_None ) \ HANDLER(RebootlessSystemUpdateVersion, 535, RebootlessSystemUpdateVersionInfo, FieldType_String, FieldFlag_None ) \ HANDLER(EncryptedExceptionInfo1, 536, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EncryptedExceptionInfo2, 537, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EncryptedExceptionInfo3, 538, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EncryptedDyingMessage, 539, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(DramId, 540, PowerClockInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NifmConnectionTestRedirectUrl, 541, NifmConnectionTestInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AcpRequiredNetworkServiceLicenseOnLaunchFlag, 542, AcpUserAccountSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PciePort0Flags, 543, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort0Speed, 544, PcieLoggedStateInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PciePort0ResetTimeInUs, 545, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort0IrqCount, 546, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort0Statistics, 547, PcieLoggedStateInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PciePort1Flags, 548, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort1Speed, 549, PcieLoggedStateInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PciePort1ResetTimeInUs, 550, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort1IrqCount, 551, PcieLoggedStateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PciePort1Statistics, 552, PcieLoggedStateInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PcieFunction0VendorId, 553, PcieLoggedStateInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(PcieFunction0DeviceId, 554, PcieLoggedStateInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(PcieFunction0PmState, 555, PcieLoggedStateInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PcieFunction0IsAcquired, 556, PcieLoggedStateInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(PcieFunction1VendorId, 557, PcieLoggedStateInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(PcieFunction1DeviceId, 558, PcieLoggedStateInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(PcieFunction1PmState, 559, PcieLoggedStateInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PcieFunction1IsAcquired, 560, PcieLoggedStateInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(PcieGlobalRootComplexStatistics, 561, PcieLoggedStateInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(PciePllResistorCalibrationValue, 562, PcieLoggedStateInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(CertificateRequestedHostName, 563, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CertificateCommonName, 564, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(CertificateSANCount, 565, NetworkSecurityCertificateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CertificateSANs, 566, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(FsBufferPoolMaxAllocateSize, 567, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(CertificateIssuerName, 568, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ApplicationAliveTime, 569, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ApplicationInFocusTime, 570, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ApplicationOutOfFocusTime, 571, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(ApplicationBackgroundFocusTime, 572, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(AcpUserAccountSwitchLock, 573, AcpUserAccountSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(USB3HostAvailableFlag, 574, USB3AvailableInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(USB3DeviceAvailableFlag, 575, USB3AvailableInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(AcpNeighborDetectionClientConfigurationSendDataId, 576, AcpNeighborDetectionInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AcpNeighborDetectionClientConfigurationReceivableDataIds, 577, AcpNeighborDetectionInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(AcpStartupUserAccountOptionFlag, 578, AcpUserAccountSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(ServerErrorCode, 579, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AppletManagerMetaLogTrace, 580, ErrorInfo, FieldType_U64Array, FieldFlag_None ) \ HANDLER(ServerCertificateSerialNumber, 581, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ServerCertificatePublicKeyAlgorithm, 582, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ServerCertificateSignatureAlgorithm, 583, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(ServerCertificateNotBefore, 584, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(ServerCertificateNotAfter, 585, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(CertificateAlgorithmInfoBits, 586, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(TlsConnectionPeerIpAddress, 587, NetworkSecurityCertificateInfo, FieldType_String, FieldFlag_None ) \ HANDLER(TlsConnectionLastHandshakeState, 588, NetworkSecurityCertificateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(TlsConnectionInfoBits, 589, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SslStateBits, 590, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SslProcessInfoBits, 591, NetworkSecurityCertificateInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SslProcessHeapSize, 592, NetworkSecurityCertificateInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(SslBaseErrorCode, 593, NetworkSecurityCertificateInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(GpuCrashDumpSize, 594, GpuCrashInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GpuCrashDump, 595, GpuCrashInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(RunningApplicationProgramIndex, 596, RunningApplicationInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(UsbTopology, 597, UsbStateInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(AkamaiReferenceId, 598, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NvHostErrID, 599, NvHostErrInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NvHostErrDataArrayU32, 600, NvHostErrInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(HasSyslogFlag, 601, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(AcpRuntimeParameterDelivery, 602, AcpGeneralSettingsInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PlatformRegion, 603, RegionSettingInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningUlaApplicationId, 604, RunningUlaInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningUlaAppletId, 605, RunningUlaInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(RunningUlaVersion, 606, RunningUlaInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(RunningUlaApplicationStorageLocation, 607, RunningUlaInfo, FieldType_String, FieldFlag_None ) \ HANDLER(RunningUlaPatchStorageLocation, 608, RunningUlaInfo, FieldType_String, FieldFlag_None ) \ HANDLER(NANDTotalSizeOfSystem, 609, NANDFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(NANDFreeSpaceOfSystem, 610, NANDFreeSpaceInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AccessPointSSIDAsHex, 611, AccessPointInfo, FieldType_String, FieldFlag_None ) \ HANDLER(PanelVendorId, 612, InternalPanelInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PanelRevisionId, 613, InternalPanelInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(PanelModelId, 614, InternalPanelInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(ErrorContext, 615, ErrorInfoAuto, FieldType_U8Array, FieldFlag_None ) \ HANDLER(ErrorContextSize, 616, ErrorInfoAuto, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(ErrorContextTotalSize, 617, ErrorInfoAuto, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(SystemPhysicalMemoryLimit, 618, ResourceLimitLimitInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemThreadCountLimit, 619, ResourceLimitLimitInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemEventCountLimit, 620, ResourceLimitLimitInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemTransferMemoryCountLimit, 621, ResourceLimitLimitInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemSessionCountLimit, 622, ResourceLimitLimitInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemPhysicalMemoryPeak, 623, ResourceLimitPeakInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemThreadCountPeak, 624, ResourceLimitPeakInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemEventCountPeak, 625, ResourceLimitPeakInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemTransferMemoryCountPeak, 626, ResourceLimitPeakInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(SystemSessionCountPeak, 627, ResourceLimitPeakInfo, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(GpuCrashHash, 628, GpuCrashInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(TouchScreenPanelGpioValue, 629, TouchScreenInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BrowserCertificateHostName, 630, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(BrowserCertificateCommonName, 631, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(BrowserCertificateOrganizationalUnitName, 632, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(FsPooledBufferFailedIdealAllocationCountOnAsyncAccess, 633, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(AudioOutputTarget, 634, AudioDeviceInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AudioOutputChannelCount, 635, AudioDeviceInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(AppletTotalActiveTime, 636, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(WakeCount, 637, AbnormalWakeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(PredominantWakeReason, 638, AbnormalWakeInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(EdidExtensionBlock2, 639, EdidInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(EdidExtensionBlock3, 640, EdidInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(LumenRequestId, 641, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(LlnwLlid, 642, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(SupportingLimitedApplicationLicenses, 643, RunningApplicationInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(RuntimeLimitedApplicationLicenseUpgrade, 644, RunningApplicationInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(ServiceProfileRevisionKey, 645, ServiceProfileInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(BluetoothAudioConnectionCount, 646, BluetoothAudioInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothHidPairingInfoCountDeprecated, 647, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothAudioPairingInfoCountDeprecated, 648, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothLePairingInfoCountDeprecated, 649, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(FatFsBisSystemFilePeakOpenCount, 650, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisSystemDirectoryPeakOpenCount, 651, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisUserFilePeakOpenCount, 652, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisUserDirectoryPeakOpenCount, 653, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsSdCardFilePeakOpenCount, 654, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsSdCardDirectoryPeakOpenCount, 655, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(SslAlertInfo, 656, NetworkSecurityCertificateInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(SslVersionInfo, 657, NetworkSecurityCertificateInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(FatFsBisSystemUniqueFileEntryPeakOpenCount, 658, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisSystemUniqueDirectoryEntryPeakOpenCount, 659, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisUserUniqueFileEntryPeakOpenCount, 660, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsBisUserUniqueDirectoryEntryPeakOpenCount, 661, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsSdCardUniqueFileEntryPeakOpenCount, 662, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(FatFsSdCardUniqueDirectoryEntryPeakOpenCount, 663, FsProxyErrorInfo, FieldType_NumericU16, FieldFlag_None ) \ HANDLER(ServerErrorIsRetryable, 664, ErrorInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(FsDeepRetryStartCount, 665, FsProxyErrorInfo2, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(FsUnrecoverableByGameCardAccessFailedCount, 666, FsProxyErrorInfo2, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(BuiltInWirelessOUI, 667, BuiltInWirelessOUIInfo, FieldType_String, FieldFlag_None ) \ HANDLER(WirelessAPOUI, 668, WirelessAPOUIInfo, FieldType_String, FieldFlag_None ) \ HANDLER(EthernetAdapterOUI, 669, EthernetAdapterOUIInfo, FieldType_String, FieldFlag_None ) \ HANDLER(FatFsBisSystemFatSafeControlResult, 670, FsProxyErrorInfo2, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(FatFsBisSystemFatErrorNumber, 671, FsProxyErrorInfo2, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsBisSystemFatSafeErrorNumber, 672, FsProxyErrorInfo2, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsBisUserFatSafeControlResult, 673, FsProxyErrorInfo2, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(FatFsBisUserFatErrorNumber, 674, FsProxyErrorInfo2, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FatFsBisUserFatSafeErrorNumber, 675, FsProxyErrorInfo2, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(GpuCrashDump2, 676, GpuCrashInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(NANDTypeDeprecated, 677, NANDTypeInfoDeprecated, FieldType_U8Array, FieldFlag_None ) \ HANDLER(MicroSDType, 678, MicroSDTypeInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(GameCardLastDeactivateReasonResult, 679, GameCardErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(GameCardLastDeactivateReason, 680, GameCardErrorInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(InvalidErrorCode, 681, ErrorInfo, FieldType_String, FieldFlag_None ) \ HANDLER(AppletId, 682, ApplicationInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(PrevReportIdentifier, 683, ErrorInfoAuto, FieldType_String, FieldFlag_None ) \ HANDLER(SyslogStartupTimeBase, 684, ErrorInfoAuto, FieldType_NumericI64, FieldFlag_None ) \ HANDLER(NxdmpIsAttached, 685, AttachmentFileInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(ScreenshotIsAttached, 686, AttachmentFileInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(SyslogIsAttached, 687, AttachmentFileInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(SaveSyslogResult, 688, AttachmentFileInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(EncryptionKeyGeneration, 689, ErrorInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(FsBufferManagerNonBlockingRetriedCount, 690, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(FsPooledBufferNonBlockingRetriedCount, 691, FsMemoryInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(LastConnectionTestDownloadSpeed64, 692, ConnectionInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(LastConnectionTestUploadSpeed64, 693, ConnectionInfo, FieldType_NumericU64, FieldFlag_None ) \ HANDLER(EncryptionKeyV1, 694, ErrorInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(TestStringNx, 1000, TestNx, FieldType_String, FieldFlag_None ) \ HANDLER(BoostModeCurrentLimit, 1001, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ChargeConfiguration, 1002, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(HizMode, 1003, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(PowerSupplyPath, 1004, BatteryChargeInfo, FieldType_NumericI32, FieldFlag_None ) \ HANDLER(ControllerPowerSupplyAcquired, 1005, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(OtgRequested, 1006, BatteryChargeInfo, FieldType_Bool, FieldFlag_None ) \ HANDLER(AdspExceptionRegisters, 1007, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionSpsr, 1008, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionArmModeRegisters, 1009, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionStackAddress, 1010, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(AdspExceptionStackDump, 1011, AdspErrorInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(AdspExceptionReason, 1012, AdspErrorInfo, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(CpuDvfsTableClocks, 1013, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(CpuDvfsTableVoltages, 1014, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(GpuDvfsTableClocks, 1015, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(GpuDvfsTableVoltages, 1016, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(EmcDvfsTableClocks, 1017, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(EmcDvfsTableVoltages, 1018, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(PowerDomainEnableFlags, 1019, PowerClockInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(PowerDomainVoltages, 1020, PowerClockInfo, FieldType_I32Array, FieldFlag_None ) \ HANDLER(FuseInfo, 1021, PowerClockInfo, FieldType_U32Array, FieldFlag_None ) \ HANDLER(NANDType, 1022, NANDTypeInfo, FieldType_U8Array, FieldFlag_None ) \ HANDLER(BluetoothHidPairingInfoCount, 1023, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothAudioPairingInfoCount, 1024, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(BluetoothLePairingInfoCount, 1025, BluetoothPairingCountInfo, FieldType_NumericU8, FieldFlag_None ) \ HANDLER(NANDPreEolInfo, 1026, NANDExtendedCsd, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDDeviceLifeTimeEstTypA, 1027, NANDExtendedCsd, FieldType_NumericU32, FieldFlag_None ) \ HANDLER(NANDDeviceLifeTimeEstTypB, 1028, NANDExtendedCsd, FieldType_NumericU32, FieldFlag_None )
122,799
C++
.h
908
130.317181
155
0.496825
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,134
erpt_multiple_category_context.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/erpt_multiple_category_context.hpp
/* * 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/erpt/erpt_types.hpp> #include <stratosphere/sf/sf_buffer_tags.hpp> namespace ams::erpt { constexpr inline u32 CategoriesPerMultipleCategoryContext = 0x10; constexpr inline u32 FieldsPerMultipleCategoryContext = CategoriesPerMultipleCategoryContext * 4; struct MultipleCategoryContextEntry : public sf::LargeData, public sf::PrefersMapAliasTransferMode { u32 version; u32 category_count; CategoryId categories[CategoriesPerMultipleCategoryContext]; u32 field_counts[CategoriesPerMultipleCategoryContext]; u32 array_buf_counts[CategoriesPerMultipleCategoryContext]; FieldEntry fields[FieldsPerMultipleCategoryContext]; }; }
1,388
C++
.h
31
41.129032
105
0.773836
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,135
erpt_sf_i_session.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_session.hpp
/* * 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/erpt/erpt_types.hpp> #include <stratosphere/erpt/sf/erpt_sf_i_report.hpp> #include <stratosphere/erpt/sf/erpt_sf_i_manager.hpp> #include <stratosphere/erpt/sf/erpt_sf_i_attachment.hpp> #define AMS_ERPT_I_SESSION_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenReport, (ams::sf::Out<ams::sf::SharedPointer<erpt::sf::IReport>> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, OpenManager, (ams::sf::Out<ams::sf::SharedPointer<erpt::sf::IManager>> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, OpenAttachment, (ams::sf::Out<ams::sf::SharedPointer<erpt::sf::IAttachment>> out), (out), hos::Version_8_0_0) AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, ISession, AMS_ERPT_I_SESSION_INTERFACE_INFO, 0x00395188)
1,587
C++
.h
26
58.961538
152
0.66068
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,136
erpt_sf_i_context.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_context.hpp
/* * 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/erpt/erpt_types.hpp> #include <stratosphere/erpt/erpt_multiple_category_context.hpp> #include <stratosphere/time/time_steady_clock_time_point.hpp> #define AMS_ERPT_I_CONTEXT_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, SubmitContext, (const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer), (ctx_buffer, str_buffer)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, CreateReportV0, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &meta_buffer), (report_type, ctx_buffer, str_buffer, meta_buffer)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, SetInitialLaunchSettingsCompletionTime, (const time::SteadyClockTimePoint &time_point), (time_point), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 3, Result, ClearInitialLaunchSettingsCompletionTime, (), (), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, UpdatePowerOnTime, (), (), hos::Version_3_0_0) \ AMS_SF_METHOD_INFO(C, H, 5, Result, UpdateAwakeTime, (), (), hos::Version_3_0_0, hos::Version_12_0_0) \ AMS_SF_METHOD_INFO(C, H, 6, Result, SubmitMultipleCategoryContext, (const erpt::MultipleCategoryContextEntry &ctx_entry, const ams::sf::InBuffer &str_buffer), (ctx_entry, str_buffer), hos::Version_5_0_0, hos::Version_12_0_0) \ AMS_SF_METHOD_INFO(C, H, 7, Result, UpdateApplicationLaunchTime, (), (), hos::Version_6_0_0) \ AMS_SF_METHOD_INFO(C, H, 8, Result, ClearApplicationLaunchTime, (), (), hos::Version_6_0_0) \ AMS_SF_METHOD_INFO(C, H, 9, Result, SubmitAttachment, (ams::sf::Out<erpt::AttachmentId> out, const ams::sf::InBuffer &attachment_name, const ams::sf::InBuffer &attachment_data), (out, attachment_name, attachment_data), hos::Version_8_0_0) \ AMS_SF_METHOD_INFO(C, H, 10, Result, CreateReportWithAttachmentsDeprecated, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &attachment_ids_buffer), (report_type, ctx_buffer, str_buffer, attachment_ids_buffer), hos::Version_8_0_0, hos::Version_10_2_0) \ AMS_SF_METHOD_INFO(C, H, 10, Result, CreateReportWithAttachmentsDeprecated2, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &attachment_ids_buffer, Result result), (report_type, ctx_buffer, str_buffer, attachment_ids_buffer, result), hos::Version_11_0_0, hos::Version_16_1_0) \ AMS_SF_METHOD_INFO(C, H, 10, Result, CreateReportWithAttachments, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &attachment_ids_buffer, Result result, erpt::CreateReportOptionFlagSet flags), (report_type, ctx_buffer, str_buffer, attachment_ids_buffer, result, flags), hos::Version_17_0_0) \ AMS_SF_METHOD_INFO(C, H, 11, Result, CreateReportV1, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &meta_buffer, Result result), (report_type, ctx_buffer, str_buffer, meta_buffer, result), hos::Version_11_0_0) \ AMS_SF_METHOD_INFO(C, H, 12, Result, CreateReport, (erpt::ReportType report_type, const ams::sf::InBuffer &ctx_buffer, const ams::sf::InBuffer &str_buffer, const ams::sf::InBuffer &meta_buffer, Result result, erpt::CreateReportOptionFlagSet flags), (report_type, ctx_buffer, str_buffer, meta_buffer, result, flags), hos::Version_17_0_0) \ AMS_SF_METHOD_INFO(C, H, 20, Result, RegisterRunningApplet, (ncm::ProgramId program_id), (program_id), hos::Version_12_0_0) \ AMS_SF_METHOD_INFO(C, H, 21, Result, UnregisterRunningApplet, (ncm::ProgramId program_id), (program_id), hos::Version_12_0_0) \ AMS_SF_METHOD_INFO(C, H, 22, Result, UpdateAppletSuspendedDuration, (ncm::ProgramId program_id, TimeSpanType duration), (program_id, duration), hos::Version_12_0_0) \ AMS_SF_METHOD_INFO(C, H, 30, Result, InvalidateForcedShutdownDetection, (), (), hos::Version_12_0_0) AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IContext, AMS_ERPT_I_CONTEXT_INTERFACE_INFO, 0xDD41DD03)
9,208
C++
.h
42
216.02381
412
0.382408
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,137
erpt_sf_i_manager.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_manager.hpp
/* * 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/erpt/erpt_types.hpp> #define AMS_ERPT_I_MANAGER_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetReportList, (const ams::sf::OutBuffer &out_list, erpt::ReportType type_filter), (out_list, type_filter)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, GetEvent, (ams::sf::OutCopyHandle out), (out)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, CleanupReports, (), (), hos::Version_4_0_0) \ AMS_SF_METHOD_INFO(C, H, 3, Result, DeleteReport, (const erpt::ReportId &report_id), (report_id), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 4, Result, GetStorageUsageStatistics, (ams::sf::Out<erpt::StorageUsageStatistics> out), (out), hos::Version_5_0_0) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetAttachmentList, (const ams::sf::OutBuffer &out_buf, const erpt::ReportId &report_id), (out_buf, report_id), hos::Version_8_0_0) AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IManager, AMS_ERPT_I_MANAGER_INTERFACE_INFO, 0x5CFCC43F)
2,107
C++
.h
26
78.461538
184
0.555823
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,138
erpt_sf_i_report.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_report.hpp
/* * 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/erpt/erpt_types.hpp> #define AMS_ERPT_I_REPORT_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Open, (const erpt::ReportId &report_id), (report_id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, Read, (ams::sf::Out<u32> out_count, const ams::sf::OutBuffer &out_buffer), (out_count, out_buffer)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, SetFlags, (erpt::ReportFlagSet flags), (flags)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, GetFlags, (ams::sf::Out<erpt::ReportFlagSet> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, Close, (), ()) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetSize, (ams::sf::Out<s64> out), (out)) AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IReport, AMS_ERPT_I_REPORT_INTERFACE_INFO, 0xE4CD5A61)
1,820
C++
.h
26
67.461538
146
0.553013
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,139
erpt_sf_i_attachment.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/sf/erpt_sf_i_attachment.hpp
/* * 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/erpt/erpt_types.hpp> #define AMS_ERPT_I_ATTACHMENT_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Open, (const erpt::AttachmentId &attachment_id), (attachment_id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, Read, (ams::sf::Out<u32> out_count, const ams::sf::OutBuffer &out_buffer), (out_count, out_buffer)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, SetFlags, (erpt::AttachmentFlagSet flags), (flags)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, GetFlags, (ams::sf::Out<erpt::AttachmentFlagSet> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, Close, (), ()) \ AMS_SF_METHOD_INFO(C, H, 5, Result, GetSize, (ams::sf::Out<s64> out), (out)) AMS_SF_DEFINE_INTERFACE(ams::erpt::sf, IAttachment, AMS_ERPT_I_ATTACHMENT_INTERFACE_INFO, 0x10FC4A69)
1,869
C++
.h
26
69.384615
152
0.555375
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,140
erpt_srv_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_types.hpp
/* * 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/os.hpp> #include <stratosphere/erpt/erpt_ids.autogen.hpp> namespace ams::erpt::srv { constexpr inline const char ReportOnSdStoragePath[] = "ersd"; constexpr inline const char ReportOnSdStorageRootDirectoryPath[] = "ersd:/"; constexpr inline const char ReportStoragePath[] = "save"; constexpr inline const char JournalFileName[] = "save:/journal"; constexpr inline const char ForcedShutdownContextFileName[] = "save:/forced-shutdown"; constexpr size_t ReportFileNameLength = 64; constexpr size_t AttachmentFileNameLength = 64; constexpr size_t MaxFieldStringSize = 64; struct ReportFileName { char name[ReportFileNameLength]; }; struct AttachmentFileName { char name[AttachmentFileNameLength]; }; enum FieldFlag : u8 { FieldFlag_None = 0, FieldFlag_Encrypt = 1, }; #define STRINGIZE_HANDLER(NAME, ...) #NAME, constexpr inline const char * const FieldString[] = { AMS_ERPT_FOREACH_FIELD(STRINGIZE_HANDLER) }; constexpr inline const char * const CategoryString[] = { AMS_ERPT_FOREACH_CATEGORY(STRINGIZE_HANDLER) }; constexpr inline const char * const TypeString[] = { AMS_ERPT_FOREACH_FIELD_TYPE(STRINGIZE_HANDLER) }; #undef STRINGIZE_HANDLER #define GET_FIELD_CATEGORY(FIELD, ID, CATEGORY, TYPE, FLAG) CategoryId_##CATEGORY, constexpr inline const CategoryId FieldIndexToCategoryMap[] = { AMS_ERPT_FOREACH_FIELD(GET_FIELD_CATEGORY) }; #undef GET_FIELD_CATEGORY #define GET_FIELD_TYPE(FIELD, ID, CATEGORY, TYPE, FLAG) TYPE, constexpr inline const FieldType FieldIndexToTypeMap[] = { AMS_ERPT_FOREACH_FIELD(GET_FIELD_TYPE) }; #undef GET_FIELD_TYPE #define GET_FIELD_FLAG(FIELD, ID, CATEGORY, TYPE, FLAG) FLAG, constexpr inline const FieldFlag FieldIndexToFlagMap[] = { AMS_ERPT_FOREACH_FIELD(GET_FIELD_FLAG) }; #undef GET_FIELD_FLAG #define GET_FIELD_ID(FIELD, ...) FieldId_##FIELD, constexpr inline const FieldId FieldIndexToFieldIdMap[] = { AMS_ERPT_FOREACH_FIELD(GET_FIELD_ID) }; #undef GET_FIELD_ID #define GET_CATEGORY_ID(CATEGORY, ...) CategoryId_##CATEGORY, constexpr inline const CategoryId CategoryIndexToCategoryIdMap[] = { AMS_ERPT_FOREACH_CATEGORY(GET_CATEGORY_ID) }; #undef GET_CATEGORY_ID constexpr util::optional<size_t> FindFieldIndex(FieldId id) { if (std::is_constant_evaluated()) { for (size_t i = 0; i < util::size(FieldIndexToFieldIdMap); ++i) { if (FieldIndexToFieldIdMap[i] == id) { return i; } } return util::nullopt; } else { if (const auto it = std::lower_bound(std::begin(FieldIndexToFieldIdMap), std::end(FieldIndexToFieldIdMap), id); it != std::end(FieldIndexToFieldIdMap) && *it == id) { return std::distance(FieldIndexToFieldIdMap, it); } else { return util::nullopt; } } } constexpr util::optional<size_t> FindCategoryIndex(CategoryId id) { if (std::is_constant_evaluated()) { for (size_t i = 0; i < util::size(CategoryIndexToCategoryIdMap); ++i) { if (CategoryIndexToCategoryIdMap[i] == id) { return i; } } return util::nullopt; } else { if (const auto it = std::lower_bound(std::begin(CategoryIndexToCategoryIdMap), std::end(CategoryIndexToCategoryIdMap), id); it != std::end(CategoryIndexToCategoryIdMap) && *it == id) { return std::distance(CategoryIndexToCategoryIdMap, it); } else { return util::nullopt; } } } constexpr inline CategoryId ConvertFieldToCategory(FieldId id) { const auto index = FindFieldIndex(id); AMS_ASSERT(index.has_value()); return FieldIndexToCategoryMap[index.value()]; } constexpr inline FieldType ConvertFieldToType(FieldId id) { const auto index = FindFieldIndex(id); AMS_ASSERT(index.has_value()); return FieldIndexToTypeMap[index.value()]; } constexpr inline FieldFlag ConvertFieldToFlag(FieldId id) { const auto index = FindFieldIndex(id); AMS_ASSERT(index.has_value()); return FieldIndexToFlagMap[index.value()]; } constexpr inline ReportFlagSet MakeNoReportFlags() { return util::MakeBitFlagSet<32, ReportFlag>(); } constexpr inline CreateReportOptionFlagSet MakeNoCreateReportOptionFlags() { return util::MakeBitFlagSet<32, CreateReportOptionFlag>(); } constexpr inline AttachmentFlagSet MakeNoAttachmentFlags() { return util::MakeBitFlagSet<32, AttachmentFlag>(); } }
5,570
C++
.h
131
35.229008
196
0.664511
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,141
erpt_srv_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/erpt/srv/erpt_srv_api.hpp
/* * 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> namespace ams::erpt::srv { Result Initialize(u8 *mem, size_t mem_size); Result InitializeAndStartService(); Result SetSerialNumberAndOsVersion(const char *sn, u32 sn_len, const char *os, u32 os_len, const char *os_priv, u32 os_priv_len); Result SetProductModel(const char *model, u32 model_len); Result SetRegionSetting(const char *region, u32 region_len); /* Atmosphere extension. */ Result SetRedirectNewReportsToSdCard(bool redirect); Result SetEnabledAutomaticReportCleanup(bool redirect); void Wait(); }
1,221
C++
.h
28
40.642857
133
0.754209
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,142
ns_i_async.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ns/impl/ns_i_async.hpp
/* * 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/err/err_error_context.hpp> #include <stratosphere/sf.hpp> #define AMS_NS_I_ASYNC_RESULT_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Get, (), ()) \ AMS_SF_METHOD_INFO(C, H, 1, Result, Cancel, (), ()) \ AMS_SF_METHOD_INFO(C, H, 2, Result, GetErrorContext, (::ams::sf::Out<::ams::err::ErrorContext> out), (out)) AMS_SF_DEFINE_INTERFACE(ams::ns::impl, IAsyncResult, AMS_NS_I_ASYNC_RESULT_INTERFACE_INFO, 0x66E1ADBD)
1,316
C++
.h
24
52.625
114
0.626067
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,143
osdbg_thread_api_impl.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/osdbg/osdbg_thread_api_impl.hpp
/* * 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/osdbg/osdbg_thread_types.hpp> namespace ams::osdbg { constexpr inline s32 GetThreadPriority(const ThreadInfo *thread_info) { return thread_info->_base_priority; } constexpr inline s32 GetThreadCurrentPriority(const ThreadInfo *thread_info) { return thread_info->_current_priority; } constexpr inline size_t GetThreadStackSize(const ThreadInfo *thread_info) { return thread_info->_stack_size; } constexpr inline uintptr_t GetThreadStackAddress(const ThreadInfo *thread_info) { return thread_info->_stack; } constexpr inline uintptr_t GetThreadFunction(const ThreadInfo *thread_info) { return thread_info->_function; } constexpr inline uintptr_t GetThreadFunctionArgument(const ThreadInfo *thread_info) { return thread_info->_argument; } constexpr inline uintptr_t GetThreadNamePointer(const ThreadInfo *thread_info) { return thread_info->_name_pointer; } }
1,671
C++
.h
41
36.463415
89
0.740901
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,144
osdbg_thread_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/osdbg/osdbg_thread_api.hpp
/* * 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/osdbg/osdbg_thread_api_impl.hpp> namespace ams::osdbg { struct ThreadInfo; Result InitializeThreadInfo(ThreadInfo *thread_info, os::NativeHandle debug_handle, const osdbg::DebugInfoCreateProcess *create_process, const osdbg::DebugInfoCreateThread *create_thread); Result UpdateThreadInfo(ThreadInfo *thread_info); Result GetThreadName(char *dst, const ThreadInfo *thread_info); }
1,095
C++
.h
24
43.166667
192
0.774859
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,145
osdbg_thread.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/osdbg/osdbg_thread.hpp
/* * 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 <stratosphere/osdbg/osdbg_thread_types.hpp> #include <stratosphere/osdbg/osdbg_thread_api.hpp>
752
C++
.h
18
40
76
0.76703
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,146
osdbg_thread_types.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/osdbg/osdbg_thread_types.hpp
/* * 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> namespace ams::osdbg { namespace impl { union ThreadTypeCommon; } #if defined(ATMOSPHERE_OS_HORIZON) using DebugInfoCreateProcess = svc::DebugInfoCreateProcess; using DebugInfoCreateThread = svc::DebugInfoCreateThread; #else struct DebugInfoCreateProcess{}; struct DebugInfoCreateThread{}; #endif enum ThreadTypeType : u8 { ThreadTypeType_Unknown = 0, ThreadTypeType_Nintendo, ThreadTypeType_Stratosphere, #if defined(ATMOSPHERE_OS_HORIZON) ThreadTypeType_Libnx, #endif }; struct ThreadInfo { s32 _base_priority; s32 _current_priority; size_t _stack_size; uintptr_t _stack; uintptr_t _argument; uintptr_t _function; uintptr_t _name_pointer; impl::ThreadTypeCommon *_thread_type; os::NativeHandle _debug_handle; ThreadTypeType _thread_type_type; #if defined(ATMOSPHERE_OS_HORIZON) osdbg::DebugInfoCreateProcess _debug_info_create_process; osdbg::DebugInfoCreateThread _debug_info_create_thread; #endif }; }
1,806
C++
.h
53
28.509434
76
0.700287
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,147
htcfs_hipc_server.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/htcfs/htcfs_hipc_server.hpp
/* * 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> namespace ams::htclow { class HtclowManager; } namespace ams::htcfs { void Initialize(htclow::HtclowManager *htclow_manager); void RegisterHipcServer(); void LoopHipcServer(); }
872
C++
.h
25
32.4
76
0.755952
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,148
ncm_install_task_data.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_task_data.hpp
/* * 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 <stratosphere/ncm/ncm_content_meta.hpp> #include <stratosphere/ncm/ncm_install_progress.hpp> #include <stratosphere/ncm/ncm_system_update_task_apply_info.hpp> namespace ams::ncm { struct InstallContentMeta { std::unique_ptr<char[]> data; size_t size; InstallContentMetaReader GetReader() const { return InstallContentMetaReader(this->data.get(), this->size); } InstallContentMetaWriter GetWriter() const { return InstallContentMetaWriter(this->data.get(), this->size); } }; class InstallTaskDataBase { public: Result Get(InstallContentMeta *out, s32 index); Result Update(const InstallContentMeta &content_meta, s32 index); Result Has(bool *out, u64 id); public: virtual Result GetProgress(InstallProgress *out_progress) = 0; virtual Result GetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo *out_info) = 0; virtual Result SetState(InstallProgressState state) = 0; virtual Result SetLastResult(Result result) = 0; virtual Result SetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo info) = 0; virtual Result Push(const void *data, size_t data_size) = 0; virtual Result Count(s32 *out) = 0; virtual Result Delete(const ContentMetaKey *keys, s32 num_keys) = 0; virtual Result Cleanup() = 0; private: virtual Result GetSize(size_t *out_size, s32 index) = 0; virtual Result Get(s32 index, void *out, size_t out_size) = 0; virtual Result Update(s32 index, const void *data, size_t data_size) = 0; }; class MemoryInstallTaskData : public InstallTaskDataBase { private: struct DataHolder : public InstallContentMeta, public util::IntrusiveListBaseNode<DataHolder>{}; using DataList = util::IntrusiveListBaseTraits<DataHolder>::ListType; private: DataList m_data_list; InstallProgressState m_state; Result m_last_result; SystemUpdateTaskApplyInfo m_system_update_task_apply_info; public: MemoryInstallTaskData() : m_data_list(), m_state(InstallProgressState::NotPrepared), m_last_result(ResultSuccess()), m_system_update_task_apply_info() { /* ... */ }; ~MemoryInstallTaskData() { this->Cleanup(); } public: virtual Result GetProgress(InstallProgress *out_progress) override; virtual Result GetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo *out_info) override; virtual Result SetState(InstallProgressState state) override; virtual Result SetLastResult(Result result) override; virtual Result SetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo info) override; virtual Result Push(const void *data, size_t data_size) override; virtual Result Count(s32 *out) override; virtual Result Delete(const ContentMetaKey *keys, s32 num_keys) override; virtual Result Cleanup() override; private: virtual Result GetSize(size_t *out_size, s32 index) override; virtual Result Get(s32 index, void *out, size_t out_size) override; virtual Result Update(s32 index, const void *data, size_t data_size) override; }; class FileInstallTaskData : public InstallTaskDataBase { private: struct Header { u32 max_entries; u32 count; s64 last_data_offset; Result last_result; InstallProgressState progress_state; SystemUpdateTaskApplyInfo system_update_task_apply_info; }; static_assert(sizeof(Header) == 0x18); struct EntryInfo { s64 offset; s64 size; }; static_assert(sizeof(EntryInfo) == 0x10); private: Header m_header{}; char m_path[64]{}; private: static constexpr Header MakeInitialHeader(s32 max_entries) { return { .max_entries = static_cast<u32>(max_entries), .count = 0, .last_data_offset = GetEntryInfoOffset(max_entries), .last_result = ResultSuccess(), .progress_state = InstallProgressState::NotPrepared, .system_update_task_apply_info = SystemUpdateTaskApplyInfo::Unknown, }; } static constexpr s64 GetEntryInfoOffset(s32 index) { return index * sizeof(EntryInfo) + sizeof(Header); } public: static Result Create(const char *path, s32 max_entries); Result Initialize(const char *path); public: virtual Result GetProgress(InstallProgress *out_progress) override; virtual Result GetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo *out_info) override; virtual Result SetState(InstallProgressState state) override; virtual Result SetLastResult(Result result) override; virtual Result SetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo info) override; virtual Result Push(const void *data, size_t data_size) override; virtual Result Count(s32 *out) override; virtual Result Delete(const ContentMetaKey *keys, s32 num_keys) override; virtual Result Cleanup() override; private: virtual Result GetSize(size_t *out_size, s32 index) override; virtual Result Get(s32 index, void *out, size_t out_size) override; virtual Result Update(s32 index, const void *data, size_t data_size) override; Result GetEntryInfo(EntryInfo *out_entry_info, s32 index); Result Write(const void *data, size_t size, s64 offset); Result Read(void *out, size_t out_size, s64 offset); Result WriteHeader(); }; }
6,878
C++
.h
135
39.962963
177
0.63427
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,149
ncm_content_info_data.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_info_data.hpp
/* * 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 <stratosphere/ncm/ncm_content_info.hpp> #include <stratosphere/ncm/ncm_content_storage.hpp> #include <stratosphere/ncm/ncm_storage_id.hpp> #include <stratosphere/ncm/ncm_content_meta_key.hpp> namespace ams::ncm { struct Digest { u8 data[crypto::Sha256Generator::HashSize]; }; enum class InstallState : u8 { NotPrepared, Prepared, Installed, AlreadyExists, }; struct PackagedContentInfo { Digest digest; ContentInfo info; constexpr const ContentId &GetId() const { return this->info.GetId(); } constexpr fs::ContentAttributes GetContentAttributes() const { return this->info.GetContentAttributes(); } constexpr ContentType GetType() const { return this->info.GetType(); } constexpr u8 GetIdOffset() const { return this->info.GetIdOffset(); } }; struct InstallContentInfo { Digest digest; crypto::Sha256Context context; u8 buffered_data[crypto::Sha256Generator::BlockSize]; u64 buffered_data_size; ContentInfo info; PlaceHolderId placeholder_id; ContentMetaType meta_type; InstallState install_state; bool verify_digest; StorageId storage_id; bool is_temporary; bool is_sha256_calculated; s64 written; constexpr const ContentId &GetId() const { return this->info.GetId(); } constexpr u64 GetSize() const { return this->info.GetSize(); } constexpr fs::ContentAttributes GetContentAttributes() const { return this->info.GetContentAttributes(); } constexpr ContentType GetType() const { return this->info.GetType(); } constexpr u8 GetIdOffset() const { return this->info.GetIdOffset(); } constexpr const PlaceHolderId &GetPlaceHolderId() const { return this->placeholder_id; } constexpr ContentMetaType GetContentMetaType() const { return this->meta_type; } constexpr InstallState GetInstallState() const { return this->install_state; } constexpr StorageId GetStorageId() const { return this->storage_id; } constexpr s64 GetSizeWritten() const { return this->written; } static constexpr InstallContentInfo Make(const ContentInfo &info, ContentMetaType meta_type) { return { .info = info, .meta_type = meta_type, }; } static constexpr InstallContentInfo Make(const PackagedContentInfo &info, ContentMetaType meta_type) { return { .digest = info.digest, .info = info.info, .meta_type = meta_type, .verify_digest = true, }; } }; static_assert(sizeof(InstallContentInfo) == 0xC8); }
3,751
C++
.h
107
26.570093
110
0.621099
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,150
ncm_install_progress.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_install_progress.hpp
/* * 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 namespace ams::ncm { enum class InstallProgressState : u8 { NotPrepared = 0, DataPrepared = 1, Prepared = 2, Downloaded = 3, Committed = 4, Fatal = 5, }; struct InstallProgress { InstallProgressState state; u8 pad[3]; util::TypedStorage<Result> last_result; s64 installed_size; s64 total_size; Result GetLastResult() const { return util::GetReference(last_result); } void SetLastResult(Result result) { *util::GetPointer(last_result) = result; } }; }
1,300
C++
.h
39
27.717949
76
0.647809
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,151
ncm_auto_buffer.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_auto_buffer.hpp
/* * 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> namespace ams::ncm { class AutoBuffer { NON_COPYABLE(AutoBuffer); private: u8 *m_buffer; size_t m_size; public: AutoBuffer() : m_buffer(nullptr), m_size(0) { /* ... */ } ~AutoBuffer() { this->Reset(); } AutoBuffer(AutoBuffer &&rhs) { m_buffer = rhs.m_buffer; m_size = rhs.m_size; rhs.m_buffer = nullptr; rhs.m_size = 0; } AutoBuffer &operator=(AutoBuffer &&rhs) { AutoBuffer(std::move(rhs)).Swap(*this); return *this; } void Swap(AutoBuffer &rhs) { std::swap(m_buffer, rhs.m_buffer); std::swap(m_size, rhs.m_size); } void Reset() { if (m_buffer != nullptr) { delete[] m_buffer; m_buffer = nullptr; m_size = 0; } } u8 *Get() const { return m_buffer; } size_t GetSize() const { return m_size; } Result Initialize(size_t size) { /* Check that we're not already initialized. */ AMS_ABORT_UNLESS(m_buffer == nullptr); /* Allocate a buffer. */ m_buffer = new (std::nothrow) u8[size]; R_UNLESS(m_buffer != nullptr, ncm::ResultAllocationFailed()); m_size = size; R_SUCCEED(); } Result Initialize(const void *buf, size_t size) { /* Create a new buffer of the right size. */ R_TRY(this->Initialize(size)); /* Copy the input data in. */ std::memcpy(m_buffer, buf, size); R_SUCCEED(); } }; }
2,610
C++
.h
73
24.164384
77
0.507137
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,152
ncm_storage_utils.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_storage_utils.hpp
/* * 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 <stratosphere/ncm/ncm_storage_id.hpp> #include <stratosphere/ncm/ncm_content_meta_id.hpp> namespace ams::ncm { class StorageList { public: static constexpr s32 MaxCount = 10; private: StorageId m_ids[MaxCount]; s32 m_count; public: constexpr StorageList() : m_ids(), m_count() { /* ... */ } void Push(StorageId storage_id) { AMS_ABORT_UNLESS(m_count < MaxCount); for (s32 i = 0; i < MaxCount; i++) { if (m_ids[i] == storage_id) { return; } } m_ids[m_count++] = storage_id; } s32 Count() const { return m_count; } StorageId operator[](s32 i) const { AMS_ABORT_UNLESS(i < m_count); return m_ids[i]; } }; constexpr StorageList GetStorageList(StorageId storage_id) { StorageList list; switch (storage_id) { case StorageId::BuiltInSystem: case StorageId::BuiltInUser: case StorageId::SdCard: list.Push(storage_id); break; case StorageId::Any: list.Push(StorageId::SdCard); list.Push(StorageId::BuiltInUser); break; AMS_UNREACHABLE_DEFAULT_CASE(); } return list; } Result SelectDownloadableStorage(StorageId *out_storage_id, StorageId storage_id, s64 required_size); Result SelectPatchStorage(StorageId *out_storage_id, StorageId storage_id, PatchId patch_id); const char *GetStorageIdString(StorageId storage_id); const char *GetStorageIdStringForPlayReport(StorageId storage_id); }
2,470
C++
.h
65
28.553846
105
0.599833
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,153
ncm_package_system_downgrade_task.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_package_system_downgrade_task.hpp
/* * 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 <stratosphere/ncm/ncm_package_system_update_task.hpp> namespace ams::ncm { class PackageSystemDowngradeTask : public PackageSystemUpdateTask { public: Result Commit(); protected: virtual Result PrepareContentMetaIfLatest(const ContentMetaKey &key) override; private: Result PreCommit(); }; }
1,020
C++
.h
27
33.62963
90
0.730303
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,154
ncm_package_install_task.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_package_install_task.hpp
/* * 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 <stratosphere/ncm/ncm_package_install_task_base.hpp> namespace ams::ncm { class PackageInstallTask : public PackageInstallTaskBase { private: MemoryInstallTaskData m_data{}; public: Result Initialize(const char *package_root, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket); protected: bool IsContentMetaContentName(const char *name); virtual Result PrepareInstallContentMetaData() override; private: virtual Result GetInstallContentMetaInfo(InstallContentMetaInfo *out_info, const ContentMetaKey &key) override; }; }
1,306
C++
.h
30
38.633333
132
0.732914
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,155
ncm_memory_report.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_memory_report.hpp
/* * 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/os.hpp> #include <stratosphere/lmem/lmem_common.hpp> namespace ams::ncm { struct MemoryResourceState { size_t peak_total_alloc_size; size_t peak_alloc_size; size_t allocatable_size; size_t total_free_size; }; static_assert(sizeof(MemoryResourceState) == 0x20); struct MemoryReport { MemoryResourceState system_content_meta_resource_state; MemoryResourceState sd_and_user_content_meta_resource_state; MemoryResourceState gamecard_content_meta_resource_state; MemoryResourceState heap_resource_state; }; static_assert(sizeof(MemoryReport) == 0x80); class HeapState { private: os::SdkMutex m_mutex; lmem::HeapHandle m_heap_handle; size_t m_total_alloc_size; size_t m_peak_total_alloc_size; size_t m_peak_alloc_size; public: constexpr HeapState() : m_mutex(), m_heap_handle(nullptr), m_total_alloc_size(0), m_peak_total_alloc_size(0), m_peak_alloc_size(0) { /* ... */ } void Initialize(lmem::HeapHandle heap_handle); void Allocate(size_t size); void Free(size_t size); void GetMemoryResourceState(MemoryResourceState *out); }; HeapState &GetHeapState(); }
1,991
C++
.h
50
33.64
156
0.685818
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,156
ncm_content_id_utils.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_id_utils.hpp
/* * 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 <stratosphere/fs/fs_rights_id.hpp> #include <stratosphere/ncm/ncm_content_id.hpp> #include <stratosphere/ncm/ncm_content_info_data.hpp> namespace ams::ncm { constexpr inline size_t ContentIdStringLength = 2 * sizeof(ContentId); constexpr inline size_t RightsIdStringLength = 2 * sizeof(fs::RightsId); constexpr inline size_t TicketFileStringLength = RightsIdStringLength + 4; constexpr inline size_t CertFileStringLength = RightsIdStringLength + 5; struct ContentIdString { char data[ContentIdStringLength + 1]; }; ContentIdString GetContentIdString(ContentId id); void GetStringFromContentId(char *dst, size_t dst_size, ContentId id); void GetStringFromRightsId(char *dst, size_t dst_size, fs::RightsId id); void GetTicketFileStringFromRightsId(char *dst, size_t dst_size, fs::RightsId id); void GetCertificateFileStringFromRightsId(char *dst, size_t dst_size, fs::RightsId id); util::optional<ContentId> GetContentIdFromString(const char *str, size_t len); }
1,687
C++
.h
34
46.323529
91
0.761702
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,157
ncm_path.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_path.hpp
/* * 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_directory.hpp> #include <stratosphere/sf/sf_buffer_tags.hpp> namespace ams::ncm { struct alignas(4) Path : ams::sf::LargeData { char str[fs::EntryNameLengthMax]; static constexpr Path Encode(const char *p) { Path path = {}; /* Copy C string to path, terminating when a null byte is found. */ for (size_t i = 0; i < sizeof(path) - 1; i++) { path.str[i] = p[i]; if (p[i] == '\x00') { break; } } return path; } }; }
1,277
C++
.h
35
30.4
79
0.635703
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,158
ncm_content_meta_utils.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_utils.hpp
/* * 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 <stratosphere/ncm/ncm_auto_buffer.hpp> #include <stratosphere/ncm/ncm_storage_id.hpp> #include <stratosphere/ncm/ncm_content_storage.hpp> #include <stratosphere/ncm/ncm_content_meta_key.hpp> #include <stratosphere/ncm/ncm_content_meta_database.hpp> #include <stratosphere/ncm/ncm_firmware_variation.hpp> namespace ams::ncm { using MountContentMetaFunction = Result (*)(const char *mount_name, const char *path, fs::ContentAttributes attr); bool IsContentMetaFileName(const char *name); Result ReadContentMetaPathAlongWithExtendedDataAndDigest(AutoBuffer *out, const char *path, fs::ContentAttributes attr); Result ReadContentMetaPathAlongWithExtendedDataAndDigestSuppressingFsAbort(AutoBuffer *out, const char *path, fs::ContentAttributes attr); Result ReadContentMetaPathWithoutExtendedDataOrDigest(AutoBuffer *out, const char *path, fs::ContentAttributes attr); Result ReadContentMetaPathWithoutExtendedDataOrDigestSuppressingFsAbort(AutoBuffer *out, const char *path, fs::ContentAttributes attr); using ReadContentMetaPathFunction = Result (*)(AutoBuffer *out, const char *path, fs::ContentAttributes attr); Result TryReadContentMetaPath(fs::ContentAttributes *out_attr, AutoBuffer *out, const char *path, ReadContentMetaPathFunction func); Result TryReadContentMetaPath(AutoBuffer *out, const char *path, ReadContentMetaPathFunction func); Result ReadVariationContentMetaInfoList(s32 *out_count, std::unique_ptr<ContentMetaInfo[]> *out_meta_infos, const Path &path, fs::ContentAttributes attr, FirmwareVariationId firmware_variation_id); void SetMountContentMetaFunction(MountContentMetaFunction func); }
2,320
C++
.h
35
63.342857
201
0.800879
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,159
ncm_data_id.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_data_id.hpp
/* * 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> namespace ams::ncm { struct DataId { u64 value; static const DataId Invalid; constexpr inline auto operator<=>(const DataId &) const = default; }; inline constexpr const DataId DataId::Invalid = {}; inline constexpr const DataId InvalidDataId = DataId::Invalid; }
981
C++
.h
26
34.423077
76
0.733404
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,160
ncm_api.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_api.hpp
/* * 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 <stratosphere/ncm/ncm_content_meta_database.hpp> #include <stratosphere/ncm/ncm_content_storage.hpp> #include <stratosphere/ncm/ncm_i_content_manager.hpp> #include <stratosphere/fs/fs_content_storage_id.hpp> namespace ams::ncm { /* Management. */ void Initialize(); void Finalize(); void InitializeWithObject(sf::SharedPointer<IContentManager> manager_object); /* Service API. */ Result CreateContentStorage(StorageId storage_id); Result CreateContentMetaDatabase(StorageId storage_id); Result VerifyContentStorage(StorageId storage_id); Result VerifyContentMetaDatabase(StorageId storage_id); Result OpenContentStorage(ContentStorage *out, StorageId storage_id); Result OpenContentMetaDatabase(ContentMetaDatabase *out, StorageId storage_id); Result CleanupContentMetaDatabase(StorageId storage_id); Result ActivateContentStorage(StorageId storage_id); Result InactivateContentStorage(StorageId storage_id); Result ActivateContentMetaDatabase(StorageId storage_id); Result InactivateContentMetaDatabase(StorageId storage_id); Result InvalidateRightsIdCache(); Result ActivateFsContentStorage(fs::ContentStorageId fs_content_storage_id); /* Deprecated API. */ Result CloseContentStorageForcibly(StorageId storage_id); Result CloseContentMetaDatabaseForcibly(StorageId storage_id); }
2,037
C++
.h
43
43.790698
83
0.786471
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,161
ncm_storage_id.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_storage_id.hpp
/* * 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> namespace ams::ncm { enum class StorageId : u8 { None = 0, Host = 1, GameCard = 2, BuiltInSystem = 3, BuiltInUser = 4, SdCard = 5, Any = 6, /* Aliases. */ Card = GameCard, BuildInSystem = BuiltInSystem, BuildInUser = BuiltInUser, }; constexpr inline bool IsUniqueStorage(StorageId id) { return id != StorageId::None && id != StorageId::Any; } constexpr inline bool IsInstallableStorage(StorageId id) { return id == StorageId::BuiltInSystem || id == StorageId::BuiltInUser || id == StorageId::SdCard || id == StorageId::Any; } }
1,406
C++
.h
38
32.105263
129
0.636564
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,162
ncm_integrated_list.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_integrated_list.hpp
/* * 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/sf_shared_object.hpp> namespace ams::ncm { template<typename T, size_t N> class IntegratedList { static_assert(N <= std::numeric_limits<u8>::max()); public: struct ListData { sf::SharedPointer<T> interface; u8 id; }; private: size_t m_count; sf::SharedPointer<T> m_interfaces[N]; u8 m_ids[N]; public: IntegratedList() : m_count(0), m_interfaces(), m_ids() { /* ... */ } void Add(ListData &data) { /* Find place to insert into the list. */ const size_t pos = std::distance(std::begin(m_ids), std::lower_bound(std::begin(m_ids), std::end(m_ids), data.id)); /* If we need to, move stuff to make space. */ if (m_ids[pos] > data.id) { AMS_ABORT_UNLESS(m_count < N); for (size_t i = m_count; i > pos; --i) { m_ids[i] = std::move(m_ids[i - 1]); m_interfaces[i] = std::move(m_interfaces[i - 1]); } /* If we're inserting somewhere in the middle, increment count. */ m_count++; } else if (m_ids[pos] < data.id) { /* If we're inserting at the end, increment count. */ AMS_ABORT_UNLESS(m_count < N); m_count++; } /* Set at position. */ m_interfaces[pos] = data.interface; m_ids[pos] = data.id; } ListData Get(size_t idx) { AMS_ABORT_UNLESS(idx < m_count); return { m_interfaces[idx], m_ids[idx] }; } Result TryEach(auto callback) { Result result = ResultSuccess(); for (size_t i = 0; i < m_count; ++i) { result = callback(this->Get(i)); if (R_SUCCEEDED(result)) { break; } } R_RETURN(result); } Result ForAll(auto callback) { for (size_t i = 0; i < m_count; ++i) { R_TRY(callback(this->Get(i))); } R_SUCCEED(); } size_t GetCount() const { return m_count; } }; }
3,131
C++
.h
77
28.181818
131
0.498355
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,163
ncm_content_meta_key.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_key.hpp
/* * 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/ncm/ncm_content_meta_id.hpp> #include <stratosphere/ncm/ncm_content_meta_type.hpp> #include <stratosphere/ncm/ncm_system_content_meta_id.hpp> namespace ams::ncm { enum class ContentInstallType : u8 { Full = 0, FragmentOnly = 1, Unknown = 7, }; struct ContentMetaKey { u64 id; u32 version; ContentMetaType type; ContentInstallType install_type; u8 padding[2]; bool operator<(const ContentMetaKey &rhs) const { return std::tie(this->id, this->version, this->type, this->install_type) < std::tie(rhs.id, rhs.version, rhs.type, rhs.install_type); } constexpr bool operator==(const ContentMetaKey &rhs) const { return std::tie(this->id, this->version, this->type, this->install_type) == std::tie(rhs.id, rhs.version, rhs.type, rhs.install_type); } constexpr bool operator!=(const ContentMetaKey &rhs) const { return !(*this == rhs); } static constexpr ContentMetaKey MakeUnknownType(u64 id, u32 version) { return { .id = id, .version = version, .type = ContentMetaType::Unknown }; } static constexpr ContentMetaKey Make(u64 id, u32 version, ContentMetaType type) { return { .id = id, .version = version, .type = type }; } static constexpr ContentMetaKey Make(u64 id, u32 version, ContentMetaType type, ContentInstallType install_type) { return { .id = id, .version = version, .type = type, .install_type = install_type }; } static constexpr ContentMetaKey Make(SystemProgramId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::SystemProgram }; } static constexpr ContentMetaKey Make(SystemDataId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::SystemData }; } static constexpr ContentMetaKey Make(SystemUpdateId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::SystemUpdate }; } static constexpr ContentMetaKey Make(ApplicationId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::Application }; } static constexpr ContentMetaKey Make(PatchId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::Patch }; } static constexpr ContentMetaKey Make(PatchId id, u32 version, ContentInstallType install_type) { return { .id = id.value, .version = version, .type = ContentMetaType::Patch, .install_type = install_type }; } static constexpr ContentMetaKey Make(DeltaId id, u32 version) { return { .id = id.value, .version = version, .type = ContentMetaType::Delta }; } }; static_assert(sizeof(ContentMetaKey) == 0x10); struct ApplicationContentMetaKey { ContentMetaKey key; ncm::ApplicationId application_id; }; static_assert(sizeof(ApplicationContentMetaKey) == 0x18); struct StorageContentMetaKey { ContentMetaKey key; StorageId storage_id; u8 reserved[7]; constexpr bool operator==(StorageContentMetaKey &rhs) const { return this->key == rhs.key && this->storage_id == rhs.storage_id; } constexpr bool operator<(StorageContentMetaKey &rhs) const { return this->key == rhs.key ? this->storage_id < rhs.storage_id : this->key < rhs.key; } }; static_assert(sizeof(StorageContentMetaKey) == 0x18); }
4,386
C++
.h
91
40.549451
146
0.655197
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,164
ncm_bounded_map.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_bounded_map.hpp
/* * 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> namespace ams::ncm { template<class Key, class Value, size_t N> using BoundedMap = util::BoundedMap<Key, Value, N>; }
800
C++
.h
21
35.904762
76
0.748711
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,165
ncm_content_management_utils.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_management_utils.hpp
/* * 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 <stratosphere/ncm/ncm_content_meta.hpp> #include <stratosphere/ncm/ncm_content_meta_database.hpp> #include <stratosphere/ncm/ncm_content_storage.hpp> namespace ams::ncm { class ContentMetaDatabaseBuilder { private: ContentMetaDatabase *m_db; private: Result BuildFromPackageContentMeta(void *buf, size_t size, const ContentInfo &meta_info); public: explicit ContentMetaDatabaseBuilder(ContentMetaDatabase *d) : m_db(d) { /* ... */ } Result BuildFromStorage(ContentStorage *storage); Result BuildFromPackage(const char *package_root_path); Result Cleanup(); }; Result ListApplicationPackage(s32 *out_count, ApplicationId *out_ids, s32 max_out_ids, const char *package_root_path); }
1,452
C++
.h
33
39.121212
122
0.723284
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,166
ncm_program_location.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_program_location.hpp
/* * 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 <stratosphere/ncm/ncm_program_id.hpp> #include <stratosphere/ncm/ncm_storage_id.hpp> namespace ams::ncm { struct ProgramLocation { ProgramId program_id; u8 storage_id; static constexpr ProgramLocation Make(ProgramId program_id, StorageId storage_id) { return { .program_id = program_id, .storage_id = static_cast<u8>(storage_id), }; } }; static_assert(sizeof(ProgramLocation) == 0x10 && util::is_pod<ProgramLocation>::value); #if defined(ATMOSPHERE_OS_HORIZON) static_assert(sizeof(ProgramLocation) == sizeof(::NcmProgramLocation) && alignof(ProgramLocation) == alignof(::NcmProgramLocation), "ProgramLocation Libnx Compatibility"); #endif }
1,372
C++
.h
31
40.451613
175
0.732036
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,167
ncm_mapped_memory.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_mapped_memory.hpp
/* * 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 <stratosphere.hpp> namespace ams::ncm { struct MappedMemory { u64 id; size_t offset; u8 *buffer; size_t buffer_size; bool IsIncluded(size_t o, size_t sz) const { return this->offset <= o && sz <= this->buffer_size && (o + sz) <= (this->offset + this->buffer_size); } u8 *GetBuffer(size_t o, size_t sz) const { AMS_ASSERT(this->buffer != nullptr); AMS_ASSERT(this->IsIncluded(o, sz)); AMS_UNUSED(sz); return this->buffer + (o - this->offset); } }; static_assert(util::is_pod<MappedMemory>::value); class IMapper { public: virtual ~IMapper() { /* ... */ } public: virtual Result GetMappedMemory(MappedMemory *out, size_t offset, size_t size) = 0; virtual Result MarkUsing(u64 id) = 0; virtual Result UnmarkUsing(u64 id) = 0; virtual Result MarkDirty(u64 id) = 0; protected: virtual Result MapImpl(MappedMemory *out, Span<u8> data, size_t offset, size_t size) = 0; virtual Result UnmapImpl(MappedMemory *mem) = 0; virtual bool IsAccessibleSizeUpdatable() = 0; }; }
1,889
C++
.h
48
32.4375
114
0.632153
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
8,168
ncm_firmware_variation.hpp
Atmosphere-NX_Atmosphere/libraries/libstratosphere/include/stratosphere/ncm/ncm_firmware_variation.hpp
/* * 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> namespace ams::ncm { struct FirmwareVariationInfo { bool refer_to_base; u8 _0x1[3]; u32 content_meta_count; u8 reserved[0x18]; }; struct FirmwareVariationId { u32 value; }; constexpr inline bool operator==(const FirmwareVariationId &lhs, const FirmwareVariationId &rhs) { return lhs.value == rhs.value; } constexpr inline bool operator!=(const FirmwareVariationId &lhs, const FirmwareVariationId &rhs) { return lhs.value != rhs.value; } }
1,209
C++
.h
34
31.382353
102
0.710864
Atmosphere-NX/Atmosphere
14,324
1,207
54
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false