mirror of
https://github.com/devkitPro/wut.git
synced 2026-04-26 10:01:22 -05:00
Compare commits
No commits in common. "master" and "v1.6.0" have entirely different histories.
|
|
@ -1,90 +0,0 @@
|
|||
---
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -3
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments
|
||||
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Always
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlwaysBreakAfterReturnType: All
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
AttributeMacros:
|
||||
- asm
|
||||
- WUT_FORMAT_PRINTF
|
||||
BinPackParameters: false
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterExternBlock: false
|
||||
AfterStruct: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 0
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 3
|
||||
ContinuationIndentWidth: 3
|
||||
FixNamespaceComments: true
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
# Include wut headers first
|
||||
- Regex: '^[<|"]wut'
|
||||
Priority: 1
|
||||
- Regex: '^<'
|
||||
Priority: 2
|
||||
- Regex: '^"'
|
||||
Priority: 3
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 3
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: BinPack
|
||||
PointerAlignment: Right
|
||||
ReflowComments: false
|
||||
SeparateDefinitionBlocks: Leave
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
TypenameMacros:
|
||||
- BOOL
|
||||
- RPLWRAP
|
||||
UseTab: Never
|
||||
197
.github/workflows/clang-format-diff.py
vendored
197
.github/workflows/clang-format-diff.py
vendored
|
|
@ -1,197 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# ===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
|
||||
#
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
# ===------------------------------------------------------------------------===#
|
||||
|
||||
"""
|
||||
This script reads input from a unified diff and reformats all the changed
|
||||
lines. This is useful to reformat all the lines touched by a specific patch.
|
||||
Example usage for git/svn users:
|
||||
|
||||
git diff -U0 --no-color --relative HEAD^ | {clang_format_diff} -p1 -i
|
||||
svn diff --diff-cmd=diff -x-U0 | {clang_format_diff} -i
|
||||
|
||||
It should be noted that the filename contained in the diff is used unmodified
|
||||
to determine the source file to update. Users calling this script directly
|
||||
should be careful to ensure that the path in the diff is correct relative to the
|
||||
current working directory.
|
||||
"""
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import argparse
|
||||
import difflib
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
from io import StringIO
|
||||
else:
|
||||
from io import BytesIO as StringIO
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=__doc__.format(clang_format_diff="%(prog)s"),
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
parser.add_argument(
|
||||
"-i",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="apply edits to files instead of displaying a diff",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-p",
|
||||
metavar="NUM",
|
||||
default=0,
|
||||
help="strip the smallest prefix containing P slashes",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-regex",
|
||||
metavar="PATTERN",
|
||||
default=None,
|
||||
help="custom pattern selecting file paths to reformat "
|
||||
"(case sensitive, overrides -iregex)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-iregex",
|
||||
metavar="PATTERN",
|
||||
default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp"
|
||||
r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)",
|
||||
help="custom pattern selecting file paths to reformat "
|
||||
"(case insensitive, overridden by -regex)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-sort-includes",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="let clang-format sort include blocks",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-v",
|
||||
"--verbose",
|
||||
action="store_true",
|
||||
help="be more verbose, ineffective without -i",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-style",
|
||||
help="formatting style to apply (LLVM, GNU, Google, Chromium, "
|
||||
"Microsoft, Mozilla, WebKit)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-fallback-style",
|
||||
help="The name of the predefined style used as a"
|
||||
"fallback in case clang-format is invoked with"
|
||||
"-style=file, but can not find the .clang-format"
|
||||
"file to use.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-binary",
|
||||
default="clang-format",
|
||||
help="location of binary to use for clang-format",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Extract changed lines for each file.
|
||||
filename = None
|
||||
lines_by_file = {}
|
||||
for line in sys.stdin:
|
||||
match = re.search(r"^\+\+\+\ (.*?/){%s}(\S*)" % args.p, line)
|
||||
if match:
|
||||
filename = match.group(2)
|
||||
if filename is None:
|
||||
continue
|
||||
|
||||
if args.regex is not None:
|
||||
if not re.match("^%s$" % args.regex, filename):
|
||||
continue
|
||||
else:
|
||||
if not re.match("^%s$" % args.iregex, filename, re.IGNORECASE):
|
||||
continue
|
||||
|
||||
match = re.search(r"^@@.*\+(\d+)(?:,(\d+))?", line)
|
||||
if match:
|
||||
start_line = int(match.group(1))
|
||||
line_count = 1
|
||||
if match.group(2):
|
||||
line_count = int(match.group(2))
|
||||
# The input is something like
|
||||
#
|
||||
# @@ -1, +0,0 @@
|
||||
#
|
||||
# which means no lines were added.
|
||||
if line_count == 0:
|
||||
continue
|
||||
# Also format lines range if line_count is 0 in case of deleting
|
||||
# surrounding statements.
|
||||
end_line = start_line
|
||||
if line_count != 0:
|
||||
end_line += line_count - 1
|
||||
lines_by_file.setdefault(filename, []).extend(
|
||||
["--lines", str(start_line) + ":" + str(end_line)]
|
||||
)
|
||||
|
||||
# Reformat files containing changes in place.
|
||||
has_diff = False
|
||||
for filename, lines in lines_by_file.items():
|
||||
if args.i and args.verbose:
|
||||
print("Formatting {}".format(filename))
|
||||
command = [args.binary, filename]
|
||||
if args.i:
|
||||
command.append("-i")
|
||||
if args.sort_includes:
|
||||
command.append("--sort-includes")
|
||||
command.extend(lines)
|
||||
if args.style:
|
||||
command.extend(["--style", args.style])
|
||||
if args.fallback_style:
|
||||
command.extend(["--fallback-style", args.fallback_style])
|
||||
|
||||
try:
|
||||
p = subprocess.Popen(
|
||||
command,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=None,
|
||||
stdin=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
)
|
||||
except OSError as e:
|
||||
# Give the user more context when clang-format isn't
|
||||
# found/isn't executable, etc.
|
||||
raise RuntimeError(
|
||||
'Failed to run "%s" - %s"' % (" ".join(command), e.strerror)
|
||||
)
|
||||
|
||||
stdout, _stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
return p.returncode
|
||||
|
||||
if not args.i:
|
||||
with open(filename) as f:
|
||||
code = f.readlines()
|
||||
formatted_code = StringIO(stdout).readlines()
|
||||
diff = difflib.unified_diff(
|
||||
code,
|
||||
formatted_code,
|
||||
filename,
|
||||
filename,
|
||||
"(before formatting)",
|
||||
"(after formatting)",
|
||||
)
|
||||
diff_string = "".join(diff)
|
||||
if len(diff_string) > 0:
|
||||
has_diff = True
|
||||
sys.stdout.write(diff_string)
|
||||
|
||||
if has_diff:
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
47
.github/workflows/format-check.yml
vendored
47
.github/workflows/format-check.yml
vendored
|
|
@ -1,47 +0,0 @@
|
|||
name: Formatting check
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
formatting-check:
|
||||
name: Formatting check
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# To get a diff from the PR we need to fetch 2 commits.
|
||||
# The checkout action will create a merge commit as {{ github.sha }}.
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -yqq clang-format-18
|
||||
|
||||
- name: Format check
|
||||
id: format-check
|
||||
run: |
|
||||
git diff -U0 --no-color ${{ github.sha }}^ -- '*.cpp' '*.c' '*.h' '*.hpp' |
|
||||
./.github/workflows/clang-format-diff.py -p1 -binary clang-format-18 > clang-format.patch || true
|
||||
|
||||
# Check if patch is not empty
|
||||
if [ -s clang-format.patch ]; then
|
||||
echo "###############################################################"
|
||||
echo "# Format checks failed!"
|
||||
echo "# A patch has been uploaded as an artifact and is shown below."
|
||||
echo "###############################################################"
|
||||
|
||||
# Show patch
|
||||
cat clang-format.patch
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload format fixes patch
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() && steps.format-check.outcome == 'failure' }}
|
||||
with:
|
||||
name: clang-format.patch
|
||||
path: clang-format.patch
|
||||
if-no-files-found: ignore
|
||||
58
CHANGELOG.md
58
CHANGELOG.md
|
|
@ -1,61 +1,3 @@
|
|||
#### wut 1.7.0
|
||||
|
||||
###### New features / improvements
|
||||
* nn/dlp: Add initial headers by @DaniElectra in https://github.com/devkitPro/wut/pull/389
|
||||
* nn/dlp: Fix Initialize functions on ServerPrivate by @DaniElectra in https://github.com/devkitPro/wut/pull/390
|
||||
* nn_ccr: Add `CCRSysSetCurrentLCDMode` and `CCRSysGetCurrentLCDMode` by @Maschell in https://github.com/devkitPro/wut/pull/393
|
||||
* nsysccr/cdc: Add CCRCDCSysGetInfo by @GaryOderNichts in https://github.com/devkitPro/wut/pull/398* nn_acp: Add ACPRemoveSaveDir* by @Andrew1Hawes in https://github.com/devkitPro/wut/pull/394
|
||||
* nn_acp: Add various save related functions by @Maschell in https://github.com/devkitPro/wut/pull/396
|
||||
* Add HDMI CEC functions by @GaryOderNichts in https://github.com/devkitPro/wut/pull/397
|
||||
* Added `OSSetPerformanceMonitor()`. by @dkosmari in https://github.com/devkitPro/wut/pull/400
|
||||
|
||||
###### Fixes and corrections
|
||||
* coreinit/screen: Swap row and column parameters in OSScreenPutFontEx by @capitalistspz in https://github.com/devkitPro/wut/pull/391
|
||||
* camera: corrections and comments by @capitalistspz in https://github.com/devkitPro/wut/pull/392
|
||||
* nn_idb: Fix copy headers, fix nn::idb::IDBReader::Initialize by @Maschell in https://github.com/devkitPro/wut/pull/395
|
||||
* camera: event argument correction by @capitalistspz in https://github.com/devkitPro/wut/pull/399
|
||||
|
||||
## New Contributors
|
||||
* @dkosmari made their first contribution in https://github.com/devkitPro/wut/pull/400
|
||||
|
||||
#### wut 1.6.0
|
||||
|
||||
###### New features / improvements
|
||||
* nn_idb: Implement icon database reading by @Maschell in https://github.com/devkitPro/wut/pull/357
|
||||
* nn_idb: move include into libraries directory by @Maschell in https://github.com/devkitPro/wut/pull/365
|
||||
* wut_types: Implement more operators for `WUT_ENUM_BITMASK_TYPE` by @GaryOderNichts in https://github.com/devkitPro/wut/pull/369
|
||||
* whb/gfx: Use 4:3 TV buffers on 4:3 TVs by @jranderia3 in https://github.com/devkitPro/wut/pull/383
|
||||
|
||||
###### Breaking changes
|
||||
* padscore: rename `nunchuck` -> `nunchuk` in https://github.com/devkitPro/wut/pull/348
|
||||
|
||||
###### CafeOS related changes
|
||||
* More nn_ccr and nsysccr struct/enum fixes by @Maschell in https://github.com/devkitPro/wut/pull/361
|
||||
* Add functions to control the Eco mode by @Maschell in https://github.com/devkitPro/wut/pull/363
|
||||
* nn_sl: Fix wrong parameters for nn::sl::LaunchInfoDatabase::Unregister by @Maschell in https://github.com/devkitPro/wut/pull/362
|
||||
* sysapp: Add all possible "jumpTo" targets for SysAppSettingsArgs by @Maschell in https://github.com/devkitPro/wut/pull/366
|
||||
* nn_ccr: Add CCRSysSetInitBootFlag and CCRSysInitializeSettings, add CCRCDCUicConfigIdEnum values by @Maschell in https://github.com/devkitPro/wut/pull/364
|
||||
* padscore: Add more functions and types in https://github.com/devkitPro/wut/pull/348
|
||||
* nsysccr/cdc: Add language and ext update functions by @GaryOderNichts in https://github.com/devkitPro/wut/pull/368
|
||||
* coreinit: Add __OSPhysicalToEffectiveCached and __OSPhysicalToEffectiveUncached by @Maschell in https://github.com/devkitPro/wut/pull/367
|
||||
* coreinit: Add "SavedFrame" related functions by @Maschell in https://github.com/devkitPro/wut/pull/374
|
||||
* nn_acp: Add ACPGetTitleMetaDir and ACPGetTitleMetaDirByTitleListType by @Maschell in https://github.com/devkitPro/wut/pull/375
|
||||
* coreinit: Add __FSAShimDecodeIosErrorToFsaStatus by @Maschell in https://github.com/devkitPro/wut/pull/378
|
||||
* coreinit: add stopwatch.h and stopwatchatomic.h by @capitalistspz in https://github.com/devkitPro/wut/pull/370
|
||||
* nn_ccr: Add CCRSysCaffeineBootCheckAbort; nsysccr: fix quick start menu value in CCRCDCDrcStateEnum by @Maschell in https://github.com/devkitPro/wut/pull/372
|
||||
* gx2: add GX2GetMainCoreId by @Maschell in https://github.com/devkitPro/wut/pull/380
|
||||
* vpad: Add VPADGetButtonProcMode by @Maschell in https://github.com/devkitPro/wut/pull/376
|
||||
* sndcore2: Update AXTransitionAudioBuffer struct by @Maschell in https://github.com/devkitPro/wut/pull/373
|
||||
* coreinit: Fix wrong/duplicate OSGetCodegenVirtAddrRange declaration, formatting by @Maschell in https://github.com/devkitPro/wut/pull/371
|
||||
* avm: Add some missing DRC functions by @Maschell in https://github.com/devkitPro/wut/pull/379
|
||||
* nsysccr: Add CCRCDCRegister*AttachCallback functions by @Maschell in https://github.com/devkitPro/wut/pull/377
|
||||
* gx2: Add GX2AllocateTilingApertureEx and GX2FreeTilingAperture by @GaryOderNichts in https://github.com/devkitPro/wut/pull/381
|
||||
* nsysnet/netconfig: Add SOGetProxyConfig by @GaryOderNichts in https://github.com/devkitPro/wut/pull/382
|
||||
* gx2: Add GX2GetSystemTVAspectRatio by @GaryOderNichts in https://github.com/devkitPro/wut/pull/384
|
||||
* nsysccr/cdc: Update CCRCDCDrcStateEnum with test menu names by @GaryOderNichts in https://github.com/devkitPro/wut/pull/386
|
||||
* More DRX definitions by @team-orangeBlue in https://github.com/devkitPro/wut/pull/385
|
||||
* nn/uds: Add initial headers by @DaniElectra in https://github.com/devkitPro/wut/pull/387
|
||||
|
||||
#### wut 1.5.0
|
||||
|
||||
###### New features / improvements
|
||||
|
|
|
|||
27
Makefile
27
Makefile
|
|
@ -2,6 +2,10 @@
|
|||
TOPDIR ?= $(CURDIR)
|
||||
include $(TOPDIR)/share/wut_rules
|
||||
|
||||
export WUT_MAJOR := 1
|
||||
export WUT_MINOR := 4
|
||||
export WUT_PATCH := 0
|
||||
|
||||
VERSION := $(WUT_MAJOR).$(WUT_MINOR).$(WUT_PATCH)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
|
@ -16,6 +20,7 @@ TARGET := wut
|
|||
SOURCES := cafe \
|
||||
libraries/wutcrt \
|
||||
libraries/wutnewlib \
|
||||
libraries/wutstdc++ \
|
||||
libraries/wutmalloc \
|
||||
libraries/wutdevoptab \
|
||||
libraries/wutsocket \
|
||||
|
|
@ -100,13 +105,21 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|||
#---------------------------------------------------------------------------------
|
||||
all: lib/libwut.a lib/libwutd.a
|
||||
|
||||
install: all
|
||||
@mkdir -p $(DESTDIR)$(DEVKITPRO)/wut
|
||||
@cp -frv include lib share $(DESTDIR)$(DEVKITPRO)/wut
|
||||
@cp -frv libraries/libwhb/include $(DESTDIR)$(DEVKITPRO)/wut
|
||||
@cp -frv libraries/nn_idb/include $(DESTDIR)$(DEVKITPRO)/wut
|
||||
@cp -frv libraries/libgfd/include $(DESTDIR)$(DEVKITPRO)/wut
|
||||
@cp -frv libraries/libirc/include $(DESTDIR)$(DEVKITPRO)/wut
|
||||
dist-bin: all
|
||||
@tar --exclude=*~ -cjf wut-$(VERSION).tar.bz2 \
|
||||
include lib share \
|
||||
-C libraries/libwhb include \
|
||||
-C ../libgfd include \
|
||||
-C ../libirc include
|
||||
|
||||
dist-src:
|
||||
@tar --exclude=*~ -cjf wut-src-$(VERSION).tar.bz2 cafe include libraries share Makefile
|
||||
|
||||
dist: dist-src dist-bin
|
||||
|
||||
install: dist-bin
|
||||
mkdir -p $(DESTDIR)$(DEVKITPRO)/wut
|
||||
bzip2 -cd wut-$(VERSION).tar.bz2 | tar -xf - -C $(DESTDIR)$(DEVKITPRO)/wut
|
||||
|
||||
lib:
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ ACPGetTitleMetaXmlByTitleListType
|
|||
ACPGetTitleSaveDir
|
||||
ACPGetTitleSaveDirEx
|
||||
ACPGetTitleSaveDirExWithoutMetaCheck
|
||||
ACPGetTitleSaveMetaXml
|
||||
ACPGetWoodTin
|
||||
ACPImportSaveDataFromBuffer
|
||||
ACPImportSaveDirOfAccountWithEncryption
|
||||
|
|
@ -160,4 +161,3 @@ WaitExternalStorage__Q2_2nn3acpFv
|
|||
|
||||
:TEXT_WRAP
|
||||
ACPGetTitleMetaXml
|
||||
ACPGetTitleSaveMetaXml
|
||||
|
|
|
|||
|
|
@ -1,92 +0,0 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <tve/cec.h>
|
||||
|
||||
/**
|
||||
* \defgroup avm_cec AVM HDMI CEC
|
||||
* \ingroup avm
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initializes CEC.
|
||||
*
|
||||
* \return
|
||||
* \c TRUE on success.
|
||||
*/
|
||||
BOOL
|
||||
AVMCECInit(void);
|
||||
|
||||
/**
|
||||
* Enable CEC.
|
||||
*/
|
||||
void
|
||||
AVMEnableCEC(void);
|
||||
|
||||
/**
|
||||
* Disable CEC.
|
||||
*/
|
||||
void
|
||||
AVMDisableCEC(void);
|
||||
|
||||
/**
|
||||
* Sends a CEC command.
|
||||
*
|
||||
* \param destination
|
||||
* Logical address of the device where the command should be sent to.
|
||||
*
|
||||
* \param opCode
|
||||
* The op code of the command to send.
|
||||
*
|
||||
* \param parameters
|
||||
* Pointer to optional command parameters.
|
||||
*
|
||||
* \param numParameters
|
||||
* The amount of additional parameters.
|
||||
*
|
||||
* \return
|
||||
* \c TRUE on success.
|
||||
*/
|
||||
BOOL
|
||||
AVMCECSendCommand(TVECECLogicalAddress destination,
|
||||
TVECECOpCode opCode,
|
||||
uint8_t *parameters,
|
||||
uint8_t numParameters);
|
||||
|
||||
/**
|
||||
* Get the last receieved CEC command.
|
||||
*
|
||||
* \param outInitiator
|
||||
* Pointer to store the logical address of the initiator of the command to.
|
||||
*
|
||||
* \param outOpCode
|
||||
* Pointer to store the op code of the command to.
|
||||
*
|
||||
* \param outParameters
|
||||
* Pointer to store additional parameters to.
|
||||
*
|
||||
* \param numParameters
|
||||
* Pointer to store the amount of additional parameters to.
|
||||
*
|
||||
* \return
|
||||
* \c TRUE on success.
|
||||
*
|
||||
* \warning
|
||||
* This will return success even if no new command has been receieved.
|
||||
* The caller should check that the parameters were actually written to.
|
||||
*/
|
||||
BOOL
|
||||
AVMCECReceiveCommand(TVECECLogicalAddress *outInitiator,
|
||||
TVECECOpCode *outOpCode,
|
||||
uint8_t *outParameters,
|
||||
uint8_t *outNumParameters);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
@ -37,88 +37,59 @@ typedef enum CamError
|
|||
CAMERA_ERROR_OK = 0,
|
||||
CAMERA_ERROR_INVALID_ARG = -1,
|
||||
CAMERA_ERROR_INVALID_HANDLE = -2,
|
||||
CAMERA_ERROR_TOO_MANY_SURFACES = -4,
|
||||
CAMERA_ERROR_INSUFFICIENT_MEMORY = -5,
|
||||
CAMERA_ERROR_NOT_READY = -6,
|
||||
CAMERA_ERROR_UNINITIALIZED = -8,
|
||||
CAMERA_ERROR_UVC = -9,
|
||||
CAMERA_ERROR_UVD_CONTEXT = -10,
|
||||
CAMERA_ERROR_UNKNOWN = -10,
|
||||
CAMERA_ERROR_DEVICE_IN_USE = -12,
|
||||
CAMERA_ERROR_UVD_SESSION = -13,
|
||||
CAMERA_ERROR_SEGMENT_VIOLATION = -15
|
||||
CAMERA_ERROR_SEGMENT_VIOLATION = -14
|
||||
} CamError;
|
||||
|
||||
typedef enum CamFps
|
||||
{
|
||||
CAMERA_FPS_15 = 0,
|
||||
CAMERA_FPS_30 = 1
|
||||
CAMERA_FPS_15,
|
||||
CAMERA_FPS_30
|
||||
} CamFps;
|
||||
|
||||
typedef enum CamStreamType
|
||||
{
|
||||
CAMERA_STREAM_TYPE_1 = 0
|
||||
CAMERA_STREAM_TYPE_1
|
||||
} CamStreamType;
|
||||
|
||||
typedef enum CamEventType
|
||||
{
|
||||
CAMERA_DECODE_DONE = 0,
|
||||
CAMERA_DRC_DETACH = 1
|
||||
CAMERA_DRC_DETACH
|
||||
} CamEventType;
|
||||
|
||||
struct CAMEventData
|
||||
{
|
||||
//! Event type
|
||||
CamEventType eventType;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
//! Pointer to the buffer of the decoded image
|
||||
void *surfaceBuffer;
|
||||
//! Handle of instance
|
||||
CAMHandle handle;
|
||||
//! TRUE if decode failed
|
||||
BOOL failed;
|
||||
} decode;
|
||||
struct
|
||||
{
|
||||
//! Will be FALSE
|
||||
BOOL connected;
|
||||
//! Handle of instance
|
||||
CAMHandle handle;
|
||||
} detach;
|
||||
//! Event args
|
||||
uint32_t args[3];
|
||||
};
|
||||
uint32_t data0;
|
||||
uint32_t data1;
|
||||
uint32_t data2;
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x00, eventType);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x04, decode.surfaceBuffer);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x08, decode.handle);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x0c, decode.failed);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x04, detach.connected);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x08, detach.handle);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x04, args);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x04, data0);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x08, data1);
|
||||
WUT_CHECK_OFFSET(CAMEventData, 0x0C, data2);
|
||||
WUT_CHECK_SIZE(CAMEventData, 0x10);
|
||||
|
||||
typedef void(*CAMEventHandler)(CAMEventData *camEventData);
|
||||
|
||||
struct CAMMode
|
||||
{
|
||||
//! If TRUE, the GamePad will display the camera output regardless of what is being rendered
|
||||
BOOL forceDrc;
|
||||
//! Framerate setting
|
||||
int unk_0x00;
|
||||
CamFps fps;
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMMode, 0x00, forceDrc);
|
||||
WUT_CHECK_OFFSET(CAMMode, 0x00, unk_0x00);
|
||||
WUT_CHECK_OFFSET(CAMMode, 0x04, fps);
|
||||
WUT_CHECK_SIZE(CAMMode, 0x08);
|
||||
|
||||
struct CAMWorkMem
|
||||
{
|
||||
//! Size of the work memory
|
||||
uint32_t size;
|
||||
//! Pointer to the work memory
|
||||
void *pMem;
|
||||
int size; // size of the work mem
|
||||
void *pMem; // pointer to the work mem
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMWorkMem, 0x00, size);
|
||||
WUT_CHECK_OFFSET(CAMWorkMem, 0x04, pMem);
|
||||
|
|
@ -126,12 +97,9 @@ WUT_CHECK_SIZE(CAMWorkMem, 0x08);
|
|||
|
||||
struct CAMStreamInfo
|
||||
{
|
||||
//! Stream type, only CAMERA_STREAM_TYPE_1 is valid
|
||||
CamStreamType type;
|
||||
//! Stream height
|
||||
uint32_t height;
|
||||
//! Stream width
|
||||
uint32_t width;
|
||||
int height; // stream height
|
||||
int width; // stream width
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMStreamInfo, 0x00, type);
|
||||
WUT_CHECK_OFFSET(CAMStreamInfo, 0x04, height);
|
||||
|
|
@ -140,43 +108,32 @@ WUT_CHECK_SIZE(CAMStreamInfo, 0x0C);
|
|||
|
||||
struct CAMSetupInfo
|
||||
{
|
||||
//! Stream info
|
||||
CAMStreamInfo streamInfo;
|
||||
//! Memory used by library to record and decode frames
|
||||
CAMWorkMem workMem;
|
||||
//! Event handler
|
||||
CAMEventHandler eventHandler;
|
||||
//! Camera mode
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
CAMMode mode;
|
||||
//! See \link OS_THREAD_ATTRIB \endlink
|
||||
uint32_t threadAffinity;
|
||||
WUT_PADDING_BYTES(0x10);
|
||||
WUT_UNKNOWN_BYTES(0x10);
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x00, streamInfo);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x0C, workMem);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x14, eventHandler);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x18, mode);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x20, threadAffinity);
|
||||
WUT_CHECK_SIZE(CAMSetupInfo, 0x34);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x1C, mode);
|
||||
WUT_CHECK_OFFSET(CAMSetupInfo, 0x24, threadAffinity);
|
||||
WUT_CHECK_SIZE(CAMSetupInfo, 0x38);
|
||||
|
||||
struct CAMSurface
|
||||
{
|
||||
//! Number of bytes allocated to surface buffer
|
||||
int32_t surfaceSize;
|
||||
//! Surface buffer data
|
||||
int surfaceSize;
|
||||
void *surfaceBuffer;
|
||||
//! Surface height
|
||||
int32_t height;
|
||||
//! Surface width
|
||||
int32_t width;
|
||||
//! Surface pitch
|
||||
int32_t pitch;
|
||||
//! Surface alignment
|
||||
int32_t alignment;
|
||||
//! Tile mode, should be zero
|
||||
int32_t tileMode;
|
||||
//! Pixel format, Should be zero
|
||||
int32_t pixelFormat;
|
||||
int height; // surface height
|
||||
int width; // surface width
|
||||
int pitch;
|
||||
int alignment; // surface alignment
|
||||
int tileMode;
|
||||
int pixelFormat;
|
||||
};
|
||||
WUT_CHECK_OFFSET(CAMSurface, 0x00, surfaceSize);
|
||||
WUT_CHECK_OFFSET(CAMSurface, 0x04, surfaceBuffer);
|
||||
|
|
@ -188,52 +145,24 @@ WUT_CHECK_OFFSET(CAMSurface, 0x18, tileMode);
|
|||
WUT_CHECK_OFFSET(CAMSurface, 0x1C, pixelFormat);
|
||||
WUT_CHECK_SIZE(CAMSurface, 0x20);
|
||||
|
||||
/**
|
||||
* Initialize the camera
|
||||
* \returns camera handle on success, and -1 on failure
|
||||
*/
|
||||
CAMHandle
|
||||
CAMInit(int instance, CAMSetupInfo *setupInfo, CAMError *err);
|
||||
|
||||
/**
|
||||
* Deinitialize and clean up
|
||||
*/
|
||||
void
|
||||
CAMExit(CAMHandle handle);
|
||||
|
||||
/**
|
||||
* Start recording and decoding frames
|
||||
*/
|
||||
CAMError
|
||||
CAMOpen(CAMHandle handle);
|
||||
|
||||
/**
|
||||
* Stops recording and decoding.
|
||||
* Automatically called when the process is moved to background
|
||||
*/
|
||||
CAMError
|
||||
CAMClose(CAMHandle handle);
|
||||
|
||||
/**
|
||||
* Get the number of bytes requied by the work memory
|
||||
* \returns number of bytes
|
||||
* \returns CAM_ERROR_INVALID_ARG if streamInfo is NULL
|
||||
*/
|
||||
int32_t
|
||||
CAMError
|
||||
CAMGetMemReq(CAMStreamInfo *streamInfo);
|
||||
|
||||
/**
|
||||
* Submit 1 surface to the working queue.
|
||||
* Once the frame is captured and decoded, the event handler set in CAMInit will fire, and the frame will be dequeued.
|
||||
* Up to 20 surfaces may be queued.
|
||||
* Surface data is returned in the NV12 format
|
||||
*/
|
||||
CAMError
|
||||
CAMSubmitTargetSurface(CAMHandle handle, CAMSurface *surface);
|
||||
|
||||
/**
|
||||
* Checks whether memory is segmented correctly to be used with the camera library
|
||||
*/
|
||||
CAMError
|
||||
CAMCheckMemSegmentation(void *pMem, uint32_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include "context.h"
|
||||
#include "threadqueue.h"
|
||||
#include "time.h"
|
||||
#include "context.h"
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_alarms Alarms
|
||||
|
|
|
|||
|
|
@ -12,32 +12,16 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int32_t BSPError;
|
||||
typedef uint32_t BSPHardwareVersion;
|
||||
typedef uint32_t BSPConsoleTypeRaw;
|
||||
|
||||
typedef enum BSPError
|
||||
typedef enum BSPErrors
|
||||
{
|
||||
BSP_ERROR_OK = 0x0,
|
||||
BSP_ERROR_UNKNOWN_ENTITY = 0x1,
|
||||
BSP_ERROR_UNKNOWN_ATTRIBUTE = 0x2,
|
||||
BSP_ERROR_INVALID_INSTANCE = 0x4,
|
||||
BSP_ERROR_CFG_CORRUPTED = 0x8,
|
||||
BSP_ERROR_DEVICE_ERROR = 0x10,
|
||||
BSP_ERROR_DEVICE_BUSY = 0x20,
|
||||
BSP_ERROR_OK = 0,
|
||||
BSP_ERROR_IOS_ERROR = 0x40,
|
||||
BSP_ERROR_SPECIFIED_SIZE_INVALID = 0x80,
|
||||
BSP_ERROR_HEAP_ERROR = 0x100,
|
||||
BSP_ERROR_ENTITY_LIST_FULL = 0x200,
|
||||
BSP_ERROR_UNSUPPORTED_METHOD = 0x400,
|
||||
BSP_ERROR_UNKNOWN_HARDWARE_VERSION = 0x800,
|
||||
BSP_ERROR_QUERY_UNAVAILABLE = 0x1000,
|
||||
BSP_ERROR_UNKNOWN_DEVICE = 0x2000,
|
||||
BSP_ERROR_INVALID_PARAMETER = 0x4000,
|
||||
BSP_ERROR_DEVICE_NOT_FOUND = 0x8000,
|
||||
BSP_ERROR_REQUEST_DENIED = 0x10000,
|
||||
BSP_ERROR_UNSUPPORTED_PARAMETER = 0x20000,
|
||||
BSP_ERROR_BOARD_CONFIG_INVALID = 0x40000,
|
||||
} BSPError;
|
||||
BSP_ERROR_RESPONSE_TOO_LARGE = 0x80,
|
||||
} BSPErrors;
|
||||
|
||||
typedef enum BSPHardwareVersions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ extern "C" {
|
|||
//! A bitfield of enum OS_CONTEXT_STATE.
|
||||
typedef uint16_t OSContextState;
|
||||
|
||||
enum OS_CONTEXT_STATE
|
||||
{
|
||||
enum OS_CONTEXT_STATE {
|
||||
OS_CONTEXT_STATE_OSCALLBACK = 1 << 3,
|
||||
OS_CONTEXT_STATE_USERMODE_SAVED = 1 << 4
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,15 +14,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Can be used to mask the return value of
|
||||
* \ref OSGetConsoleType
|
||||
* for determining the "group" of console. See the function for more
|
||||
* information around the values the mask gives.
|
||||
*/
|
||||
#define OS_CONSOLE_TYPE_MASK 0xF0000000
|
||||
|
||||
|
||||
/**
|
||||
* Gets the number of cores in the system. On a retail Wii U, this is always 3.
|
||||
*
|
||||
|
|
@ -67,22 +58,6 @@ BOOL
|
|||
OSIsMainCore();
|
||||
|
||||
|
||||
/**
|
||||
* Get the type of console this code is actively running on.
|
||||
*
|
||||
* Most of the field is relatively unknown but you can use
|
||||
* \ref OS_CONSOLE_TYPE_MASK
|
||||
* which returns whether the unit is a Retail/CAT-R unit with `0x00000000`,
|
||||
* a CAT-DEV or other CAFE development board with `0x10000000`, and an
|
||||
* orchestrax unit with `0x20000000`.
|
||||
*
|
||||
* \returns
|
||||
* A number representing the specific console types.
|
||||
*/
|
||||
uint32_t
|
||||
OSGetConsoleType();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,16 +12,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum COSReportLevel
|
||||
{
|
||||
typedef enum COSReportLevel{
|
||||
COS_REPORT_LEVEL_ERROR = 0,
|
||||
COS_REPORT_LEVEL_WARN = 1,
|
||||
COS_REPORT_LEVEL_INFO = 2,
|
||||
COS_REPORT_LEVEL_VERBOSE = 3,
|
||||
} COSReportLevel;
|
||||
|
||||
typedef enum COSReportModule
|
||||
{
|
||||
typedef enum COSReportModule{
|
||||
COS_REPORT_MODULE_UNKNOWN_0 = 0,
|
||||
COS_REPORT_MODULE_UNKNOWN_1 = 1,
|
||||
COS_REPORT_MODULE_UNKNOWN_2 = 2,
|
||||
|
|
@ -32,32 +30,27 @@ void
|
|||
COSVReport(COSReportModule module,
|
||||
COSReportLevel level,
|
||||
const char* fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
...);
|
||||
|
||||
void
|
||||
COSError(COSReportModule module,
|
||||
const char* fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
...);
|
||||
|
||||
void
|
||||
COSInfo(COSReportModule module,
|
||||
const char* fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
...);
|
||||
|
||||
void
|
||||
COSVerbose(COSReportModule module,
|
||||
const char* fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
...);
|
||||
|
||||
void
|
||||
COSWarn(COSReportModule module,
|
||||
const char* fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(2, 3);
|
||||
...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct OSFatalError OSFatalError;
|
||||
|
||||
typedef void (*DisassemblyPrintFn)(const char *fmt, ...);
|
||||
|
||||
typedef uint32_t (*DisassemblyFindSymbolFn)(uint32_t addr, char *symbolNameBuf, uint32_t symbolNameBufSize);
|
||||
|
|
@ -22,39 +20,6 @@ typedef enum DisassemblePPCFlags
|
|||
DISASSEMBLE_PPC_FLAGS_NONE = 0,
|
||||
} DisassemblePPCFlags;
|
||||
|
||||
typedef enum OSFatalErrorMessageType
|
||||
{
|
||||
OS_FATAL_ERROR_UNKOWN = 0,
|
||||
OS_FATAL_ERROR_GENERAL = 1,
|
||||
|
||||
//! These are only valid for errorCode 1600200 - 1609999
|
||||
OS_FATAL_ERROR_CORRUPTION = 2,
|
||||
OS_FATAL_ERROR_FATAL_SYSTEM_OR_USB = 3,
|
||||
OS_FATAL_ERROR_CORRUPTION_SLC = 4,
|
||||
OS_FATAL_ERROR_CORRUPTION_USB = 5,
|
||||
OS_FATAL_ERROR_STORAGE_REMOVED = 6,
|
||||
OS_FATAL_ERROR_DISC_REMOVED = 7,
|
||||
OS_FATAL_ERROR_CORRUPTION_DISC = 8,
|
||||
OS_FATAL_ERROR_WRITE_PROTECT = 9,
|
||||
} OSFatalErrorMessageType;
|
||||
|
||||
struct OSFatalError
|
||||
{
|
||||
OSFatalErrorMessageType messageType;
|
||||
uint32_t errorCode;
|
||||
uint32_t processId;
|
||||
uint32_t internalErrorCode;
|
||||
uint32_t line;
|
||||
char functionName[64];
|
||||
WUT_UNKNOWN_BYTES(0x80);
|
||||
};
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x00, messageType);
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x04, errorCode);
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x08, processId);
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x0C, internalErrorCode);
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x10, line);
|
||||
WUT_CHECK_OFFSET(OSFatalError, 0x14, functionName);
|
||||
WUT_CHECK_SIZE(OSFatalError, 0xD4);
|
||||
|
||||
void
|
||||
OSConsoleWrite(const char *msg,
|
||||
|
|
@ -65,40 +30,30 @@ __OSConsoleWrite(const char *msg,
|
|||
uint32_t size);
|
||||
|
||||
void
|
||||
OSReport(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
OSReport(const char *fmt, ...);
|
||||
|
||||
|
||||
void
|
||||
OSReportVerbose(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
OSReportVerbose(const char *fmt, ...);
|
||||
|
||||
|
||||
void
|
||||
OSReportInfo(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
OSReportInfo(const char *fmt, ...);
|
||||
|
||||
|
||||
void
|
||||
OSReportWarn(const char *fmt, ...)
|
||||
WUT_FORMAT_PRINTF(1, 2);
|
||||
OSReportWarn(const char *fmt, ...);
|
||||
|
||||
|
||||
void
|
||||
OSPanic(const char *file,
|
||||
uint32_t line,
|
||||
const char *fmt,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
const char *fmt, ...);
|
||||
|
||||
|
||||
void
|
||||
OSFatal(const char *msg);
|
||||
|
||||
void
|
||||
OSSendFatalError(OSFatalError *error,
|
||||
const char *functionName,
|
||||
uint32_t line);
|
||||
|
||||
uint32_t
|
||||
OSGetSymbolName(uint32_t addr,
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ typedef enum OSDynLoad_Error
|
|||
typedef OSDynLoad_Error (*OSDynLoadAllocFn)(int32_t size, int32_t align, void **outAddr);
|
||||
typedef void (*OSDynLoadFreeFn)(void *addr);
|
||||
|
||||
typedef enum OSDynLoad_ExportType
|
||||
{
|
||||
typedef enum OSDynLoad_ExportType {
|
||||
OS_DYNLOAD_EXPORT_FUNC = 0,
|
||||
OS_DYNLOAD_EXPORT_DATA = 1,
|
||||
} OSDynLoad_ExportType;
|
||||
|
|
@ -131,8 +130,7 @@ struct OSDynLoad_LoaderSectionInfo
|
|||
uint32_t flags;
|
||||
void *address;
|
||||
|
||||
union
|
||||
{
|
||||
union {
|
||||
//! Size of the section, set when type != SHT_RPL_IMPORTS
|
||||
uint32_t size;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
void
|
||||
RPLWRAP(exit)(int code);
|
||||
// clang-format on
|
||||
|
||||
void
|
||||
_Exit(int code);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef void (*OSFiberEntryFn)();
|
||||
typedef void (*OSFiberExEntryFn)(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4);
|
||||
typedef void (*OSFiberExEntryFn)(uint32_t arg1, uint32_t arg2,
|
||||
uint32_t arg3, uint32_t arg4);
|
||||
|
||||
int32_t
|
||||
OSSwitchFiber(OSFiberEntryFn entry,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <coreinit/alarm.h>
|
||||
#include <coreinit/fastmutex.h>
|
||||
#include <coreinit/ios.h>
|
||||
#include <coreinit/messagequeue.h>
|
||||
#include <coreinit/time.h>
|
||||
#include <coreinit/ios.h>
|
||||
#include <coreinit/fastmutex.h>
|
||||
#include <coreinit/alarm.h>
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_fs Filesystem
|
||||
|
|
@ -181,8 +181,7 @@ typedef enum FSVolumeState
|
|||
FS_VOLUME_STATE_INVALID = 11,
|
||||
} FSVolumeState;
|
||||
|
||||
typedef enum FSMediaState
|
||||
{
|
||||
typedef enum FSMediaState {
|
||||
FS_MEDIA_STATE_READY = 0,
|
||||
FS_MEDIA_STATE_NO_MEDIA = 1,
|
||||
FS_MEDIA_STATE_INVALID_MEDIA = 2,
|
||||
|
|
@ -190,11 +189,9 @@ typedef enum FSMediaState
|
|||
FS_MEDIA_STATE_MEDIA_ERROR = 4,
|
||||
} FSMediaState;
|
||||
|
||||
typedef enum FSMountSourceType
|
||||
{
|
||||
typedef enum FSMountSourceType {
|
||||
FS_MOUNT_SOURCE_SD = 0,
|
||||
//! Devkit only API currently. Uses the PCFS channel to perform I/O operations on the attached host machine.
|
||||
FS_MOUNT_SOURCE_HFIO = 1,
|
||||
FS_MOUNT_SOURCE_UNK = 1,
|
||||
} FSMountSourceType;
|
||||
|
||||
typedef enum FSOpenFileFlags
|
||||
|
|
@ -400,8 +397,7 @@ WUT_CHECK_OFFSET(FSAsyncResult, 0x20, block);
|
|||
WUT_CHECK_OFFSET(FSAsyncResult, 0x24, status);
|
||||
WUT_CHECK_SIZE(FSAsyncResult, 0x28);
|
||||
|
||||
struct FSCmdBlockBody
|
||||
{
|
||||
struct FSCmdBlockBody {
|
||||
WUT_UNKNOWN_BYTES(0x96C);
|
||||
FSAsyncResult asyncResult;
|
||||
WUT_UNKNOWN_BYTES(0x68);
|
||||
|
|
@ -423,8 +419,7 @@ struct FSMountSource
|
|||
};
|
||||
WUT_CHECK_SIZE(FSMountSource, 0x300);
|
||||
|
||||
struct WUT_PACKED FSVolumeInfo
|
||||
{
|
||||
struct WUT_PACKED FSVolumeInfo {
|
||||
uint32_t flags;
|
||||
FSMediaState mediaState;
|
||||
WUT_UNKNOWN_BYTES(0x4);
|
||||
|
|
@ -455,8 +450,7 @@ WUT_CHECK_SIZE(FSVolumeInfo, 444);
|
|||
* Get an aligned FSClientBody from an FSClient.
|
||||
*/
|
||||
static inline FSClientBody *
|
||||
FSGetClientBody(FSClient *client)
|
||||
{
|
||||
FSGetClientBody(FSClient *client) {
|
||||
if (!client) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -467,8 +461,7 @@ FSGetClientBody(FSClient *client)
|
|||
* Get an aligned FSCmdBlockBody from an FSCmdBlock.
|
||||
*/
|
||||
static inline FSCmdBlockBody *
|
||||
FSGetCmdBlockBody(FSCmdBlock *cmdBlock)
|
||||
{
|
||||
FSGetCmdBlockBody(FSCmdBlock *cmdBlock) {
|
||||
if (!cmdBlock) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
#include "wut.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -82,8 +83,7 @@ typedef void (*FSAAsyncCallbackFn)(FSError result,
|
|||
/**
|
||||
* Block information.
|
||||
*/
|
||||
struct FSABlockInfo
|
||||
{
|
||||
struct FSABlockInfo {
|
||||
WUT_UNKNOWN_BYTES(0x14);
|
||||
};
|
||||
WUT_CHECK_SIZE(FSABlockInfo, 0x14);
|
||||
|
|
@ -91,8 +91,7 @@ WUT_CHECK_SIZE(FSABlockInfo, 0x14);
|
|||
/**
|
||||
* Device information.
|
||||
*/
|
||||
struct FSADeviceInfo
|
||||
{
|
||||
struct FSADeviceInfo {
|
||||
WUT_UNKNOWN_BYTES(0x08);
|
||||
uint64_t deviceSizeInSectors;
|
||||
uint32_t deviceSectorSize;
|
||||
|
|
@ -105,22 +104,19 @@ WUT_CHECK_SIZE(FSADeviceInfo, 0x28);
|
|||
/**
|
||||
* File System information.
|
||||
*/
|
||||
struct FSAFileSystemInfo
|
||||
{
|
||||
struct FSAFileSystemInfo {
|
||||
WUT_UNKNOWN_BYTES(0x1E);
|
||||
};
|
||||
WUT_CHECK_SIZE(FSAFileSystemInfo, 0x1E);
|
||||
|
||||
typedef enum FSAMountPriority
|
||||
{
|
||||
typedef enum FSAMountPriority {
|
||||
FSA_MOUNT_PRIORITY_BASE = 0x1,
|
||||
FSA_MOUNT_PRIORITY_RAM_DISK_CACHE = 0x4,
|
||||
FSA_MOUNT_PRIORITY_TITLE_UPDATE = 0x9,
|
||||
FSA_MOUNT_PRIORITY_UNMOUNT_ALL = 0x80000000,
|
||||
} FSAMountPriority;
|
||||
|
||||
typedef enum FSAQueryInfoType
|
||||
{
|
||||
typedef enum FSAQueryInfoType {
|
||||
FSA_QUERY_INFO_FREE_SPACE_SIZE = 0x0,
|
||||
FSA_QUERY_INFO_DIR_SIZE = 0x1,
|
||||
FSA_QUERY_INFO_ENTRY_NUM = 0x2,
|
||||
|
|
@ -132,14 +128,12 @@ typedef enum FSAQueryInfoType
|
|||
FSA_QUERY_INFO_FRAGMENT_BLOCK_INFO = 0x8,
|
||||
} FSAQueryInfoType;
|
||||
|
||||
typedef enum FSAReadFlag
|
||||
{
|
||||
typedef enum FSAReadFlag {
|
||||
FSA_READ_FLAG_NONE = 0x0,
|
||||
FSA_READ_FLAG_READ_WITH_POS = 0x1
|
||||
} FSAReadFlag;
|
||||
|
||||
typedef enum FSAWriteFlag
|
||||
{
|
||||
typedef enum FSAWriteFlag {
|
||||
FSA_WRITE_FLAG_NONE = 0x0,
|
||||
FSA_WRITE_FLAG_READ_WITH_POS = 0x1
|
||||
} FSAWriteFlag;
|
||||
|
|
@ -158,22 +152,19 @@ WUT_CHECK_OFFSET(FSAProcessInfo, 0x08, processId);
|
|||
WUT_CHECK_OFFSET(FSAProcessInfo, 0x0C, groupId);
|
||||
WUT_CHECK_SIZE(FSAProcessInfo, 0x10);
|
||||
|
||||
struct FSARequestRawOpen
|
||||
{
|
||||
struct FSARequestRawOpen {
|
||||
char path[0x280];
|
||||
};
|
||||
WUT_CHECK_OFFSET(FSARequestRawOpen, 0x0, path);
|
||||
WUT_CHECK_SIZE(FSARequestRawOpen, 0x280);
|
||||
|
||||
struct FSARequestRawClose
|
||||
{
|
||||
struct FSARequestRawClose {
|
||||
int32_t handle;
|
||||
};
|
||||
WUT_CHECK_OFFSET(FSARequestRawClose, 0x0, handle);
|
||||
WUT_CHECK_SIZE(FSARequestRawClose, 0x04);
|
||||
|
||||
struct WUT_PACKED FSARequestRawRead
|
||||
{
|
||||
struct WUT_PACKED FSARequestRawRead {
|
||||
WUT_UNKNOWN_BYTES(0x4);
|
||||
uint64_t blocks_offset;
|
||||
uint32_t count;
|
||||
|
|
@ -186,8 +177,7 @@ WUT_CHECK_OFFSET(FSARequestRawRead, 0x10, size);
|
|||
WUT_CHECK_OFFSET(FSARequestRawRead, 0x14, device_handle);
|
||||
WUT_CHECK_SIZE(FSARequestRawRead, 0x18);
|
||||
|
||||
struct WUT_PACKED FSARequestRawWrite
|
||||
{
|
||||
struct WUT_PACKED FSARequestRawWrite {
|
||||
WUT_UNKNOWN_BYTES(0x4);
|
||||
uint64_t blocks_offset;
|
||||
uint32_t count;
|
||||
|
|
@ -582,12 +572,10 @@ WUT_CHECK_OFFSET(FSARequestChangeOwner, 0x284, owner);
|
|||
WUT_CHECK_OFFSET(FSARequestChangeOwner, 0x28C, group);
|
||||
WUT_CHECK_SIZE(FSARequestChangeOwner, 0x290);
|
||||
|
||||
struct FSARequest
|
||||
{
|
||||
struct FSARequest {
|
||||
FSError emulatedError;
|
||||
|
||||
union
|
||||
{
|
||||
union {
|
||||
FSARequestRawOpen rawOpen;
|
||||
FSARequestRawClose rawClose;
|
||||
FSARequestRawRead rawRead;
|
||||
|
|
@ -628,8 +616,7 @@ WUT_CHECK_OFFSET(FSARequest, 0x04, rawOpen);
|
|||
WUT_CHECK_SIZE(FSARequest, 0x520);
|
||||
|
||||
|
||||
struct FSAResponseRawOpen
|
||||
{
|
||||
struct FSAResponseRawOpen {
|
||||
int handle;
|
||||
};
|
||||
WUT_CHECK_OFFSET(FSAResponseRawOpen, 0x0, handle);
|
||||
|
|
@ -665,8 +652,7 @@ WUT_CHECK_SIZE(FSAResponseGetVolumeInfo, 0x1BC);
|
|||
|
||||
struct WUT_PACKED FSAResponseGetInfoByQuery
|
||||
{
|
||||
union WUT_PACKED
|
||||
{
|
||||
union WUT_PACKED {
|
||||
FSABlockInfo badBlockInfo;
|
||||
FSADeviceInfo deviceInfo;
|
||||
uint64_t dirSize;
|
||||
|
|
@ -717,11 +703,9 @@ struct FSAResponseStatFile
|
|||
WUT_CHECK_OFFSET(FSAResponseStatFile, 0x0, stat);
|
||||
WUT_CHECK_SIZE(FSAResponseStatFile, 0x64);
|
||||
|
||||
struct WUT_PACKED FSAResponse
|
||||
{
|
||||
struct WUT_PACKED FSAResponse {
|
||||
uint32_t word0;
|
||||
union WUT_PACKED
|
||||
{
|
||||
union WUT_PACKED {
|
||||
FSAResponseRawOpen rawOpen;
|
||||
FSAResponseGetCwd getCwd;
|
||||
FSAResponseGetFileBlockAddress getFileBlockAddress;
|
||||
|
|
@ -739,8 +723,7 @@ WUT_CHECK_OFFSET(FSAResponse, 0x0, word0);
|
|||
WUT_CHECK_OFFSET(FSAResponse, 0x4, rawOpen);
|
||||
WUT_CHECK_SIZE(FSAResponse, 0x293);
|
||||
|
||||
enum FSACommandEnum
|
||||
{
|
||||
enum FSACommandEnum {
|
||||
FSA_COMMAND_INVALID = 0x0,
|
||||
FSA_COMMAND_MOUNT = 0x1,
|
||||
FSA_COMMAND_UNMOUNT = 0x2,
|
||||
|
|
@ -808,14 +791,12 @@ enum FSACommandEnum
|
|||
FSA_COMMAND_SEND_PROFILE_CMD = 0x8E,
|
||||
};
|
||||
|
||||
enum FSAIpcRequestTypeEnum
|
||||
{
|
||||
enum FSAIpcRequestTypeEnum {
|
||||
FSA_IPC_REQUEST_IOCTL = 0,
|
||||
FSA_IPC_REQUEST_IOCTLV = 1,
|
||||
};
|
||||
|
||||
struct FSAAsyncResult
|
||||
{
|
||||
struct FSAAsyncResult {
|
||||
//! Queue to put a message on when command is complete.
|
||||
OSMessageQueue *ioMsgQueue;
|
||||
|
||||
|
|
@ -850,8 +831,7 @@ WUT_CHECK_OFFSET(FSAAsyncResult, 0x24, response);
|
|||
WUT_CHECK_OFFSET(FSAAsyncResult, 0x28, userContext);
|
||||
WUT_CHECK_SIZE(FSAAsyncResult, 0x2C);
|
||||
|
||||
struct WUT_PACKED FSAShimBuffer
|
||||
{
|
||||
struct WUT_PACKED FSAShimBuffer {
|
||||
//! Buffer for FSA IPC request.
|
||||
FSARequest request;
|
||||
WUT_UNKNOWN_BYTES(0x60);
|
||||
|
|
@ -900,8 +880,7 @@ typedef void (*FSAClientAttachAsyncCallbackFn)(FSError result,
|
|||
FSAResponse *response,
|
||||
void *userContext);
|
||||
|
||||
struct FSAClientAttachAsyncData
|
||||
{
|
||||
struct FSAClientAttachAsyncData {
|
||||
//! Callback to call when an attach has happened.
|
||||
FSAClientAttachAsyncCallbackFn userCallback;
|
||||
|
||||
|
|
@ -916,15 +895,13 @@ WUT_CHECK_OFFSET(FSAClientAttachAsyncData, 0x04, userContext);
|
|||
WUT_CHECK_OFFSET(FSAClientAttachAsyncData, 0x08, ioMsgQueue);
|
||||
WUT_CHECK_SIZE(FSAClientAttachAsyncData, 0xC);
|
||||
|
||||
typedef enum FSAMountFlags
|
||||
{
|
||||
typedef enum FSAMountFlags {
|
||||
FSA_MOUNT_FLAG_LOCAL_MOUNT = 0,
|
||||
FSA_MOUNT_FLAG_BIND_MOUNT = 1,
|
||||
FSA_MOUNT_FLAG_GLOBAL_MOUNT = 2,
|
||||
} FSAMountFlags;
|
||||
|
||||
typedef enum FSAUnmountFlags
|
||||
{
|
||||
typedef enum FSAUnmountFlags {
|
||||
FSA_UNMOUNT_FLAG_NONE = 0x00000000,
|
||||
FSA_UNMOUNT_FLAG_FORCE = 0x00000002,
|
||||
FSA_UNMOUNT_FLAG_BIND_MOUNT = 0x80000000,
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
int
|
||||
__os_snprintf(char *buf,
|
||||
size_t n,
|
||||
const char *format,
|
||||
...)
|
||||
WUT_FORMAT_PRINTF(3, 4);
|
||||
__os_snprintf(char *buf, size_t n, const char *format, ... );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include "ios.h"
|
||||
#include "mutex.h"
|
||||
#include "ios.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -17,8 +17,7 @@ typedef struct IPCBufPool IPCBufPool;
|
|||
*
|
||||
* Functions similar to a ring buffer.
|
||||
*/
|
||||
struct IPCBufPoolFIFO
|
||||
{
|
||||
struct IPCBufPoolFIFO {
|
||||
//! The current message index to push to.
|
||||
int32_t pushIndex;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ WUT_CHECK_SIZE(IPCBufPoolFIFO, 0x14);
|
|||
/**
|
||||
* Attributes returned by IPCBufPoolGetAttributes.
|
||||
*/
|
||||
struct IPCBufPoolAttributes
|
||||
{
|
||||
struct IPCBufPoolAttributes {
|
||||
//! Size of a message in the buffer pool.
|
||||
uint32_t messageSize;
|
||||
|
||||
|
|
@ -65,8 +63,7 @@ WUT_CHECK_SIZE(IPCBufPoolAttributes, 0x0C);
|
|||
/**
|
||||
* A simple message buffer pool used for IPC communication.
|
||||
*/
|
||||
struct IPCBufPool
|
||||
{
|
||||
struct IPCBufPool {
|
||||
//! Magic header always set to IPCBufPool::MagicHeader.
|
||||
uint32_t magic;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OSICICommand
|
||||
{
|
||||
typedef enum OSICICommand {
|
||||
OS_ICI_COMMAND_INVALID_IC_RANGE = 1,
|
||||
OS_ICI_COMMAND_RESCHEDULE_CORE = 2,
|
||||
OS_ICI_COMMAND_HALT_CORE = 3,
|
||||
|
|
@ -37,8 +36,7 @@ typedef void (*KernelTimerCallbackFn)(OSExceptionType exception, OSContext *inte
|
|||
|
||||
typedef uint32_t KernelTimerHandle;
|
||||
|
||||
typedef struct OSExceptionChainInfo
|
||||
{
|
||||
typedef struct OSExceptionChainInfo {
|
||||
OSExceptionCallbackExFn callback;
|
||||
void *stack;
|
||||
OSContext *context;
|
||||
|
|
@ -48,10 +46,8 @@ WUT_CHECK_OFFSET(OSExceptionChainInfo, 4, stack);
|
|||
WUT_CHECK_OFFSET(OSExceptionChainInfo, 8, context);
|
||||
WUT_CHECK_SIZE(OSExceptionChainInfo, 12);
|
||||
|
||||
typedef struct KernelInfo0
|
||||
{
|
||||
struct CoreinitInfo
|
||||
{
|
||||
typedef struct KernelInfo0 {
|
||||
struct CoreinitInfo {
|
||||
void *loaderHandle;
|
||||
void *textAddr;
|
||||
uint32_t textOffset;
|
||||
|
|
@ -131,8 +127,7 @@ WUT_CHECK_OFFSET(KernelInfo0, 0x9C, unk0x9C);
|
|||
WUT_CHECK_OFFSET(KernelInfo0, 0xA0, titleId);
|
||||
WUT_CHECK_SIZE(KernelInfo0, 0xA8);
|
||||
|
||||
typedef struct KernelInfo6
|
||||
{
|
||||
typedef struct KernelInfo6 {
|
||||
uint64_t osTitleId;
|
||||
uint32_t unk0x08;
|
||||
WUT_PADDING_BYTES(0x108 - 0xC);
|
||||
|
|
@ -141,33 +136,14 @@ WUT_CHECK_OFFSET(KernelInfo6, 0x00, osTitleId);
|
|||
WUT_CHECK_OFFSET(KernelInfo6, 0x08, unk0x08);
|
||||
WUT_CHECK_SIZE(KernelInfo6, 0x108);
|
||||
|
||||
void
|
||||
__KernelSetUserModeExHandler(OSExceptionType exceptionType,
|
||||
OSExceptionChainInfo *chainInfo,
|
||||
OSExceptionChainInfo *prevChainInfo);
|
||||
void __KernelSetUserModeExHandler(OSExceptionType exceptionType, OSExceptionChainInfo *chainInfo, OSExceptionChainInfo *prevChainInfo);
|
||||
|
||||
KernelTimerHandle
|
||||
__KernelAllocateTimer(KernelTimerCallbackFn,
|
||||
void *exceptionStack,
|
||||
OSContext *context);
|
||||
KernelTimerHandle __KernelAllocateTimer(KernelTimerCallbackFn, void *exceptionStack, OSContext *context);
|
||||
uint32_t __KernelPrimeTimer(KernelTimerHandle handle, uint64_t startTimeInTicks, uint64_t intervalInTicks, uint32_t unknown);
|
||||
|
||||
uint32_t
|
||||
__KernelPrimeTimer(KernelTimerHandle handle,
|
||||
uint64_t startTimeInTicks,
|
||||
uint64_t intervalInTicks,
|
||||
uint32_t unknown);
|
||||
void __KernelSendICI(OSICICommand cmd, void *arg1, uint32_t unknown1, uint32_t unknown2);
|
||||
|
||||
void
|
||||
__KernelSendICI(OSICICommand cmd,
|
||||
void *arg1,
|
||||
uint32_t unknown1,
|
||||
uint32_t unknown2);
|
||||
|
||||
void
|
||||
__KernelGetInfo(uint32_t type,
|
||||
void *outBuffer,
|
||||
uint32_t outBufferSize,
|
||||
uint32_t core);
|
||||
void __KernelGetInfo(uint32_t type, void *outBuffer, uint32_t outBufferSize, uint32_t core);
|
||||
|
||||
static inline void
|
||||
__KernelGetInfo0(KernelInfo0 *outBuffer, uint32_t core)
|
||||
|
|
|
|||
|
|
@ -63,11 +63,9 @@ typedef enum MCPAppType
|
|||
|
||||
typedef enum MCPDeviceType
|
||||
{
|
||||
MCP_DEVICE_TYPE_AUTO = 1, /* returns result for ODD, MLC and USB */
|
||||
MCP_DEVICE_TYPE_ODD = 2,
|
||||
MCP_DEVICE_TYPE_MLC = 3,
|
||||
MCP_DEVICE_TYPE_USB = 4,
|
||||
/* any value >= 5 is MCP_DEVICE_TYPE_AUTO */
|
||||
} MCPDeviceType;
|
||||
|
||||
typedef enum MCPDeviceFlags
|
||||
|
|
@ -102,16 +100,6 @@ typedef enum MCPCompatAVFile
|
|||
MCP_COMPAT_AV_FILE_DEINT = 0x01,
|
||||
} MCPCompatAVFile;
|
||||
|
||||
typedef enum MCPSystemMode
|
||||
{
|
||||
//! This unit is in 'retail'/'production' mode.
|
||||
MCP_PRODUCTION = 0x00,
|
||||
//! This unit is in 'development' mode (default for CAT-DEV).
|
||||
MCP_DEVELOPMENT = 0x01,
|
||||
//! This unit is in 'test' mode.
|
||||
MCP_TEST = 0x02,
|
||||
} MCPSystemMode;
|
||||
|
||||
struct WUT_PACKED MCPDevice
|
||||
{
|
||||
char type[8];
|
||||
|
|
@ -251,10 +239,6 @@ MCPError
|
|||
MCP_GetOwnTitleInfo(int32_t handle,
|
||||
MCPTitleListType *titleInfo);
|
||||
|
||||
MCPError
|
||||
MCP_GetSystemMode(int32_t handle,
|
||||
MCPSystemMode *mode);
|
||||
|
||||
MCPError
|
||||
MCP_GetSysProdSettings(int32_t handle,
|
||||
MCPSysProdSettings *settings);
|
||||
|
|
@ -326,7 +310,7 @@ MCP_TitleListByUniqueId(int32_t handle,
|
|||
|
||||
MCPError
|
||||
MCP_TitleListByDevice(int32_t handle,
|
||||
const char *deviceName,
|
||||
const char *device,
|
||||
uint32_t *outTitleCount,
|
||||
MCPTitleListType *titleList,
|
||||
uint32_t titleListSizeBytes);
|
||||
|
|
@ -340,7 +324,7 @@ MCP_TitleListByDeviceType(int32_t handle,
|
|||
MCPError
|
||||
MCP_TitleListByAppAndDevice(int32_t handle,
|
||||
MCPAppType appType,
|
||||
const char *deviceName,
|
||||
const char *device,
|
||||
uint32_t *outTitleCount,
|
||||
MCPTitleListType *titleList,
|
||||
uint32_t titleListSizeBytes);
|
||||
|
|
@ -396,22 +380,6 @@ MCP_ChangeEcoSettings(int32_t handle,
|
|||
uint32_t maxOnTime,
|
||||
uint16_t defaultOffTime);
|
||||
|
||||
static inline const char *
|
||||
MCP_GetDeviceNameByDeviceType(MCPDeviceType deviceType)
|
||||
{
|
||||
switch (deviceType) {
|
||||
case MCP_DEVICE_TYPE_AUTO:
|
||||
return "auto";
|
||||
case MCP_DEVICE_TYPE_ODD:
|
||||
return "odd";
|
||||
case MCP_DEVICE_TYPE_MLC:
|
||||
return "mlc";
|
||||
case MCP_DEVICE_TYPE_USB:
|
||||
return "usb";
|
||||
}
|
||||
return "auto";
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,108 +0,0 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include "memheap.h"
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_memallocator Allocator
|
||||
* \ingroup coreinit
|
||||
*
|
||||
* Functions for managing generic allocator objects.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct MEMAllocatorFunctions MEMAllocatorFunctions;
|
||||
typedef struct MEMAllocator MEMAllocator;
|
||||
|
||||
typedef void *(*MEMAllocatorAllocFn)(MEMAllocator *allocator, uint32_t size);
|
||||
typedef void (*MEMAllocatorFreeFn)(MEMAllocator *allocator, void *ptr);
|
||||
|
||||
//! Holds context information that will be used to allocate and free memory.
|
||||
struct MEMAllocator
|
||||
{
|
||||
//! Points to the alloc/free functions.
|
||||
MEMAllocatorFunctions *funcs;
|
||||
//! The heap handle.
|
||||
MEMHeapHandle heap;
|
||||
//! The alignment the allocator will use.
|
||||
uint32_t align;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
};
|
||||
WUT_CHECK_OFFSET(MEMAllocator, 0x0, funcs);
|
||||
WUT_CHECK_OFFSET(MEMAllocator, 0x4, heap);
|
||||
WUT_CHECK_OFFSET(MEMAllocator, 0x8, align);
|
||||
WUT_CHECK_SIZE(MEMAllocator, 0x10);
|
||||
|
||||
//! The alloc/free functions.
|
||||
struct MEMAllocatorFunctions
|
||||
{
|
||||
MEMAllocatorAllocFn alloc;
|
||||
MEMAllocatorFreeFn free;
|
||||
};
|
||||
WUT_CHECK_OFFSET(MEMAllocatorFunctions, 0x0, alloc);
|
||||
WUT_CHECK_OFFSET(MEMAllocatorFunctions, 0x4, free);
|
||||
WUT_CHECK_SIZE(MEMAllocatorFunctions, 0x8);
|
||||
|
||||
/**
|
||||
* Allocates memory from the allocator.
|
||||
*
|
||||
* \return `allocator->funcs.alloc(allocator, size)`.
|
||||
*/
|
||||
void *
|
||||
MEMAllocFromAllocator(MEMAllocator *allocator,
|
||||
uint32_t size);
|
||||
|
||||
/**
|
||||
* Frees memory back to the allocator.
|
||||
*
|
||||
* It simply calls `allocator->funcs.free(allocator, ptr)`.
|
||||
*/
|
||||
void
|
||||
MEMFreeToAllocator(MEMAllocator *allocator,
|
||||
void *ptr);
|
||||
|
||||
/**
|
||||
* Initializes an allocator from an Expanded Heap.
|
||||
*/
|
||||
void
|
||||
MEMInitAllocatorForExpHeap(MEMAllocator *allocator,
|
||||
MEMHeapHandle heap,
|
||||
uint32_t alignment);
|
||||
|
||||
/**
|
||||
* Initializes an allocator from a Frame Heap.
|
||||
*/
|
||||
void
|
||||
MEMInitAllocatorForFrmHeap(MEMAllocator *allocator,
|
||||
MEMHeapHandle heap,
|
||||
uint32_t alignment);
|
||||
|
||||
/**
|
||||
* Initializes an allocator from a Unit Heap.
|
||||
*/
|
||||
void
|
||||
MEMInitAllocatorForUnitHeap(MEMAllocator *allocator,
|
||||
MEMHeapHandle heap);
|
||||
|
||||
/**
|
||||
* Initializes an allocator from the Default Heap.
|
||||
*/
|
||||
void
|
||||
MEMInitAllocatorForDefaultHeap(MEMAllocator *allocator);
|
||||
|
||||
/**
|
||||
* Initializes an allocator from a Block Heap.
|
||||
*/
|
||||
void
|
||||
MEMInitAllocatorForBlockHeap(MEMAllocator *allocator,
|
||||
MEMHeapHandle heap,
|
||||
uint32_t alignment);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
@ -75,8 +75,6 @@ struct WUT_PACKED MEMBlockHeap
|
|||
|
||||
//! Free block count
|
||||
uint32_t numFreeBlocks;
|
||||
|
||||
WUT_PADDING_BYTES(0xC);
|
||||
};
|
||||
WUT_CHECK_OFFSET(MEMBlockHeap, 0x00, header);
|
||||
WUT_CHECK_OFFSET(MEMBlockHeap, 0x40, defaultTrack);
|
||||
|
|
@ -85,7 +83,7 @@ WUT_CHECK_OFFSET(MEMBlockHeap, 0x64, firstBlock);
|
|||
WUT_CHECK_OFFSET(MEMBlockHeap, 0x68, lastBlock);
|
||||
WUT_CHECK_OFFSET(MEMBlockHeap, 0x6C, firstFreeBlock);
|
||||
WUT_CHECK_OFFSET(MEMBlockHeap, 0x70, numFreeBlocks);
|
||||
WUT_CHECK_SIZE(MEMBlockHeap, 0x80);
|
||||
WUT_CHECK_SIZE(MEMBlockHeap, 0x74);
|
||||
|
||||
MEMHeapHandle
|
||||
MEMInitBlockHeap(MEMBlockHeap *heap,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ typedef struct MEMExpHeap MEMExpHeap;
|
|||
typedef struct MEMExpHeapBlock MEMExpHeapBlock;
|
||||
typedef struct MEMExpHeapBlockList MEMExpHeapBlockList;
|
||||
|
||||
typedef void (*MEMExpHeapBlockVisitor)(void *block, MEMHeapHandle heap, void *context);
|
||||
typedef void (*MEMExpHeapBlockVisitor)(void *block, MEMHeapHandle heap,
|
||||
void *context);
|
||||
|
||||
typedef enum MEMExpHeapMode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include "memlist.h"
|
||||
#include "spinlock.h"
|
||||
#include "memlist.h"
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_memheap Common Memory Heap
|
||||
* \ingroup coreinit
|
||||
*
|
||||
* Common memory heap functions.
|
||||
* Common memory heap fucntions.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,206 +0,0 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_performancemonitor Performance Monitor
|
||||
* \ingroup coreinit
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/// Used to tell OSSetPerformanceMonitor() which arguments are valid.
|
||||
typedef enum OSPerfMonArg
|
||||
{
|
||||
OS_PM_ARG_MMCR0 = 1u << 0u,
|
||||
OS_PM_ARG_MMCR1 = 1u << 1u,
|
||||
OS_PM_ARG_PMC1 = 1u << 2u,
|
||||
OS_PM_ARG_PMC2 = 1u << 3u,
|
||||
OS_PM_ARG_PMC3 = 1u << 4u,
|
||||
OS_PM_ARG_PMC4 = 1u << 5u,
|
||||
} OSPerfMonArg;
|
||||
|
||||
/**
|
||||
* Flags to write to (U)MMCR0 register.
|
||||
*
|
||||
* \sa OSSetPerformanceMonitor
|
||||
*/
|
||||
typedef enum OSPerfMonMMCR0Flags
|
||||
{
|
||||
OS_PM_MMCR0_PMC1_CURRENT = 0b0000000u << 6,
|
||||
OS_PM_MMCR0_PMC1_CPU_CYCLES = 0b0000001u << 6,
|
||||
OS_PM_MMCR0_PMC1_INSTRUCTIONS_COMPLETED = 0b0000010u << 6,
|
||||
OS_PM_MMCR0_PMC1_TBL_RISING_TRANSITIONS = 0b0000011u << 6,
|
||||
OS_PM_MMCR0_PMC1_INSTRUCTIONS_DISPATCHED = 0b0000100u << 6,
|
||||
OS_PM_MMCR0_PMC1_EIEIO_INSTRUCTIONS_COMPLETED = 0b0000101u << 6,
|
||||
OS_PM_MMCR0_PMC1_ITLB_SEARCH_CYCLES = 0b0000110u << 6,
|
||||
OS_PM_MMCR0_PMC1_L2_HITS = 0b0000111u << 6,
|
||||
OS_PM_MMCR0_PMC1_INSTRUCTIONS_EA_DELIVERED = 0b0001000u << 6,
|
||||
OS_PM_MMCR0_PMC1_INSTRUCTIONS_COMPLETED_MATCHES_IABR = 0b0001001u << 6,
|
||||
OS_PM_MMCR0_PMC1_SLOW_L1_MISSES = 0b0001010u << 6,
|
||||
OS_PM_MMCR0_PMC1_UNRESOLVED_BRANCHES = 0b0001011u << 6,
|
||||
OS_PM_MMCR0_PMC1_UNRESOLVED_STALL_CYCLES = 0b0001100u << 6,
|
||||
OS_PM_MMCR0_PMC1_L1_SHARED_STORES = 0b0001110u << 6,
|
||||
OS_PM_MMCR0_PMC1_L2_SHARED_INTERVENTIONS = 0b0001111u << 6,
|
||||
OS_PM_MMCR0_PMC1_CACHE_PARADOXES = 0b0010000u << 6,
|
||||
OS_PM_MMCR0_PMC1_CIU_LOAD_REQUESTS = 0b0010100u << 6,
|
||||
OS_PM_MMCR0_PMC1_BIU_ADDRESS_ONLY_REQUESTS = 0b0010101u << 6,
|
||||
OS_PM_MMCR0_PMC1_CIU_PARADOXES = 0b0010110u << 6,
|
||||
OS_PM_MMCR0_PMC1_60XE_BUS_DATA_BEATS = 0b0010111u << 6,
|
||||
|
||||
OS_PM_MMCR0_PMC2_CURRENT = 0b000000u,
|
||||
OS_PM_MMCR0_PMC2_CPU_CYCLES = 0b000001u,
|
||||
OS_PM_MMCR0_PMC2_INSTRUCTIONS_COMPLETED = 0b000010u,
|
||||
OS_PM_MMCR0_PMC2_TBL_RISING_TRANSITIONS = 0b000011u,
|
||||
OS_PM_MMCR0_PMC2_INSTRUCTIONS_DISPATCHED = 0b000100u,
|
||||
OS_PM_MMCR0_PMC2_L1_ICACHE_MISSES = 0b000101u,
|
||||
OS_PM_MMCR0_PMC2_ITLB_MISSES = 0b000110u,
|
||||
OS_PM_MMCR0_PMC2_L2_INSTRUCTION_MISSES = 0b000111u,
|
||||
OS_PM_MMCR0_PMC2_PRED_BRANCHES_NOT_TAKEN = 0b001000u,
|
||||
OS_PM_MMCR0_PMC2_RESERVED_LOADS = 0b001010u,
|
||||
OS_PM_MMCR0_PMC2_LOADS_AND_STORES = 0b001011u,
|
||||
OS_PM_MMCR0_PMC2_CACHE_SNOOPS = 0b001100u,
|
||||
OS_PM_MMCR0_PMC2_L1_TO_L2_CASTOUTS = 0b001101u,
|
||||
OS_PM_MMCR0_PMC2_SYSTEM_UNIT_INSTRUCTIONS = 0b001110u,
|
||||
OS_PM_MMCR0_PMC2_L1_INSTRUCTION_MISS_CYCLES = 0b001111u,
|
||||
OS_PM_MMCR0_PMC2_FIRST_SPECULATIVE_BRANCH_RESOLVES = 0b010000u,
|
||||
OS_PM_MMCR0_PMC2_L2_SHARED_STORES = 0b010001u,
|
||||
OS_PM_MMCR0_PMC2_L1_SHARED_INTERVENTIONS = 0b010010u,
|
||||
OS_PM_MMCR0_PMC2_CIU_STORE_REQUESTS = 0b010100u,
|
||||
OS_PM_MMCR0_PMC2_SLOW_OUTSTANDING_BIU_TRANSACTIONS = 0b010101u,
|
||||
OS_PM_MMCR0_PMC2_CIU_MODIFIED_INTERVENTIONS = 0b010110u,
|
||||
} OSPerfMonMMCR0Flags;
|
||||
|
||||
/**
|
||||
* Flags to write to (U)MMCR1 register.
|
||||
*
|
||||
* \sa OSSetPerformanceMonitor
|
||||
*/
|
||||
typedef enum OSPerfMonMMCR1Flags
|
||||
{
|
||||
OS_PM_MMCR1_PMC3_CURRENT = 0b00000u << 27,
|
||||
OS_PM_MMCR1_PMC3_CPU_CYCLES = 0b00001u << 27,
|
||||
OS_PM_MMCR1_PMC3_INSTRUCTIONS_COMPLETED = 0b00010u << 27,
|
||||
OS_PM_MMCR1_PMC3_TBL_RISING_TRANSITIONS = 0b00011u << 27,
|
||||
OS_PM_MMCR1_PMC3_INSTRUCTIONS_DISPATCHED = 0b00100u << 27,
|
||||
OS_PM_MMCR1_PMC3_L1_DCACHE_MISSES = 0b00101u << 27,
|
||||
OS_PM_MMCR1_PMC3_DTLB_MISSES = 0b00110u << 27,
|
||||
OS_PM_MMCR1_PMC3_L2_DATA_MISSES = 0b00111u << 27,
|
||||
OS_PM_MMCR1_PMC3_PRED_BRANCHES_TAKEN = 0b01000u << 27,
|
||||
OS_PM_MMCR1_PMC3_COND_STORES_COMPLETED = 0b01010u << 27,
|
||||
OS_PM_MMCR1_PMC3_FPU_INSTRUCTIONS_COMPLETED = 0b01011u << 27,
|
||||
OS_PM_MMCR1_PMC3_L2_CASTOUTS_BY_SNOOPS = 0b01100u << 27,
|
||||
OS_PM_MMCR1_PMC3_L2_CACHE_OPERATIONS = 0b01101u << 27,
|
||||
OS_PM_MMCR1_PMC3_L1_LOAD_MISS_CYCLES = 0b01111u << 27,
|
||||
OS_PM_MMCR1_PMC3_SECOND_SPECULATIVE_BRANCH_RESOLVES = 0b10000u << 27,
|
||||
OS_PM_MMCR1_PMC3_BPU_STALL_LR_CR_CYCLES = 0b10001u << 27,
|
||||
OS_PM_MMCR1_PMC3_L1_MODIFIED_INTERVENTIONS = 0b10010u << 27,
|
||||
OS_PM_MMCR1_PMC3_ICBI_SNOOPS = 0b10011u << 27,
|
||||
OS_PM_MMCR1_PMC3_CIU_ADDRESS_ONLY_REQUESTS = 0b10100u << 27,
|
||||
OS_PM_MMCR1_PMC3_BIU_LOAD_REQUESTS = 0b10101u << 27,
|
||||
OS_PM_MMCR1_PMC3_CIU_SHARED_INTERVENTIONS = 0b10110u << 27,
|
||||
|
||||
OS_PM_MMCR1_PMC4_CURRENT = 0b00000u << 22,
|
||||
OS_PM_MMCR1_PMC4_CPU_CYCLES = 0b00001u << 22,
|
||||
OS_PM_MMCR1_PMC4_INSTRUCTIONS_COMPLETED = 0b00010u << 22,
|
||||
OS_PM_MMCR1_PMC4_TBL_RISING_TRANSITIONS = 0b00011u << 22,
|
||||
OS_PM_MMCR1_PMC4_INSTRUCTIONS_DISPATCHED = 0b00100u << 22,
|
||||
OS_PM_MMCR1_PMC4_L2_CASTOUTS = 0b00101u << 22,
|
||||
OS_PM_MMCR1_PMC4_DTLB_SEARCH_CYCLES = 0b00110u << 22,
|
||||
OS_PM_MMCR1_PMC4_BRANCHES_MISPREDICTED = 0b01000u << 22,
|
||||
OS_PM_MMCR1_PMC4_INTACT_COND_STORES_COMPLETED = 0b01010u << 22,
|
||||
OS_PM_MMCR1_PMC4_SYNC_INSTRUCTIONS_COMPLETED = 0b01011u << 22,
|
||||
OS_PM_MMCR1_PMC4_SNOOP_RETRIES = 0b01100u << 22,
|
||||
OS_PM_MMCR1_PMC4_INTEGER_OPERATIONS = 0b01101u << 22,
|
||||
OS_PM_MMCR1_PMC4_BPU_STALL_TWO_BRANCHES_CYCLES = 0b01110u << 22,
|
||||
OS_PM_MMCR1_PMC4_L2_MODIFIED_INTERVENTIONS = 0b10000u << 22,
|
||||
OS_PM_MMCR1_PMC4_TLBIE_SNOOPS = 0b10001u << 22,
|
||||
OS_PM_MMCR1_PMC4_L2_BANK_REFRESH_OVERFLOWS = 0b10010u << 22,
|
||||
OS_PM_MMCR1_PMC4_CIU_ARTRY_COUNT = 0b10100u << 22,
|
||||
OS_PM_MMCR1_PMC4_BIU_STORE_REQUESTS = 0b10101u << 22,
|
||||
OS_PM_MMCR1_PMC4_CIU_TWO_CORE_SHARED_INTERVENTIONS = 0b10110u << 22,
|
||||
} OSPerfMonMMCR1Flags;
|
||||
|
||||
/**
|
||||
* Write to performance monitor registers.
|
||||
*
|
||||
* Performance monitor registers can only be written by the kernel, this allows userspace
|
||||
* to write to them.
|
||||
*
|
||||
* \param arg_mask OR-ed values from `OSPerfMonArg`, indicating which of the following
|
||||
* arguments are to be written to registers.
|
||||
*
|
||||
* \param mmcr0 OR-ed values from `OSPerfMonMMCR0Flags` to write to register MMCR0.
|
||||
* \param mmcr1 OR-ed values from `OSPerfMonMMCR1Flags` to write to register MMCR1.
|
||||
* \param pmc1 Value to write to register PMC1.
|
||||
* \param pmc2 Value to write to register PMC2.
|
||||
* \param pmc3 Value to write to register PMC3.
|
||||
* \param pmc4 Value to write to register PMC4.
|
||||
*/
|
||||
void
|
||||
OSSetPerformanceMonitor(uint32_t arg_mask,
|
||||
uint32_t mmcr0,
|
||||
uint32_t mmcr1,
|
||||
uint32_t pmc1,
|
||||
uint32_t pmc2,
|
||||
uint32_t pmc3,
|
||||
uint32_t pmc4);
|
||||
|
||||
/**
|
||||
* Convenience function to read from UPMC1.
|
||||
*/
|
||||
static inline uint32_t
|
||||
OSGetUPMC1()
|
||||
{
|
||||
uint32_t result;
|
||||
asm("mfupmc1 %[result]"
|
||||
: [result] "=r"(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function to read from UPMC2.
|
||||
*/
|
||||
static inline uint32_t
|
||||
OSGetUPMC2()
|
||||
{
|
||||
uint32_t result;
|
||||
asm("mfupmc2 %[result]"
|
||||
: [result] "=r"(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function to read from UPMC3.
|
||||
*/
|
||||
static inline uint32_t
|
||||
OSGetUPMC3()
|
||||
{
|
||||
uint32_t result;
|
||||
asm("mfupmc3 %[result]"
|
||||
: [result] "=r"(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function to read from UPMC4.
|
||||
*/
|
||||
static inline uint32_t
|
||||
OSGetUPMC4()
|
||||
{
|
||||
uint32_t result;
|
||||
asm("mfupmc4 %[result]"
|
||||
: [result] "=r"(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
@ -154,14 +154,14 @@ OSScreenFlipBuffersEx(OSScreenID screen);
|
|||
* \param screen
|
||||
* The ID of the screen to draw to. Only the work buffer will be affected.
|
||||
*
|
||||
* \param column
|
||||
* The column, in characters, to place the text at. 0 corresponds to the left of
|
||||
* the screen.
|
||||
*
|
||||
* \param row
|
||||
* The row, in characters, to place the text in. 0 corresponds to the top of
|
||||
* the screen.
|
||||
*
|
||||
* \param column
|
||||
* The column, in characters, to place the text at. 0 corresponds to the left of
|
||||
* the screen.
|
||||
*
|
||||
* \param buffer
|
||||
* Pointer to the string of text to draw. Null-terminated.
|
||||
*
|
||||
|
|
@ -176,8 +176,8 @@ OSScreenFlipBuffersEx(OSScreenID screen);
|
|||
*/
|
||||
void
|
||||
OSScreenPutFontEx(OSScreenID screen,
|
||||
uint32_t column,
|
||||
uint32_t row,
|
||||
uint32_t column,
|
||||
const char *buffer);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ struct SmdElement
|
|||
{
|
||||
SmdElementType type;
|
||||
uint32_t size;
|
||||
union
|
||||
{
|
||||
union {
|
||||
uint8_t data[0xf8];
|
||||
SmdVector spec;
|
||||
uint32_t vectorPaddr;
|
||||
|
|
@ -97,8 +96,7 @@ struct SmdReceiveData
|
|||
{
|
||||
SmdElementType type;
|
||||
uint32_t size;
|
||||
union
|
||||
{
|
||||
union {
|
||||
uint8_t message[0x80];
|
||||
SmdVector spec;
|
||||
SmdVector *vector;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
#include <time.h>
|
||||
#include "alarm.h"
|
||||
#include "context.h"
|
||||
#include "exception.h"
|
||||
#include "threadqueue.h"
|
||||
#include "time.h"
|
||||
#include "threadqueue.h"
|
||||
#include "exception.h"
|
||||
|
||||
/**
|
||||
* \defgroup coreinit_thread Thread
|
||||
|
|
@ -126,8 +126,7 @@ enum OS_THREAD_ATTRIB
|
|||
OS_THREAD_ATTRIB_UNKNOWN = 1 << 7
|
||||
};
|
||||
|
||||
enum OS_THREAD_TYPE
|
||||
{
|
||||
enum OS_THREAD_TYPE {
|
||||
OS_THREAD_TYPE_DRIVER = 0,
|
||||
OS_THREAD_TYPE_IO = 1,
|
||||
OS_THREAD_TYPE_APP = 2
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
uint64_t
|
||||
OSGetTitleID(void);
|
||||
uint64_t OSGetTitleID(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ extern "C" {
|
|||
int
|
||||
__OSGetSavedAudioFlags();
|
||||
|
||||
int
|
||||
__OSGetTransitionAudioBuffer(void **buffer,
|
||||
int __OSGetTransitionAudioBuffer(void **buffer,
|
||||
uint32_t *size);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <gx2/semaphore.h>
|
||||
|
||||
/**
|
||||
* \defgroup dmae_sync Synchronization
|
||||
|
|
@ -15,12 +14,6 @@ extern "C" {
|
|||
//! Timestamp for a DMAE operation.
|
||||
typedef uint64_t DMAETimeStamp;
|
||||
|
||||
DMAETimeStamp
|
||||
DMAEGetLastSubmittedTimeStamp(void);
|
||||
|
||||
DMAETimeStamp
|
||||
DMAEGetRetiredTimeStamp(void);
|
||||
|
||||
/**
|
||||
* Waits for a DMAE operation to complete.
|
||||
*
|
||||
|
|
@ -33,16 +26,6 @@ DMAEGetRetiredTimeStamp(void);
|
|||
BOOL
|
||||
DMAEWaitDone(DMAETimeStamp timestamp);
|
||||
|
||||
uint32_t
|
||||
DMAEGetTimeout(void);
|
||||
|
||||
void
|
||||
DMAESetTimeout(uint32_t timeout);
|
||||
|
||||
void
|
||||
DMAESemaphore(GX2Semaphore *semaphore,
|
||||
GX2SemaphoreAction action);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,52 +17,30 @@ struct FSClient;
|
|||
namespace Rpl
|
||||
{
|
||||
|
||||
void
|
||||
ErrEulaSetVersion(int version);
|
||||
bool
|
||||
ErrEulaJump(const char *buffer, uint32_t bufferSize);
|
||||
void
|
||||
ErrEulaPlayAppearSE(bool playAppearSoundEffect);
|
||||
bool
|
||||
ErrEulaIsSelectCursorActive();
|
||||
void
|
||||
ErrEulaChangeLang(nn::erreula::LangType language);
|
||||
void
|
||||
ErrEulaDisappearHomeNixSign();
|
||||
bool
|
||||
ErrEulaIsAppearHomeNixSign();
|
||||
void
|
||||
ErrEulaAppearHomeNixSign(const nn::erreula::HomeNixSignArg &arg);
|
||||
void
|
||||
ErrEulaSetControllerRemo(nn::erreula::ControllerType controller);
|
||||
int32_t
|
||||
ErrEulaGetSelectButtonNumError();
|
||||
int32_t
|
||||
ErrEulaGetResultCode();
|
||||
nn::erreula::ResultType
|
||||
ErrEulaGetResultType();
|
||||
nn::erreula::State
|
||||
ErrEulaGetStateErrorViewer();
|
||||
bool
|
||||
ErrEulaIsDecideSelectRightButtonError();
|
||||
bool
|
||||
ErrEulaIsDecideSelectLeftButtonError();
|
||||
bool
|
||||
ErrEulaIsDecideSelectButtonError();
|
||||
void
|
||||
ErrEulaDisappearError();
|
||||
void
|
||||
ErrEulaAppearError(const nn::erreula::AppearArg &arg);
|
||||
void
|
||||
ErrEulaCalc(const nn::erreula::ControllerInfo &controllerInfo);
|
||||
void
|
||||
ErrEulaDrawDRC();
|
||||
void
|
||||
ErrEulaDrawTV();
|
||||
void
|
||||
ErrEulaDestroy();
|
||||
void
|
||||
ErrEulaCreate(void *workMemory, nn::erreula::RegionType region, nn::erreula::LangType language, FSClient *fsClient);
|
||||
void ErrEulaSetVersion(int version);
|
||||
bool ErrEulaJump(const char *buffer, uint32_t bufferSize);
|
||||
void ErrEulaPlayAppearSE(bool playAppearSoundEffect);
|
||||
bool ErrEulaIsSelectCursorActive();
|
||||
void ErrEulaChangeLang(nn::erreula::LangType language);
|
||||
void ErrEulaDisappearHomeNixSign();
|
||||
bool ErrEulaIsAppearHomeNixSign();
|
||||
void ErrEulaAppearHomeNixSign(const nn::erreula::HomeNixSignArg &arg);
|
||||
void ErrEulaSetControllerRemo(nn::erreula::ControllerType controller);
|
||||
int32_t ErrEulaGetSelectButtonNumError();
|
||||
int32_t ErrEulaGetResultCode();
|
||||
nn::erreula::ResultType ErrEulaGetResultType();
|
||||
nn::erreula::State ErrEulaGetStateErrorViewer();
|
||||
bool ErrEulaIsDecideSelectRightButtonError();
|
||||
bool ErrEulaIsDecideSelectLeftButtonError();
|
||||
bool ErrEulaIsDecideSelectButtonError();
|
||||
void ErrEulaDisappearError();
|
||||
void ErrEulaAppearError(const nn::erreula::AppearArg &arg);
|
||||
void ErrEulaCalc(const nn::erreula::ControllerInfo &controllerInfo);
|
||||
void ErrEulaDrawDRC();
|
||||
void ErrEulaDrawTV();
|
||||
void ErrEulaDestroy();
|
||||
void ErrEulaCreate(void *workMemory, nn::erreula::RegionType region,
|
||||
nn::erreula::LangType language, FSClient *fsClient);
|
||||
|
||||
} // namespace Rpl
|
||||
|
||||
|
|
|
|||
|
|
@ -348,12 +348,6 @@ typedef enum GX2ScanTarget
|
|||
|
||||
WUT_ENUM_BITMASK_TYPE(GX2ScanTarget)
|
||||
|
||||
typedef enum GX2SemaphoreAction
|
||||
{
|
||||
GX2_SEMAPHORE_ACTION_WAIT = 0,
|
||||
GX2_SEMAPHORE_ACTION_SIGNAL = 1,
|
||||
} GX2SemaphoreAction;
|
||||
|
||||
typedef enum GX2ShaderMode
|
||||
{
|
||||
GX2_SHADER_MODE_UNIFORM_REGISTER = 0,
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include "enum.h"
|
||||
|
||||
/**
|
||||
* \defgroup gx2_semaphore Semaphore
|
||||
* \ingroup gx2
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint64_t GX2Semaphore;
|
||||
|
||||
/**
|
||||
* Inserts a semaphore into the command stream.
|
||||
*
|
||||
* \param semaphore
|
||||
* Address of the semaphore. Must be aligned by \c 0x8.
|
||||
*
|
||||
* \param action
|
||||
* Semaphore operation to perform.
|
||||
*/
|
||||
void
|
||||
GX2SetSemaphore(GX2Semaphore *semaphore,
|
||||
GX2SemaphoreAction action);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <string.h>
|
||||
#include <wut.h>
|
||||
#include "enum.h"
|
||||
#include "gx2r/buffer.h"
|
||||
#include "sampler.h"
|
||||
#include "gx2r/buffer.h"
|
||||
|
||||
/**
|
||||
* \defgroup gx2_shader Shaders
|
||||
|
|
@ -427,12 +427,9 @@ GX2SetGeometryUniformBlock(uint32_t location,
|
|||
|
||||
void
|
||||
GX2SetShaderModeEx(GX2ShaderMode mode,
|
||||
uint32_t numVsGpr,
|
||||
uint32_t numVsStackEntries,
|
||||
uint32_t numGsGpr,
|
||||
uint32_t numGsStackEntries,
|
||||
uint32_t numPsGpr,
|
||||
uint32_t numPsStackEntries);
|
||||
uint32_t numVsGpr, uint32_t numVsStackEntries,
|
||||
uint32_t numGsGpr, uint32_t numGsStackEntries,
|
||||
uint32_t numPsGpr, uint32_t numPsStackEntries);
|
||||
|
||||
void
|
||||
GX2SetStreamOutEnable(BOOL enable);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <gx2r/resource.h>
|
||||
#include <wut.h>
|
||||
#include "enum.h"
|
||||
|
||||
/**
|
||||
|
|
@ -28,8 +28,7 @@ struct GX2Surface
|
|||
uint32_t mipLevels;
|
||||
GX2SurfaceFormat format;
|
||||
GX2AAMode aa;
|
||||
union
|
||||
{
|
||||
union {
|
||||
GX2SurfaceUse use;
|
||||
GX2RResourceFlags resourceFlags;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ H264DECSetParam_OUTPUT_PER_FRAME(void *memory,
|
|||
*/
|
||||
H264Error
|
||||
H264DECSetParam_USER_MEMORY(void *memory,
|
||||
void **value);
|
||||
void *value);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
/**
|
||||
* \defgroup h264_stream H264 Stream
|
||||
|
|
|
|||
|
|
@ -59,31 +59,23 @@ WUT_CHECK_SIZE(MICStatus, 0x0C);
|
|||
* The second parameter to MICInit is unused, any value is valid.
|
||||
*/
|
||||
MICHandle
|
||||
MICInit(MICInstance instance,
|
||||
int unused,
|
||||
MICWorkMemory *workMemory,
|
||||
MICInit(MICInstance instance, int unused, MICWorkMemory *workMemory,
|
||||
MICError *outError);
|
||||
|
||||
MICError
|
||||
MICOpen(MICHandle handle);
|
||||
|
||||
MICError
|
||||
MICGetState(MICHandle handle,
|
||||
int state,
|
||||
uint32_t *outStateVal);
|
||||
MICGetState(MICHandle handle, int state, uint32_t *outStateVal);
|
||||
|
||||
MICError
|
||||
MICSetState(MICHandle handle,
|
||||
int state,
|
||||
uint32_t stateVal);
|
||||
MICSetState(MICHandle handle, int state, uint32_t stateVal);
|
||||
|
||||
MICError
|
||||
MICGetStatus(MICHandle handle,
|
||||
MICStatus *outStatus);
|
||||
MICGetStatus(MICHandle handle, MICStatus *outStatus);
|
||||
|
||||
MICError
|
||||
MICSetDataConsumed(MICHandle handle,
|
||||
int dataAmountConsumed);
|
||||
MICSetDataConsumed(MICHandle handle, int dataAmountConsumed);
|
||||
|
||||
MICError
|
||||
MICClose(MICHandle handle);
|
||||
|
|
|
|||
|
|
@ -161,7 +161,8 @@ WUT_CHECK_SIZE(NFCReadT2TResult, 0x3A9);
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
void *userContext);
|
||||
|
||||
|
|
@ -177,7 +178,8 @@ typedef void (*NFCCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCTagDetectCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCTagDetectCallbackFn)(VPADChan chan,
|
||||
BOOL hasTag,
|
||||
void *userContext);
|
||||
|
||||
|
|
@ -205,7 +207,8 @@ typedef void (*NFCTagDetectCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCDetectCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCDetectCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
NFCUid *uid,
|
||||
BOOL readOnly,
|
||||
|
|
@ -231,7 +234,8 @@ typedef void (*NFCDetectCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCRawDataCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCRawDataCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
uint32_t responseSize,
|
||||
void *responseData,
|
||||
|
|
@ -258,7 +262,8 @@ typedef void (*NFCRawDataCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCRawDataTwiceCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCRawDataTwiceCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
uint8_t numCompleted,
|
||||
uint32_t response0Size,
|
||||
|
|
@ -297,7 +302,8 @@ typedef void (*NFCRawDataTwiceCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCReadCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCReadCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
NFCUid *uid,
|
||||
BOOL readOnly,
|
||||
|
|
@ -340,7 +346,8 @@ typedef void (*NFCReadCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCReadT2TCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCReadT2TCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
uint8_t rfDiscId,
|
||||
NFCProtocol protocol,
|
||||
|
|
@ -366,7 +373,8 @@ typedef void (*NFCReadT2TCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCGetTagInfoCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCGetTagInfoCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
NFCTagInfo *tagInfo,
|
||||
void *userContext);
|
||||
|
|
@ -389,7 +397,8 @@ typedef void (*NFCGetTagInfoCallbackFn)(VPADChan chan,
|
|||
* \param userContext
|
||||
* User provided value.
|
||||
*/
|
||||
typedef void (*NFCGetTagInfoMultiCallbackFn)(VPADChan chan,
|
||||
typedef void
|
||||
(*NFCGetTagInfoMultiCallbackFn)(VPADChan chan,
|
||||
NFCError error,
|
||||
uint8_t numTagInfos,
|
||||
NFCTagInfo *tagInfo0,
|
||||
|
|
@ -1146,7 +1155,6 @@ NFCSetReadOnly(VPADChan chan,
|
|||
* \return
|
||||
* 0 on success.
|
||||
*/
|
||||
// clang-format off
|
||||
NFCError
|
||||
NFCReadT2T(VPADChan chan,
|
||||
uint32_t discoveryTimeout,
|
||||
|
|
@ -1162,7 +1170,6 @@ NFCReadT2T(VPADChan chan,
|
|||
uint8_t authenticate,
|
||||
NFCReadT2TCallbackFn callback,
|
||||
void *userContext);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Write data to a Type 2 NTAG.
|
||||
|
|
@ -1224,7 +1231,6 @@ NFCReadT2T(VPADChan chan,
|
|||
* \return
|
||||
* 0 on success.
|
||||
*/
|
||||
// clang-format off
|
||||
NFCError
|
||||
NFCWriteT2T(VPADChan chan,
|
||||
uint16_t discoveryTimeout,
|
||||
|
|
@ -1241,7 +1247,6 @@ NFCWriteT2T(VPADChan chan,
|
|||
uint8_t authenticate, uint8_t activate,
|
||||
NFCCallbackFn callback,
|
||||
void *userContext);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Get the UID and other parameters from activation event data.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nsysnet/netconfig.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_ac_cpp Auto Connect C++ API
|
||||
|
|
@ -25,153 +24,61 @@ namespace ac
|
|||
* An ID number representing a network configuration. These are the same IDs as
|
||||
* shown in System Settings' Connection List.
|
||||
*/
|
||||
using ConfigIdNum = uint32_t;
|
||||
typedef uint32_t ConfigIdNum;
|
||||
|
||||
/**
|
||||
* The configuration for a given network profile (from 1 to 6).
|
||||
* \sa NetConfCfg
|
||||
* C++ linkage for the autoconnect API, see \link nn::ac \endlink for use.
|
||||
* Cafe provides mangled symbols for C++ APIs, so nn::ac is actually static
|
||||
* inline calls to the mangled symbols under nn::ac::detail.
|
||||
*/
|
||||
using Config = NetConfCfg;
|
||||
|
||||
using ErrorCode = uint32_t;
|
||||
|
||||
enum Status
|
||||
namespace detail
|
||||
{
|
||||
extern "C"
|
||||
{
|
||||
STATUS_FAILED = -1,
|
||||
STATUS_OK = 0,
|
||||
STATUS_PROCESSING = 1,
|
||||
};
|
||||
|
||||
nn::Result Initialize__Q2_2nn2acFv();
|
||||
void Finalize__Q2_2nn2acFv();
|
||||
nn::Result Connect__Q2_2nn2acFv();
|
||||
nn::Result ConnectAsync__Q2_2nn2acFv();
|
||||
nn::Result Close__Q2_2nn2acFv();
|
||||
nn::Result GetCloseStatus__Q2_2nn2acFPQ3_2nn2ac6Status();
|
||||
nn::Result GetStartupId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum(ConfigIdNum *id);
|
||||
nn::Result Connect__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum(ConfigIdNum id);
|
||||
nn::Result GetAssignedAddress__Q2_2nn2acFPUl(uint32_t *ip);
|
||||
|
||||
nn::Result
|
||||
BeginLocalConnection(bool unknown)
|
||||
asm("BeginLocalConnection__Q2_2nn2acFb");
|
||||
|
||||
void
|
||||
ClearConfig(Config *cfg)
|
||||
asm("ClearConfig__Q2_2nn2acFP16netconf_profile_");
|
||||
|
||||
nn::Result
|
||||
Close()
|
||||
asm("Close__Q2_2nn2acFv");
|
||||
|
||||
nn::Result
|
||||
CloseAll()
|
||||
asm("CloseAll__Q2_2nn2acFv");
|
||||
|
||||
nn::Result
|
||||
Connect(const Config *cfg)
|
||||
asm("Connect__Q2_2nn2acFPC16netconf_profile_");
|
||||
|
||||
nn::Result
|
||||
Connect(ConfigIdNum id)
|
||||
asm("Connect__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
Connect()
|
||||
asm("Connect__Q2_2nn2acFv");
|
||||
|
||||
nn::Result
|
||||
ConnectAsync(const Config *cfg)
|
||||
asm("ConnectAsync__Q2_2nn2acFPC16netconf_profile_");
|
||||
} // extern "C"
|
||||
} // namespace detail
|
||||
|
||||
/**
|
||||
* Connects to a network, using the configuration represented by the given
|
||||
* \link ConfigIdNum \endlink.
|
||||
*
|
||||
* \param id
|
||||
* The \link ConfigIdNum \endlink representing the network to connect to.
|
||||
* Initialise the Auto Connect library. Call this function before any other nn::ac
|
||||
* functions.
|
||||
*
|
||||
* \return
|
||||
* A \link nn::Result Result\endlink - see \link nn::Result::IsSuccess \endlink
|
||||
* and \link nn::Result::IsFailure \endlink.
|
||||
*
|
||||
* \sa
|
||||
* - \link Finalize \endlink
|
||||
*/
|
||||
nn::Result
|
||||
ConnectAsync(ConfigIdNum id)
|
||||
asm("ConnectAsync__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
ConnectAsync()
|
||||
asm("ConnectAsync__Q2_2nn2acFv");
|
||||
|
||||
nn::Result
|
||||
ConnectWithRetry()
|
||||
asm("ConnectWithRetry__Q2_2nn2acFv");
|
||||
|
||||
nn::Result
|
||||
DeleteConfig(ConfigIdNum id)
|
||||
asm("DeleteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
EndLocalConnection()
|
||||
asm("EndLocalConnection__Q2_2nn2acFv");
|
||||
static inline nn::Result
|
||||
Initialize()
|
||||
{
|
||||
return detail::Initialize__Q2_2nn2acFv();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up the Auto Connect library. Do not call any nn::ac functions (other
|
||||
* Cleanup the Auto Connect library. Do not call any nn::ac functions (other
|
||||
* than \link Initialize \endlink) after calling this function.
|
||||
*
|
||||
* \sa
|
||||
* - \link Initialize \endlink
|
||||
*/
|
||||
void
|
||||
static inline void
|
||||
Finalize()
|
||||
asm("Finalize__Q2_2nn2acFv");
|
||||
{
|
||||
return detail::Finalize__Q2_2nn2acFv();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the IP address assosciated with the currently active connection.
|
||||
*
|
||||
* \param ip
|
||||
* A pointer to write the IP address to, in
|
||||
* <a href="https://en.wikipedia.org/wiki/IPv4#Address_representations"
|
||||
* target="_blank">numerical</a> form.
|
||||
*
|
||||
* \return
|
||||
* A \link nn::Result Result\endlink - see \link nn::Result::IsSuccess \endlink
|
||||
* and \link nn::Result::IsFailure \endlink.
|
||||
*/
|
||||
nn::Result
|
||||
GetAssignedAddress(uint32_t *ip)
|
||||
asm("GetAssignedAddress__Q2_2nn2acFPUl");
|
||||
|
||||
nn::Result
|
||||
GetAssignedAlternativeDns(uint32_t *ip)
|
||||
asm("GetAssignedAlternativeDns__Q2_2nn2acFPUl");
|
||||
|
||||
nn::Result
|
||||
GetAssignedGateway(uint32_t *ip)
|
||||
asm("GetAssignedGateway__Q2_2nn2acFPUl");
|
||||
|
||||
nn::Result
|
||||
GetAssignedPreferedDns(uint32_t *ip)
|
||||
asm("GetAssignedPreferedDns__Q2_2nn2acFPUl");
|
||||
|
||||
nn::Result
|
||||
GetAssignedSubnet(uint32_t *ip)
|
||||
asm("GetAssignedSubnet__Q2_2nn2acFPUl");
|
||||
|
||||
nn::Result
|
||||
GetCloseStatus(Status *status)
|
||||
asm("GetCloseStatus__Q2_2nn2acFPQ3_2nn2ac6Status");
|
||||
|
||||
nn::Result
|
||||
GetCompatId(ConfigIdNum *id)
|
||||
asm("GetCompatId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
GetConnectResult(nn::Result *result)
|
||||
asm("GetConnectResult__Q2_2nn2acFPQ2_2nn6Result");
|
||||
|
||||
nn::Result
|
||||
GetConnectStatus(Status *status)
|
||||
asm("GetConnectStatus__Q2_2nn2acFPQ3_2nn2ac6Status");
|
||||
|
||||
nn::Result
|
||||
GetLastErrorCode(ErrorCode *error)
|
||||
asm("GetLastErrorCode__Q2_2nn2acFPUi");
|
||||
|
||||
nn::Result
|
||||
GetRunningConfig(Config *cfg)
|
||||
asm("GetRunningConfig__Q2_2nn2acFP16netconf_profile_");
|
||||
|
||||
/**
|
||||
* Gets the default connection configuration id. This is the default as marked
|
||||
|
|
@ -185,64 +92,70 @@ GetRunningConfig(Config *cfg)
|
|||
* A \link nn::Result Result\endlink - see \link nn::Result::IsSuccess \endlink
|
||||
* and \link nn::Result::IsFailure \endlink.
|
||||
*/
|
||||
nn::Result
|
||||
static inline nn::Result
|
||||
GetStartupId(ConfigIdNum *id)
|
||||
asm("GetStartupId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");
|
||||
{
|
||||
return detail::GetStartupId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum(id);
|
||||
}
|
||||
|
||||
static inline nn::Result
|
||||
Connect()
|
||||
{
|
||||
return detail::Connect__Q2_2nn2acFv();
|
||||
}
|
||||
|
||||
static inline nn::Result
|
||||
ConnectAsync()
|
||||
{
|
||||
return detail::ConnectAsync__Q2_2nn2acFv();
|
||||
}
|
||||
|
||||
static inline nn::Result
|
||||
Close()
|
||||
{
|
||||
return detail::Close__Q2_2nn2acFv();
|
||||
}
|
||||
|
||||
static inline nn::Result
|
||||
GetCloseStatus()
|
||||
{
|
||||
return detail::GetCloseStatus__Q2_2nn2acFPQ3_2nn2ac6Status();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the Auto Connect library. Call this function before any other nn::ac
|
||||
* functions.
|
||||
* Connects to a network, using the configuration represented by the given
|
||||
* \link ConfigIdNum \endlink.
|
||||
*
|
||||
* \param id
|
||||
* The \link ConfigIdNum \endlink representing the network to connect to.
|
||||
*
|
||||
* \return
|
||||
* A \link nn::Result Result\endlink - see \link nn::Result::IsSuccess \endlink
|
||||
* and \link nn::Result::IsFailure \endlink.
|
||||
*
|
||||
* \sa
|
||||
* - \link Finalize \endlink
|
||||
*/
|
||||
nn::Result
|
||||
Initialize()
|
||||
asm("Initialize__Q2_2nn2acFv");
|
||||
static inline nn::Result
|
||||
Connect(ConfigIdNum id)
|
||||
{
|
||||
return detail::Connect__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum(id);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
IsAnyKeepingConnect(bool keeping)
|
||||
asm("IsAnyKeepingConnect__Q2_2nn2acFPb");
|
||||
|
||||
nn::Result
|
||||
IsApplicationConnected(bool *connected)
|
||||
asm("IsApplicationConnected__Q2_2nn2acFPb");
|
||||
|
||||
nn::Result
|
||||
IsAutoConnectionFatallyFailed(nn::Result *failed)
|
||||
asm("IsAutoConnectionFatallyFailed__Q2_2nn2acFQ2_2nn6Result");
|
||||
|
||||
nn::Result
|
||||
IsConfigExisting(ConfigIdNum id, bool *existing)
|
||||
asm("IsConfigExisting__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPb");
|
||||
|
||||
nn::Result
|
||||
IsKeepingConnect(bool *keeping)
|
||||
asm("IsKeepingConnect__Q2_2nn2acFPb");
|
||||
|
||||
nn::Result
|
||||
IsReadyToConnect(bool *ready)
|
||||
asm("IsReadyToConnect__Q2_2nn2acFPb");
|
||||
|
||||
nn::Result
|
||||
ReadConfig(ConfigIdNum id, Config *cfg)
|
||||
asm("ReadConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumP16netconf_profile_");
|
||||
|
||||
nn::Result
|
||||
SetCompatId(ConfigIdNum id)
|
||||
asm("SetCompatId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
SetStartupId(ConfigIdNum id)
|
||||
asm("SetStartupId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
|
||||
|
||||
nn::Result
|
||||
WriteConfig(ConfigIdNum id, const Config *cfg)
|
||||
asm("WriteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPC16netconf_profile_");
|
||||
/**
|
||||
* Gets the IP address assosciated with the currently active connection.
|
||||
*
|
||||
* \param ip
|
||||
* A pointer to write the IP address to, in
|
||||
* <a href="https://en.wikipedia.org/wiki/IPv4#Address_representations"
|
||||
* target="_blank">numerical</a> form.
|
||||
*
|
||||
* \return
|
||||
* A \link nn::Result Result\endlink - see \link nn::Result::IsSuccess \endlink
|
||||
* and \link nn::Result::IsFailure \endlink.
|
||||
*/
|
||||
static inline nn::Result
|
||||
GetAssignedAddress(uint32_t *ip)
|
||||
{
|
||||
return detail::GetAssignedAddress__Q2_2nn2acFPUl(ip);
|
||||
}
|
||||
|
||||
} // namespace ac
|
||||
} // namespace nn
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include <nn/acp/client.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <nn/acp/drcled_c.h>
|
||||
#include <nn/acp/drcled_cpp.h>
|
||||
#include <nn/acp/result.h>
|
||||
#include <nn/acp/save.h>
|
||||
#include <nn/acp/title.h>
|
||||
#include <nn/acp/drcled_c.h>
|
||||
#include <nn/acp/drcled_cpp.h>
|
||||
|
|
|
|||
|
|
@ -12,15 +12,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum ACPDeviceType
|
||||
{
|
||||
ACP_DEVICE_TYPE_AUTO = 1,
|
||||
ACP_DEVICE_TYPE_ODD = 2,
|
||||
ACP_DEVICE_TYPE_HFIODISC = 2, /* when ApplicationDevice is emulated */
|
||||
ACP_DEVICE_TYPE_MLC = 3,
|
||||
ACP_DEVICE_TYPE_HFIOMLC = 3, /* when ApplicationDevice is emulated */
|
||||
ACP_DEVICE_TYPE_USB = 4,
|
||||
} ACPDeviceType;
|
||||
typedef int32_t ACPDeviceType;
|
||||
|
||||
ACPResult
|
||||
ACPCheckApplicationDeviceEmulation(BOOL* emulation);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <nn/acp/result.h>
|
||||
#include <nn/acp/device.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <nn/acp/result.h>
|
||||
#include <nn/acp/device.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace acp
|
||||
{
|
||||
namespace acp {
|
||||
|
||||
typedef uint8_t DrcLedStatus;
|
||||
typedef uint32_t DrcLedPattern;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
typedef enum ACPResult
|
||||
{
|
||||
typedef enum ACPResult {
|
||||
ACP_RESULT_SUCCESS = 0,
|
||||
|
||||
ACP_RESULT_INVALID = -200,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <nn/acp/result.h>
|
||||
#include <nn/acp/device.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_acp_save Save
|
||||
|
|
@ -15,21 +15,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint64_t ACPTitleId;
|
||||
typedef struct ACPSaveDirInfo ACPSaveDirInfo;
|
||||
|
||||
struct WUT_PACKED ACPSaveDirInfo
|
||||
{
|
||||
WUT_UNKNOWN_BYTES(0x8);
|
||||
uint32_t persistentId;
|
||||
WUT_UNKNOWN_BYTES(0x14);
|
||||
char path[0x40];
|
||||
WUT_PADDING_BYTES(0x80 - 0x60);
|
||||
};
|
||||
WUT_CHECK_OFFSET(ACPSaveDirInfo, 0x08, persistentId);
|
||||
WUT_CHECK_OFFSET(ACPSaveDirInfo, 0x20, path);
|
||||
WUT_CHECK_SIZE(ACPSaveDirInfo, 0x80);
|
||||
|
||||
ACPResult
|
||||
ACPCreateSaveDir(uint32_t persistentId,
|
||||
ACPDeviceType deviceType);
|
||||
|
|
@ -43,48 +28,6 @@ ACPMountExternalStorage();
|
|||
ACPResult
|
||||
ACPMountSaveDir();
|
||||
|
||||
/**
|
||||
* Deletes the given user's save data directory for the given title.
|
||||
*
|
||||
* \param persistentId
|
||||
* The persistent ID of the user. Pass \c 0 to delete the 'common' directory.
|
||||
*
|
||||
* \return
|
||||
* ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPRemoveSaveDir(uint32_t persistentId,
|
||||
uint64_t titleId,
|
||||
ACPDeviceType deviceType);
|
||||
|
||||
/**
|
||||
* Deletes the given user's save data directory for the given title.
|
||||
*
|
||||
* \param persistentId
|
||||
* The persistent ID of the user. Pass \c 0 to delete the 'common' directory.
|
||||
*
|
||||
* \return
|
||||
* ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPRemoveSaveDirWithoutFlush(uint32_t persistentId,
|
||||
uint64_t titleId,
|
||||
ACPDeviceType deviceType);
|
||||
|
||||
/**
|
||||
* Deletes the given user's save data directory for the given title.
|
||||
*
|
||||
* \param persistentId
|
||||
* The persistent ID of the user. Pass \c 0 to delete the 'common' directory.
|
||||
*
|
||||
* \return
|
||||
* ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPRemoveSaveDirWithoutMetaCheck(uint32_t persistentId,
|
||||
uint64_t titleId,
|
||||
ACPDeviceType deviceType);
|
||||
|
||||
ACPResult
|
||||
ACPRepairSaveMetaDir();
|
||||
|
||||
|
|
@ -94,59 +37,6 @@ ACPUnmountExternalStorage();
|
|||
ACPResult
|
||||
ACPUnmountSaveDir();
|
||||
|
||||
/**
|
||||
* Gets all titles id which have save data
|
||||
*
|
||||
* @param deviceType
|
||||
* @param titlesOut needs to be aligned to 0x40
|
||||
* @param maxCount needs to be a multiple of 8
|
||||
* @param countOut
|
||||
* @return ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPGetSaveDataTitleIdList(ACPDeviceType deviceType,
|
||||
uint64_t *titlesOut,
|
||||
uint32_t maxCount,
|
||||
uint32_t *countOut);
|
||||
|
||||
/**
|
||||
* Gets a list of all saves dir for a given title id
|
||||
*
|
||||
* @param titleId
|
||||
* @param deviceType
|
||||
* @param u1 seems to be always 0
|
||||
* @param saveDirInfo needs to be aligned to 0x40
|
||||
* @param maxCount
|
||||
* @param countOut
|
||||
* @return ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPGetTitleSaveDirEx(uint64_t titleId,
|
||||
ACPDeviceType deviceType,
|
||||
uint32_t u1,
|
||||
ACPSaveDirInfo *saveDirInfo,
|
||||
uint32_t maxCount,
|
||||
uint32_t *countOut);
|
||||
|
||||
/**
|
||||
* Gets a list of all saves dir for a given title id
|
||||
*
|
||||
* @param titleId
|
||||
* @param deviceType
|
||||
* @param u1 seems to be always 0
|
||||
* @param saveDirInfo needs to be aligned to 0x40
|
||||
* @param maxCount
|
||||
* @param countOut
|
||||
* @return ACP_RESULT_SUCCESS on success.
|
||||
*/
|
||||
ACPResult
|
||||
ACPGetTitleSaveDirExWithoutMetaCheck(uint64_t titleId,
|
||||
ACPDeviceType deviceType,
|
||||
uint32_t u1,
|
||||
ACPSaveDirInfo *saveDirInfo,
|
||||
uint32_t maxCount,
|
||||
uint32_t *countOut);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/mcp.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <nn/acp/result.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <coreinit/mcp.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_acp_title Title
|
||||
|
|
@ -20,8 +20,7 @@ extern "C" {
|
|||
typedef uint64_t ACPTitleId;
|
||||
typedef struct ACPMetaXml ACPMetaXml;
|
||||
|
||||
struct WUT_PACKED ACPMetaXml
|
||||
{
|
||||
struct WUT_PACKED ACPMetaXml {
|
||||
uint64_t title_id;
|
||||
uint64_t boss_id;
|
||||
uint64_t os_version;
|
||||
|
|
@ -250,11 +249,9 @@ ACPGetTitleIdOfMainApplication(ACPTitleId *titleId);
|
|||
* @param metaXml must be aligned to 0x40
|
||||
* @return ACP_RESULT_SUCCESS on success
|
||||
*/
|
||||
// clang-format off
|
||||
ACPResult
|
||||
RPLWRAP(ACPGetTitleMetaXml)(ACPTitleId titleId,
|
||||
ACPMetaXml *metaXml);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Gets the MetaXML for a given title id
|
||||
|
|
@ -265,40 +262,13 @@ RPLWRAP(ACPGetTitleMetaXml)(ACPTitleId titleId,
|
|||
*/
|
||||
static inline ACPResult
|
||||
ACPGetTitleMetaXml(ACPTitleId titleId,
|
||||
ACPMetaXml *metaXml)
|
||||
{
|
||||
ACPMetaXml *metaXml) {
|
||||
if ((uintptr_t) metaXml & 0x3F) {
|
||||
return ACP_RESULT_INVALID_PARAMETER;
|
||||
}
|
||||
return RPLWRAP(ACPGetTitleMetaXml)(titleId, metaXml);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
ACPResult
|
||||
RPLWRAP(ACPGetTitleSaveMetaXml)(uint64_t titleId,
|
||||
ACPMetaXml* metaXml,
|
||||
ACPDeviceType deviceType);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Gets the save dir MetaXML for a given title id
|
||||
* @param titleId
|
||||
* @param metaXml must be aligned to 0x40
|
||||
* @param deviceType
|
||||
* @return ACP_RESULT_SUCCESS on success,
|
||||
* ACP_RESULT_INVALID_PARAMETER if metaXml is not aligned properly
|
||||
*/
|
||||
static inline ACPResult
|
||||
ACPGetTitleSaveMetaXml(ACPTitleId titleId,
|
||||
ACPMetaXml *metaXml,
|
||||
ACPDeviceType deviceType)
|
||||
{
|
||||
if ((uintptr_t)metaXml & 0x3F) {
|
||||
return ACP_RESULT_INVALID_PARAMETER;
|
||||
}
|
||||
return RPLWRAP(ACPGetTitleSaveMetaXml)(titleId, metaXml, deviceType);
|
||||
}
|
||||
|
||||
ACPResult
|
||||
ACPGetTitleMetaDir(ACPTitleId titleId,
|
||||
char *directory,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_act_client Accounts Client API
|
||||
|
|
@ -12,11 +12,9 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace act
|
||||
{
|
||||
namespace act {
|
||||
|
||||
//https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/nn/act/nn_act_types.h
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,6 @@ typedef enum CCRSysInitBootFlag
|
|||
CCR_SYS_BOOT_FLAG_FIRST_BOOT = 1,
|
||||
} CCRSysInitBootFlag;
|
||||
|
||||
typedef enum CCRSysLCDMode
|
||||
{
|
||||
CCR_SYS_LCD_MODE_BRIGHTNESS_1 = 1,
|
||||
CCR_SYS_LCD_MODE_BRIGHTNESS_2 = 2,
|
||||
CCR_SYS_LCD_MODE_BRIGHTNESS_3 = 3,
|
||||
CCR_SYS_LCD_MODE_BRIGHTNESS_4 = 4,
|
||||
CCR_SYS_LCD_MODE_BRIGHTNESS_5 = 5,
|
||||
} CCRSysLCDMode;
|
||||
|
||||
struct CCRSysUpdateState
|
||||
{
|
||||
uint32_t state;
|
||||
|
|
@ -295,20 +286,6 @@ CCRSysSetInitBootFlag(CCRSysInitBootFlag flag);
|
|||
int32_t
|
||||
CCRSysInitializeSettings();
|
||||
|
||||
/**
|
||||
* Sets the brightness of the DRC.
|
||||
* @return 0 on success, -1 on error.
|
||||
*/
|
||||
int32_t
|
||||
CCRSysSetCurrentLCDMode(CCRSysLCDMode mode);
|
||||
|
||||
/**
|
||||
* Gets the brightness of the DRC.
|
||||
* @return 0 on success, -1 on error.
|
||||
*/
|
||||
int32_t
|
||||
CCRSysGetCurrentLCDMode(CCRSysLCDMode *mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,18 +4,14 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
namespace cfg {
|
||||
|
||||
namespace CTR
|
||||
{
|
||||
namespace CTR {
|
||||
|
||||
//! Represents a console username, used in UDS and DLP
|
||||
struct UserName
|
||||
{
|
||||
struct UserName {
|
||||
char16_t name[12];
|
||||
};
|
||||
WUT_CHECK_SIZE(UserName, 0x18);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum CmptScreenType
|
||||
{
|
||||
typedef enum CmptScreenType {
|
||||
CMPT_SCREEN_TYPE_TV = 1,
|
||||
CMPT_SCREEN_TYPE_DRC,
|
||||
CMPT_SCREEN_TYPE_BOTH,
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* \defgroup nn_dlp nn_dlp
|
||||
* Download Play functions
|
||||
*/
|
||||
|
||||
#include <nn/dlp/Cafe.h>
|
||||
|
|
@ -1,359 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/cfg/CTR.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/uds/NodeInformation.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_dlp nn_dlp
|
||||
* \ingroup nn_dlp
|
||||
* Download Play functions (see \link nn::dlp \endlink)
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
|
||||
namespace dlp
|
||||
{
|
||||
|
||||
namespace Cafe
|
||||
{
|
||||
enum PollStateChangeFlags : uint8_t
|
||||
{
|
||||
//! Prevents \c PollStateChange from blocking if no new data is available
|
||||
DLP_POLL_NONBLOCK = 1 << 0,
|
||||
};
|
||||
WUT_CHECK_SIZE(PollStateChangeFlags, 0x1);
|
||||
|
||||
//! Represents the client state
|
||||
enum class ClientState : uint32_t
|
||||
{
|
||||
//! The client is accepted for the DLP child distribution
|
||||
Accepted = 5,
|
||||
//! The client is receiving the distributed DLP child
|
||||
Receiving = 6,
|
||||
//! The client has received the distribution and is ready to boot the DLP child
|
||||
Ready = 7,
|
||||
//! The client is connected to the session and pending to be accepted
|
||||
Connecting = 64
|
||||
};
|
||||
WUT_CHECK_SIZE(ClientState, 0x4);
|
||||
|
||||
//! Represents the server state. All values between 3 and 7 are considered internal state
|
||||
enum class ServerState : uint32_t
|
||||
{
|
||||
//! The server is not initialized
|
||||
Uninitialized = 0,
|
||||
//! The server is initialized but there is no active network
|
||||
Idle = 1,
|
||||
//! The server is open to new connections
|
||||
Open = 2,
|
||||
//! The server is distributing the DLP child to the clients
|
||||
DistributingInternal = 7,
|
||||
//! The server has distributed the DLP child
|
||||
Distributed = 8,
|
||||
//! The server has finished distribution and clients are booted into the DLP child
|
||||
Finished = 9,
|
||||
//! The server failed to distribute the DLP child to the clients
|
||||
Failed = 10,
|
||||
//! Public value for internal states
|
||||
Distributing = 11
|
||||
};
|
||||
WUT_CHECK_SIZE(ServerState, 0x4);
|
||||
|
||||
class Server
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Accepts a client into the DLP child distribution.
|
||||
*
|
||||
* \param nodeId
|
||||
* The node ID of the client.
|
||||
*/
|
||||
static nn::Result
|
||||
AcceptClient(uint16_t nodeId)
|
||||
asm("AcceptClient__Q4_2nn3dlp4Cafe6ServerSFUs");
|
||||
|
||||
/**
|
||||
* Closes the DLP session.
|
||||
*/
|
||||
static nn::Result
|
||||
CloseSessions()
|
||||
asm("CloseSessions__Q4_2nn3dlp4Cafe6ServerSFv");
|
||||
|
||||
/**
|
||||
* Disconnects a client from the DLP session. This cannot be done after starting distribution.
|
||||
*
|
||||
* \param nodeId
|
||||
* The node ID of the client.
|
||||
*/
|
||||
static nn::Result
|
||||
DisconnectClient(uint16_t nodeId)
|
||||
asm("DisconnectClient__Q4_2nn3dlp4Cafe6ServerSFUs");
|
||||
|
||||
/**
|
||||
* Finalizes DLP.
|
||||
*/
|
||||
static nn::Result
|
||||
Finalize()
|
||||
asm("Finalize__Q4_2nn3dlp4Cafe6ServerSFv");
|
||||
|
||||
/**
|
||||
* Gets information about a client.
|
||||
*
|
||||
* \param clientInfo
|
||||
* Pointer where the client information is written.
|
||||
*
|
||||
* \param nodeId
|
||||
* Node ID of the client.
|
||||
*/
|
||||
static nn::Result
|
||||
GetClientInfo(nn::uds::Cafe::NodeInformation *clientInfo, uint16_t nodeId)
|
||||
asm("GetClientInfo__Q4_2nn3dlp4Cafe6ServerSFPQ4_2nn3uds4Cafe15NodeInformationUs");
|
||||
|
||||
/**
|
||||
* Gets a client state.
|
||||
*
|
||||
* \param state
|
||||
* Pointer where the client state is filled in.
|
||||
*
|
||||
* \param nodeId
|
||||
* Node ID of the client.
|
||||
*/
|
||||
static nn::Result
|
||||
GetClientState(ClientState *state, uint16_t nodeId)
|
||||
asm("GetClientState__Q4_2nn3dlp4Cafe6ServerSFPQ4_2nn3dlp4Cafe11ClientStateUs");
|
||||
|
||||
/**
|
||||
* Gets a client state.
|
||||
*
|
||||
* \param state
|
||||
* Pointer where the client state is filled in.
|
||||
*
|
||||
* \param unitsTotal
|
||||
* Pointer filled with the total number of units being distributed.
|
||||
* Only filled when starting distribution and the DLP child isn't cached.
|
||||
*
|
||||
* \param unitsReceived
|
||||
* Pointer filled with the number of units that the client has received.
|
||||
* Only filled when starting distribution and the DLP child isn't cached.
|
||||
*
|
||||
* \param nodeId
|
||||
* Node ID of the client.
|
||||
*/
|
||||
static nn::Result
|
||||
GetClientState(ClientState *state,
|
||||
uint32_t *unitsTotal,
|
||||
uint32_t *unitsReceived,
|
||||
uint16_t nodeId)
|
||||
asm("GetClientState__Q4_2nn3dlp4Cafe6ServerSFPQ4_2nn3dlp4Cafe11ClientStatePUiT2Us");
|
||||
|
||||
/**
|
||||
* Gets the clients that are connected to the DLP session.
|
||||
*
|
||||
* \param receivedLength
|
||||
* Pointer where the number of clients written to the array is stored.
|
||||
*
|
||||
* \param connectingClients
|
||||
* Array where the node IDs of the clients are written.
|
||||
*
|
||||
* \param length
|
||||
* Number of nodes that the \c connectingClients array can hold.
|
||||
*/
|
||||
static nn::Result
|
||||
GetConnectingClients(uint16_t *receivedLength,
|
||||
uint16_t *connectingClients,
|
||||
uint16_t length)
|
||||
asm("GetConnectingClients__Q4_2nn3dlp4Cafe6ServerSFPUsT1Us");
|
||||
|
||||
/**
|
||||
* Gets the server state. Internal states are filtered as \link Distributing \endlink .
|
||||
*
|
||||
* \param state
|
||||
* Pointer where the server state is written.
|
||||
*/
|
||||
static nn::Result
|
||||
GetState(ServerState *state)
|
||||
asm("GetState__Q4_2nn3dlp4Cafe6ServerSFPQ4_2nn3dlp4Cafe11ServerState");
|
||||
|
||||
/**
|
||||
* Initializes DLP.
|
||||
*
|
||||
* \param maxClientNum
|
||||
* Maximum number of clients allowed for distribution. Must be between 1 and 8 inclusively.
|
||||
*
|
||||
* \param uniqueId
|
||||
* Unique ID of the DLP child to be distributed.
|
||||
*
|
||||
* \param childIndex
|
||||
* Index of the DLP child to be distributed.
|
||||
*
|
||||
* \param userName
|
||||
* Username that will be displayed to the clients. If \c NULL, the Mii name will be used.
|
||||
*/
|
||||
static nn::Result
|
||||
Initialize(uint8_t maxClientNum,
|
||||
uint32_t uniqueId,
|
||||
uint8_t childIndex,
|
||||
nn::cfg::CTR::UserName *userName)
|
||||
asm("Initialize__Q4_2nn3dlp4Cafe6ServerSFUcUiT1PQ4_2nn3cfg3CTR8UserName");
|
||||
|
||||
/**
|
||||
* Initializes DLP.
|
||||
*
|
||||
* \param dupNoticeNeed
|
||||
* Unknown output bool, always false on the Wii U.
|
||||
*
|
||||
* \param maxClientNum
|
||||
* Maximum number of clients allowed for distribution. Must be between 1 and 8 inclusively.
|
||||
*
|
||||
* \param uniqueId
|
||||
* Unique ID of the DLP child to be distributed.
|
||||
*
|
||||
* \param childIndex
|
||||
* Index of the DLP child to be distributed.
|
||||
*
|
||||
* \param userName
|
||||
* Username that will be displayed to the clients. If \c NULL, the Mii name will be used.
|
||||
*/
|
||||
static nn::Result
|
||||
Initialize(bool *dupNoticeNeed,
|
||||
uint8_t maxClientNum,
|
||||
uint32_t uniqueId,
|
||||
uint8_t childIndex,
|
||||
nn::cfg::CTR::UserName *userName)
|
||||
asm("Initialize__Q4_2nn3dlp4Cafe6ServerSFPbUcUiT2PQ4_2nn3cfg3CTR8UserName");
|
||||
|
||||
/**
|
||||
* Opens the DLP session.
|
||||
*
|
||||
* \param isManualAccept
|
||||
* If set, all clients must be accepted to allow them to join the session.
|
||||
*
|
||||
* \param channel
|
||||
* The channel to be used for hosting the session. Use 0 to choose a channel automatically.
|
||||
* Must be either 0, 1, 6 or 11.
|
||||
*/
|
||||
static nn::Result
|
||||
OpenSessions(bool isManualAccept, uint8_t channel)
|
||||
asm("OpenSessions__Q4_2nn3dlp4Cafe6ServerSFbUc");
|
||||
|
||||
/**
|
||||
* Checks if the server state chas changed, and waits until it changes if specified.
|
||||
*
|
||||
* \param flags
|
||||
* Flags, see \link PollStateChangeFlags \endlink for all flags.
|
||||
*/
|
||||
static nn::Result
|
||||
PollStateChange(uint8_t flags)
|
||||
asm("PollStateChange__Q4_2nn3dlp4Cafe6ServerSFUc");
|
||||
|
||||
/**
|
||||
* Reboots all clients into the Download Play child.
|
||||
*
|
||||
* \param passPhrase
|
||||
* Passphrase to be used by the client when connecting to the main UDS network.
|
||||
* If \c NULL, it will be set to an empty string.
|
||||
*/
|
||||
static nn::Result
|
||||
RebootAllClients(const char *passPhrase)
|
||||
asm("RebootAllClients__Q4_2nn3dlp4Cafe6ServerSFPCc");
|
||||
|
||||
/**
|
||||
* Starts distribution of the Download Play child.
|
||||
*/
|
||||
static nn::Result
|
||||
StartDistribution()
|
||||
asm("StartDistribute__Q4_2nn3dlp4Cafe6ServerSFv");
|
||||
};
|
||||
|
||||
class ServerPrivate
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Gets the server state. Internal states are not filtered.
|
||||
*
|
||||
* \param state
|
||||
* Pointer where the server state is written.
|
||||
*/
|
||||
static nn::Result
|
||||
GetInternalState(ServerState *state)
|
||||
asm("GetInternalState__Q4_2nn3dlp4Cafe13ServerPrivateSFPQ4_2nn3dlp4Cafe11ServerState");
|
||||
|
||||
/**
|
||||
* Initializes DLP.
|
||||
*
|
||||
* \param maxClientNum
|
||||
* Maximum number of clients allowed for distribution. Must be between 1 and 8 inclusively.
|
||||
*
|
||||
* \param uniqueId
|
||||
* Unique ID of the DLP child to be distributed.
|
||||
*
|
||||
* \param childIndex
|
||||
* Index of the DLP child to be distributed.
|
||||
*
|
||||
* \param blockBufferSize
|
||||
* Unknown parameter (default: 0xC000). Must be bigger than 0x4000 and smaller than 0x80000 inclusively.
|
||||
*
|
||||
* \param blockBufferNum
|
||||
* Unknown parameter (default: 2). Must be a number between 2 and 4 inclusively.
|
||||
*
|
||||
* \param userName
|
||||
* Username that will be displayed to the clients. If \c NULL, the Mii name will be used.
|
||||
*/
|
||||
static nn::Result
|
||||
Initialize(uint8_t maxClientNum,
|
||||
uint32_t uniqueId,
|
||||
uint8_t childIndex,
|
||||
uint32_t blockBufferSize,
|
||||
uint32_t blockBufferNum,
|
||||
nn::cfg::CTR::UserName *userName)
|
||||
asm("Initialize__Q4_2nn3dlp4Cafe13ServerPrivateSFUcUiT1N22PQ4_2nn3cfg3CTR8UserName");
|
||||
|
||||
/**
|
||||
* Initializes DLP.
|
||||
*
|
||||
* \param dupNoticeNeed
|
||||
* Unknown output bool, always false on the Wii U.
|
||||
*
|
||||
* \param maxClientNum
|
||||
* Maximum number of clients allowed for distribution. Must be between 1 and 8 inclusively.
|
||||
*
|
||||
* \param uniqueId
|
||||
* Unique ID of the DLP child to be distributed.
|
||||
*
|
||||
* \param childIndex
|
||||
* Index of the DLP child to be distributed.
|
||||
*
|
||||
* \param blockBufferSize
|
||||
* Unknown parameter (default: 0xC000). Must be bigger than 0x4000 and smaller than 0x80000 inclusively.
|
||||
*
|
||||
* \param blockBufferNum
|
||||
* Unknown parameter (default: 2). Must be a number between 2 and 4 inclusively.
|
||||
*
|
||||
* \param userName
|
||||
* Username that will be displayed to the clients. If \c NULL, the Mii name will be used.
|
||||
*/
|
||||
static nn::Result
|
||||
Initialize(bool *dupNoticeNeed,
|
||||
uint8_t maxClientNum,
|
||||
uint32_t uniqueId,
|
||||
uint8_t childIndex,
|
||||
uint32_t blockBufferSize,
|
||||
uint32_t blockBufferNum,
|
||||
nn::cfg::CTR::UserName *userName)
|
||||
asm("Initialize__Q4_2nn3dlp4Cafe13ServerPrivateSFPbUcUiT2N23PQ4_2nn3cfg3CTR8UserName");
|
||||
};
|
||||
} // namespace Cafe
|
||||
|
||||
} // namespace dlp
|
||||
|
||||
} // namespace nn
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
#include <coreinit/filesystem.h>
|
||||
#include <nn/result.h>
|
||||
#include <padscore/kpad.h>
|
||||
#include <string.h>
|
||||
#include <vpad/input.h>
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_erreula_erreula Error Viewer
|
||||
|
|
|
|||
|
|
@ -14,15 +14,13 @@ extern "C" {
|
|||
|
||||
// https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/nn/ffl/nn_ffl_miidata.h
|
||||
|
||||
typedef enum FFLCreateIDFlags
|
||||
{
|
||||
typedef enum FFLCreateIDFlags {
|
||||
FFL_CREATE_ID_FLAG_WII_U = 0x1 | 0x4,
|
||||
FFL_CREATE_ID_FLAG_TEMPORARY = 0x2,
|
||||
FFL_CREATE_ID_FLAG_NORMAL = 0x8,
|
||||
} FFLCreateIDFlags;
|
||||
|
||||
typedef struct WUT_PACKED FFLCreateID
|
||||
{
|
||||
typedef struct WUT_PACKED FFLCreateID {
|
||||
FFLCreateIDFlags flags : 4;
|
||||
|
||||
uint32_t timestamp : 28;
|
||||
|
|
@ -33,8 +31,7 @@ WUT_CHECK_OFFSET(FFLCreateID, 4, deviceHash);
|
|||
WUT_CHECK_SIZE(FFLCreateID, 10);
|
||||
|
||||
//Note: the endian may be wrong here
|
||||
typedef struct WUT_PACKED FFLiMiiDataCore
|
||||
{
|
||||
typedef struct WUT_PACKED FFLiMiiDataCore {
|
||||
// 0x00
|
||||
uint8_t birth_platform : 4;
|
||||
uint8_t unk_0x00_b4 : 4;
|
||||
|
|
@ -153,16 +150,14 @@ WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x2F, fatness);
|
|||
WUT_CHECK_OFFSET(FFLiMiiDataCore, 0x33, hair_type);
|
||||
WUT_CHECK_SIZE(FFLiMiiDataCore, 0x48);
|
||||
|
||||
typedef struct WUT_PACKED FFLiMiiDataOfficial
|
||||
{
|
||||
typedef struct WUT_PACKED FFLiMiiDataOfficial {
|
||||
FFLiMiiDataCore core;
|
||||
uint16_t creator_name[10];
|
||||
} FFLiMiiDataOfficial;
|
||||
WUT_CHECK_OFFSET(FFLiMiiDataOfficial, 0x48, creator_name);
|
||||
WUT_CHECK_SIZE(FFLiMiiDataOfficial, 0x5C);
|
||||
|
||||
typedef struct WUT_PACKED FFLStoreData
|
||||
{
|
||||
typedef struct WUT_PACKED FFLStoreData {
|
||||
FFLiMiiDataOfficial data;
|
||||
uint16_t unk_0x5C;
|
||||
uint16_t checksum;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <nn/act.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
#include <nn/act.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_fp_fp Friends Presence
|
||||
|
|
|
|||
|
|
@ -176,12 +176,10 @@ HPADShutdown(void);
|
|||
* \return
|
||||
* The amount of buffers read or a negative value on error.
|
||||
*/
|
||||
// clang-format off
|
||||
int32_t
|
||||
RPLWRAP(HPADRead)(HPADChan chan,
|
||||
HPADStatus *buffers,
|
||||
int32_t count);
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Reads status buffers from a specified HPAD channel.
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
* \defgroup nn_idb nn_idb
|
||||
*/
|
||||
|
||||
#include <nn/idb/IDBReader.h>
|
||||
#include <nn/idb/idb_cpp.h>
|
||||
#include <nn/idb/IDBReader.h>
|
||||
|
|
|
|||
|
|
@ -57,13 +57,11 @@ somemopt(SOMemOptRequest request,
|
|||
uint32_t size,
|
||||
SOMemOptFlags flags);
|
||||
|
||||
// clang-format off
|
||||
int
|
||||
RPLWRAP(somemopt)(SOMemOptRequest request,
|
||||
void *buffer,
|
||||
uint32_t size,
|
||||
SOMemOptFlags flags);
|
||||
// clang-format on
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
* Nintendo Figurine (amiibo) Platform library.
|
||||
*/
|
||||
|
||||
#include <nn/nfp/amiibo_settings_cpp.h>
|
||||
#include <nn/nfp/nfp_cpp.h>
|
||||
#include <nn/nfp/amiibo_settings_cpp.h>
|
||||
|
|
|
|||
|
|
@ -12,11 +12,9 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace nfp
|
||||
{
|
||||
namespace nfp {
|
||||
|
||||
enum class AmiiboSettingsMode : uint32_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
#include <coreinit/event.h>
|
||||
#include <nfc/nfc.h>
|
||||
#include <nn/ffl/miidata.h>
|
||||
#include <nn/result.h>
|
||||
|
||||
/**
|
||||
* \defgroup nn_nfp
|
||||
|
|
@ -14,11 +14,9 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace nfp
|
||||
{
|
||||
namespace nfp {
|
||||
|
||||
//! NN_NFP result descriptions for \link nn::Result::GetDescription \endlink.
|
||||
enum ResultDescription
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn
|
||||
{
|
||||
namespace nn {
|
||||
|
||||
namespace pdm
|
||||
{
|
||||
namespace pdm {
|
||||
|
||||
//! Flags for PlayDiary
|
||||
typedef enum PlayDiaryFlags : uint16_t
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ struct NNResult
|
|||
* \sa
|
||||
* - \link NNResult_IsFailure \endlink
|
||||
*/
|
||||
static inline int
|
||||
NNResult_IsSuccess(NNResult result)
|
||||
static inline int NNResult_IsSuccess(NNResult result)
|
||||
{
|
||||
return result.value >= 0;
|
||||
}
|
||||
|
|
@ -52,8 +51,7 @@ NNResult_IsSuccess(NNResult result)
|
|||
* \sa
|
||||
* - \link NNResult_IsSuccess \endlink
|
||||
*/
|
||||
static inline int
|
||||
NNResult_IsFailure(NNResult result)
|
||||
static inline int NNResult_IsFailure(NNResult result)
|
||||
{
|
||||
return result.value < 0;
|
||||
}
|
||||
|
|
@ -230,11 +228,6 @@ public:
|
|||
};
|
||||
|
||||
public:
|
||||
Result() :
|
||||
mValue(0)
|
||||
{
|
||||
}
|
||||
|
||||
Result(Level level, Module module, unsigned description) :
|
||||
mValue(((level & 0x7) << 29) | ((module & 0x1FF) << 20) | (description & 0xFFFFF))
|
||||
{
|
||||
|
|
@ -254,8 +247,7 @@ public:
|
|||
* \sa
|
||||
* - \link IsSuccess \endlink
|
||||
*/
|
||||
bool
|
||||
IsFailure() const
|
||||
bool IsFailure() const
|
||||
{
|
||||
return !IsSuccess();
|
||||
}
|
||||
|
|
@ -269,26 +261,22 @@ public:
|
|||
* \sa
|
||||
* - \link IsFailure \endlink
|
||||
*/
|
||||
bool
|
||||
IsSuccess() const
|
||||
bool IsSuccess() const
|
||||
{
|
||||
return mValue >= 0; // level >= 0
|
||||
}
|
||||
|
||||
bool
|
||||
IsLegacy() const
|
||||
bool IsLegacy() const
|
||||
{
|
||||
return ((mValue >> 27) & 0x3) == SIGNATURE_IS_LEGACY;
|
||||
}
|
||||
|
||||
unsigned
|
||||
GetDescription() const
|
||||
unsigned GetDescription() const
|
||||
{
|
||||
return mValue & (IsLegacy() ? 0x3FF : 0xFFFFF);
|
||||
}
|
||||
|
||||
int
|
||||
GetLevel() const
|
||||
int GetLevel() const
|
||||
{
|
||||
if (IsLegacy()) {
|
||||
return (mValue << 14) >> 28; // cause arithmetic shift
|
||||
|
|
@ -297,14 +285,12 @@ public:
|
|||
return mValue >> 29;
|
||||
}
|
||||
|
||||
unsigned
|
||||
GetModule() const
|
||||
unsigned GetModule() const
|
||||
{
|
||||
return (mValue >> 20) & (IsLegacy() ? 0x7F : 0x1FF);
|
||||
}
|
||||
|
||||
unsigned
|
||||
GetSummary() const
|
||||
unsigned GetSummary() const
|
||||
{
|
||||
if (IsLegacy()) {
|
||||
return (mValue >> 10) & 0xF;
|
||||
|
|
@ -325,14 +311,12 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
operator==(const Result &other) const
|
||||
bool operator==(const Result &other) const
|
||||
{
|
||||
return mValue == other.mValue;
|
||||
}
|
||||
|
||||
bool
|
||||
operator!=(const Result &other) const
|
||||
bool operator!=(const Result &other) const
|
||||
{
|
||||
return mValue != other.mValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
#include <nn/acp/device.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/ISerializer.h>
|
||||
#include <nn/sl/KillerNotification.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED CacheManagerInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED CacheManagerInternal {
|
||||
ISerializerInternal *quickStartTitleInfoSerializer;
|
||||
ISerializerInternal *killerNotificationSerializer;
|
||||
ISerializerInternal *jumpTitleInfoSerializer;
|
||||
|
|
@ -23,32 +20,23 @@ WUT_CHECK_OFFSET(CacheManagerInternal, 0x00, quickStartTitleInfoSerializer);
|
|||
WUT_CHECK_OFFSET(CacheManagerInternal, 0x04, killerNotificationSerializer);
|
||||
WUT_CHECK_OFFSET(CacheManagerInternal, 0x08, jumpTitleInfoSerializer);
|
||||
|
||||
extern "C" CacheManagerInternal *
|
||||
__ct__Q3_2nn2sl12CacheManagerFv(CacheManagerInternal *);
|
||||
extern "C" void
|
||||
SetupInitialCache__Q3_2nn2sl12CacheManagerFv(CacheManagerInternal *);
|
||||
extern "C" nn::Result
|
||||
GetKillerNotificationCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfo(CacheManagerInternal *, KillerNotification *, TitleInfo *);
|
||||
extern "C" nn::Result
|
||||
GetQuickStartCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoi(CacheManagerInternal *, TitleInfo *, int);
|
||||
extern "C" nn::Result
|
||||
Get__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoiPQ3_2nn2sl18KillerNotificationT1(CacheManagerInternal *, TitleInfo *, int, KillerNotification *, TitleInfo *);
|
||||
extern "C" nn::Result
|
||||
Initialize__Q3_2nn2sl12CacheManagerFRQ3_2nn2sl39ISerializer__tm__20_Q3_2nn2sl9TitleInfoRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationT1(
|
||||
extern "C" CacheManagerInternal *__ct__Q3_2nn2sl12CacheManagerFv(CacheManagerInternal *);
|
||||
extern "C" void SetupInitialCache__Q3_2nn2sl12CacheManagerFv(CacheManagerInternal *);
|
||||
extern "C" nn::Result GetKillerNotificationCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfo(CacheManagerInternal *, KillerNotification *, TitleInfo *);
|
||||
extern "C" nn::Result GetQuickStartCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoi(CacheManagerInternal *, TitleInfo *, int);
|
||||
extern "C" nn::Result Get__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoiPQ3_2nn2sl18KillerNotificationT1(CacheManagerInternal *, TitleInfo *, int, KillerNotification *, TitleInfo *);
|
||||
extern "C" nn::Result Initialize__Q3_2nn2sl12CacheManagerFRQ3_2nn2sl39ISerializer__tm__20_Q3_2nn2sl9TitleInfoRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationT1(
|
||||
CacheManagerInternal *,
|
||||
ISerializerInternal *,
|
||||
ISerializerInternal *,
|
||||
ISerializerInternal *);
|
||||
} // namespace details
|
||||
|
||||
class CacheManager
|
||||
{
|
||||
class CacheManager {
|
||||
public:
|
||||
CacheManager() :
|
||||
mQuickStartTitleInfoSerializer(nullptr),
|
||||
CacheManager() : mQuickStartTitleInfoSerializer(nullptr),
|
||||
mKillerNotificationSerializer(nullptr),
|
||||
mJumpTitleInfoSerializer(nullptr)
|
||||
{
|
||||
mJumpTitleInfoSerializer(nullptr) {
|
||||
if (__ct__Q3_2nn2sl12CacheManagerFv(&mInstance) != nullptr) {
|
||||
mQuickStartTitleInfoSerializer = details::SerializerFromPtr<TitleInfo>(mInstance.quickStartTitleInfoSerializer);
|
||||
mKillerNotificationSerializer = details::SerializerFromPtr<KillerNotification>(mInstance.killerNotificationSerializer);
|
||||
|
|
@ -56,51 +44,35 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ISerializerBase<TitleInfo> &
|
||||
GetQuickStartTitleInfoSerializer()
|
||||
{
|
||||
[[nodiscard]] details::ISerializerBase<TitleInfo> &GetQuickStartTitleInfoSerializer() {
|
||||
return mQuickStartTitleInfoSerializer;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ISerializerBase<KillerNotification> &
|
||||
GetKillerNotificationSerializer()
|
||||
{
|
||||
[[nodiscard]] details::ISerializerBase<KillerNotification> &GetKillerNotificationSerializer() {
|
||||
return mKillerNotificationSerializer;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ISerializerBase<TitleInfo> &
|
||||
GetJumpTitleInfoSerializer()
|
||||
{
|
||||
[[nodiscard]] details::ISerializerBase<TitleInfo> &GetJumpTitleInfoSerializer() {
|
||||
return mJumpTitleInfoSerializer;
|
||||
}
|
||||
|
||||
void
|
||||
SetupInitialCache()
|
||||
{
|
||||
void SetupInitialCache() {
|
||||
SetupInitialCache__Q3_2nn2sl12CacheManagerFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
GetKillerNotificationCache(KillerNotification *u1, TitleInfo *u2)
|
||||
{
|
||||
nn::Result GetKillerNotificationCache(KillerNotification *u1, TitleInfo *u2) {
|
||||
return GetKillerNotificationCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfo(&mInstance, u1, u2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
GetQuickStartCache(TitleInfo *u1, int u2)
|
||||
{
|
||||
nn::Result GetQuickStartCache(TitleInfo *u1, int u2) {
|
||||
return GetQuickStartCache__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoi(&mInstance, u1, u2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Get(TitleInfo *u1, int u2, KillerNotification *u3, TitleInfo *u4)
|
||||
{
|
||||
nn::Result Get(TitleInfo *u1, int u2, KillerNotification *u3, TitleInfo *u4) {
|
||||
return Get__Q3_2nn2sl12CacheManagerFPQ3_2nn2sl9TitleInfoiPQ3_2nn2sl18KillerNotificationT1(&mInstance, u1, u2, u3, u4);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::ISerializerBase<TitleInfo> &quickStartTitleInfoSerializer, details::ISerializerBase<KillerNotification> &killerNotificationSerializer, details::ISerializerBase<TitleInfo> &jumpTitleInfoSerializer)
|
||||
{
|
||||
void Initialize(details::ISerializerBase<TitleInfo> &quickStartTitleInfoSerializer, details::ISerializerBase<KillerNotification> &killerNotificationSerializer, details::ISerializerBase<TitleInfo> &jumpTitleInfoSerializer) {
|
||||
Initialize__Q3_2nn2sl12CacheManagerFRQ3_2nn2sl39ISerializer__tm__20_Q3_2nn2sl9TitleInfoRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationT1(&mInstance,
|
||||
quickStartTitleInfoSerializer.GetInternal(),
|
||||
killerNotificationSerializer.GetInternal(),
|
||||
|
|
|
|||
|
|
@ -1,21 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/time.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/ISettingAccessor.h>
|
||||
#include <nn/sl/ITimeAccessor.h>
|
||||
#include <nn/sl/IUpdatePackageAccessor.h>
|
||||
#include <nn/sl/details/ISerializerDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED ConditionInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED ConditionInternal {
|
||||
ISettingAccessorInternal *settingAccessor;
|
||||
IUpdatePackageAccessorInternal *updatePackageAccessor;
|
||||
ISerializerInternal *previousSendingTimeSerializer;
|
||||
|
|
@ -29,33 +26,24 @@ WUT_CHECK_OFFSET(ConditionInternal, 0x08, previousSendingTimeSerializer);
|
|||
WUT_CHECK_OFFSET(ConditionInternal, 0x0C, timeAccessor);
|
||||
WUT_CHECK_OFFSET(ConditionInternal, 0x10, vtable);
|
||||
|
||||
extern "C" ConditionInternal *
|
||||
__ct__Q3_2nn2sl9ConditionFv(ConditionInternal *);
|
||||
extern "C" nn::Result
|
||||
GetEnability__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result
|
||||
StoreCurrentTimeAsPreviousSendingTime__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result
|
||||
NeedsUpdate__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result
|
||||
GetPreviousSendingTime__Q3_2nn2sl9ConditionCFPL(ConditionInternal *, int64_t *outTime);
|
||||
extern "C" void
|
||||
Initialize__Q3_2nn2sl9ConditionFRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl22IUpdatePackageAccessorRQ3_2nn2sl20ISerializer__tm__2_LRQ3_2nn2sl13ITimeAccessor(ConditionInternal *,
|
||||
extern "C" ConditionInternal *__ct__Q3_2nn2sl9ConditionFv(ConditionInternal *);
|
||||
extern "C" nn::Result GetEnability__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result StoreCurrentTimeAsPreviousSendingTime__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result NeedsUpdate__Q3_2nn2sl9ConditionCFv(ConditionInternal *);
|
||||
extern "C" nn::Result GetPreviousSendingTime__Q3_2nn2sl9ConditionCFPL(ConditionInternal *, int64_t *outTime);
|
||||
extern "C" void Initialize__Q3_2nn2sl9ConditionFRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl22IUpdatePackageAccessorRQ3_2nn2sl20ISerializer__tm__2_LRQ3_2nn2sl13ITimeAccessor(ConditionInternal *,
|
||||
ISettingAccessorInternal *,
|
||||
IUpdatePackageAccessorInternal *,
|
||||
ISerializerInternal *,
|
||||
ITimeAccessorInternal *);
|
||||
} // namespace details
|
||||
|
||||
class Condition
|
||||
{
|
||||
class Condition {
|
||||
public:
|
||||
Condition() :
|
||||
mSettingAccessor(nullptr),
|
||||
Condition() : mSettingAccessor(nullptr),
|
||||
mUpdatePackageAccessor(nullptr),
|
||||
mPreviousSendingTimeSerializer(nullptr),
|
||||
mTimeAccessor(nullptr)
|
||||
{
|
||||
mTimeAccessor(nullptr) {
|
||||
if (__ct__Q3_2nn2sl9ConditionFv(&mInstance) != nullptr) {
|
||||
mSettingAccessor = details::SettingAccessorFromPtr(mInstance.settingAccessor);
|
||||
mUpdatePackageAccessor = details::UpdatePackageAccessorFromPtr(mInstance.updatePackageAccessor);
|
||||
|
|
@ -66,60 +54,42 @@ public:
|
|||
|
||||
~Condition() = default;
|
||||
|
||||
[[nodiscard]] details::ISettingAccessorBase &
|
||||
GetSettingAccessor()
|
||||
{
|
||||
[[nodiscard]] details::ISettingAccessorBase &GetSettingAccessor() {
|
||||
return mSettingAccessor;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::IUpdatePackageAccessorBase &
|
||||
GetUpdatePackageAccessor()
|
||||
{
|
||||
[[nodiscard]] details::IUpdatePackageAccessorBase &GetUpdatePackageAccessor() {
|
||||
return mUpdatePackageAccessor;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ISerializerBase<OSTime> &
|
||||
GetPreviousSendingTimeSerializer()
|
||||
{
|
||||
[[nodiscard]] details::ISerializerBase<OSTime> &GetPreviousSendingTimeSerializer() {
|
||||
return mPreviousSendingTimeSerializer;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ITimeAccessorBase &
|
||||
GetTimeAccessor()
|
||||
{
|
||||
[[nodiscard]] details::ITimeAccessorBase &GetTimeAccessor() {
|
||||
return mTimeAccessor;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
GetEnability()
|
||||
{
|
||||
nn::Result GetEnability() {
|
||||
return GetEnability__Q3_2nn2sl9ConditionCFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
NeedsUpdate()
|
||||
{
|
||||
nn::Result NeedsUpdate() {
|
||||
return NeedsUpdate__Q3_2nn2sl9ConditionCFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
StoreCurrentTimeAsPreviousSendingTime()
|
||||
{
|
||||
nn::Result StoreCurrentTimeAsPreviousSendingTime() {
|
||||
return StoreCurrentTimeAsPreviousSendingTime__Q3_2nn2sl9ConditionCFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
GetPreviousSendingTime(int64_t *outTime)
|
||||
{
|
||||
nn::Result GetPreviousSendingTime(int64_t *outTime) {
|
||||
return GetPreviousSendingTime__Q3_2nn2sl9ConditionCFPL(&mInstance, outTime);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::ISettingAccessorBase &settingAccessor,
|
||||
void Initialize(details::ISettingAccessorBase &settingAccessor,
|
||||
details::IUpdatePackageAccessorBase &updatePackageAccessor,
|
||||
details::ISerializerBase<OSTime> &previousSendingTimeSerializer,
|
||||
details::ITimeAccessorBase &timeAccessor)
|
||||
{
|
||||
details::ITimeAccessorBase &timeAccessor) {
|
||||
Initialize__Q3_2nn2sl9ConditionFRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl22IUpdatePackageAccessorRQ3_2nn2sl20ISerializer__tm__2_LRQ3_2nn2sl13ITimeAccessor(
|
||||
&mInstance,
|
||||
settingAccessor.GetInternal(),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/IIconInfoAccessor.h>
|
||||
#include <nn/sl/ISettingAccessor.h>
|
||||
|
|
@ -9,15 +8,13 @@
|
|||
#include <nn/sl/LaunchInfoDatabase.h>
|
||||
#include <nn/sl/details/IAccountInfoAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn ::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED DataCreatorInternal
|
||||
{
|
||||
namespace nn ::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED DataCreatorInternal {
|
||||
IIconInfoAccessorInternal *iconInfoAccessor;
|
||||
IAccountInfoAccessorInternal *accountInfoAccessor;
|
||||
ISettingAccessorInternal *settingInfoAccessor;
|
||||
|
|
@ -31,36 +28,20 @@ WUT_CHECK_OFFSET(DataCreatorInternal, 0x08, settingInfoAccessor);
|
|||
WUT_CHECK_OFFSET(DataCreatorInternal, 0x0c, titleIconCache);
|
||||
WUT_CHECK_OFFSET(DataCreatorInternal, 0x10, vtable);
|
||||
|
||||
extern "C" DataCreatorInternal *
|
||||
__ct__Q3_2nn2sl11DataCreatorFv(DataCreatorInternal *);
|
||||
extern "C" nn::Result
|
||||
Create__Q3_2nn2sl11DataCreatorFPQ3_2nn2sl16TransferableInfoPCQ3_2nn2sl9TitleInfoiRCQ3_2nn2sl18KillerNotificationRCQ3_2nn2sl9TitleInfoRQ3_2nn2sl18LaunchInfoDatabase(
|
||||
DataCreatorInternal *,
|
||||
TransferableInfo *,
|
||||
const TitleInfo *,
|
||||
int,
|
||||
const KillerNotification &,
|
||||
const TitleInfo &,
|
||||
LaunchInfoDatabase &);
|
||||
extern "C" nn::Result
|
||||
Initialize__Q3_2nn2sl11DataCreatorFRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl15ITitleIconCache(
|
||||
DataCreatorInternal *,
|
||||
IIconInfoAccessorInternal *,
|
||||
IAccountInfoAccessorInternal *,
|
||||
ISettingAccessorInternal *,
|
||||
ITitleIconCacheInternal *);
|
||||
extern "C" DataCreatorInternal *__ct__Q3_2nn2sl11DataCreatorFv(DataCreatorInternal *);
|
||||
extern "C" nn::Result Create__Q3_2nn2sl11DataCreatorFPQ3_2nn2sl16TransferableInfoPCQ3_2nn2sl9TitleInfoiRCQ3_2nn2sl18KillerNotificationRCQ3_2nn2sl9TitleInfoRQ3_2nn2sl18LaunchInfoDatabase(
|
||||
DataCreatorInternal *, TransferableInfo *, const TitleInfo *, int, const KillerNotification &, const TitleInfo &, LaunchInfoDatabase &);
|
||||
extern "C" nn::Result Initialize__Q3_2nn2sl11DataCreatorFRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl15ITitleIconCache(
|
||||
DataCreatorInternal *, IIconInfoAccessorInternal *, IAccountInfoAccessorInternal *, ISettingAccessorInternal *, ITitleIconCacheInternal *);
|
||||
} // namespace details
|
||||
|
||||
|
||||
class DataCreator
|
||||
{
|
||||
class DataCreator {
|
||||
public:
|
||||
DataCreator() :
|
||||
mIconInfoAccessor(nullptr),
|
||||
DataCreator() : mIconInfoAccessor(nullptr),
|
||||
mAccountInfoAccessor(nullptr),
|
||||
mSettingAccessor(nullptr),
|
||||
mTitleIconCache(nullptr)
|
||||
{
|
||||
mTitleIconCache(nullptr) {
|
||||
if (__ct__Q3_2nn2sl11DataCreatorFv(&mInstance) != nullptr) {
|
||||
mIconInfoAccessor = details::IconInfoAccessorFromPtr(mInstance.iconInfoAccessor);
|
||||
mAccountInfoAccessor = details::AccountInfoAccessorFromPtr(mInstance.accountInfoAccessor);
|
||||
|
|
@ -69,45 +50,33 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] details::IIconInfoAccessorBase &
|
||||
getIconInfoAccessor()
|
||||
{
|
||||
[[nodiscard]] details::IIconInfoAccessorBase &getIconInfoAccessor() {
|
||||
return mIconInfoAccessor;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::IAccountInfoAccessorBase &
|
||||
getAccountInfoAccessor()
|
||||
{
|
||||
[[nodiscard]] details::IAccountInfoAccessorBase &getAccountInfoAccessor() {
|
||||
return mAccountInfoAccessor;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ISettingAccessorBase &
|
||||
getSettingAccessor()
|
||||
{
|
||||
[[nodiscard]] details::ISettingAccessorBase &getSettingAccessor() {
|
||||
return mSettingAccessor;
|
||||
}
|
||||
|
||||
[[nodiscard]] details::ITitleIconCacheBase &
|
||||
getTitleIconCache()
|
||||
{
|
||||
[[nodiscard]] details::ITitleIconCacheBase &getTitleIconCache() {
|
||||
return mTitleIconCache;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Create(TransferableInfo *outTransferableInfo,
|
||||
nn::Result Create(TransferableInfo *outTransferableInfo,
|
||||
const TitleInfo *quickstartTitleInfos,
|
||||
int numQuickstartTitleInfos,
|
||||
const KillerNotification &killerNotification,
|
||||
const TitleInfo &killerNotificationTitleInfo,
|
||||
LaunchInfoDatabase &launchInfoDatabase)
|
||||
{
|
||||
LaunchInfoDatabase &launchInfoDatabase) {
|
||||
return details::Create__Q3_2nn2sl11DataCreatorFPQ3_2nn2sl16TransferableInfoPCQ3_2nn2sl9TitleInfoiRCQ3_2nn2sl18KillerNotificationRCQ3_2nn2sl9TitleInfoRQ3_2nn2sl18LaunchInfoDatabase(
|
||||
&mInstance, outTransferableInfo, quickstartTitleInfos, numQuickstartTitleInfos, killerNotification, killerNotificationTitleInfo, launchInfoDatabase);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::IIconInfoAccessorBase &iconInfoAccessor, details::IAccountInfoAccessorBase &accountInfoAccessor, details::ISettingAccessorBase &settingAccessor, details::ITitleIconCacheBase &titleIconCache)
|
||||
{
|
||||
void Initialize(details::IIconInfoAccessorBase &iconInfoAccessor, details::IAccountInfoAccessorBase &accountInfoAccessor, details::ISettingAccessorBase &settingAccessor, details::ITitleIconCacheBase &titleIconCache) {
|
||||
details::Initialize__Q3_2nn2sl11DataCreatorFRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl15ITitleIconCache(
|
||||
&mInstance, iconInfoAccessor.GetInternal(), accountInfoAccessor.GetInternal(), settingAccessor.GetInternal(), titleIconCache.GetInternal());
|
||||
mIconInfoAccessor = details::IconInfoAccessorFromPtr(mInstance.iconInfoAccessor);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/ISettingAccessor.h>
|
||||
#include <nn/sl/ITimeAccessor.h>
|
||||
#include <nn/sl/ITransferrer.h>
|
||||
#include <nn/sl/KillerNotification.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED DrcManagerInternal
|
||||
{
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED DrcManagerInternal {
|
||||
ITransferrerInternal *drcTransferrer;
|
||||
ISettingAccessorInternal *settingsAccessor;
|
||||
ITimeAccessorInternal *timeAccessor;
|
||||
|
|
@ -28,30 +25,19 @@ WUT_CHECK_OFFSET(DrcManagerInternal, 0x04, settingsAccessor);
|
|||
WUT_CHECK_OFFSET(DrcManagerInternal, 0x08, timeAccessor);
|
||||
WUT_CHECK_OFFSET(DrcManagerInternal, 0x0C, vtable);
|
||||
|
||||
extern "C" DrcManagerInternal *
|
||||
__ct__Q3_2nn2sl10DrcManagerFv(DrcManagerInternal *);
|
||||
extern "C" nn::Result
|
||||
CancelTransfer__Q3_2nn2sl10DrcManagerFv(DrcManagerInternal *);
|
||||
extern "C" nn::Result
|
||||
PushNotification__Q3_2nn2sl10DrcManagerFPbPCQ3_2nn2sl18KillerNotificationbT3L(DrcManagerInternal *, bool *, const KillerNotification *, bool, bool, uint64_t);
|
||||
extern "C" nn::Result
|
||||
Transfer__Q3_2nn2sl10DrcManagerFRCQ3_2nn2sl16TransferableInfobQ4_2nn2sl12ITransferrer12TransferMode(DrcManagerInternal *, TransferableInfo *, bool, TransferMode);
|
||||
extern "C" DrcManagerInternal *__ct__Q3_2nn2sl10DrcManagerFv(DrcManagerInternal *);
|
||||
extern "C" nn::Result CancelTransfer__Q3_2nn2sl10DrcManagerFv(DrcManagerInternal *);
|
||||
extern "C" nn::Result PushNotification__Q3_2nn2sl10DrcManagerFPbPCQ3_2nn2sl18KillerNotificationbT3L(DrcManagerInternal *, bool *, const KillerNotification *, bool, bool, uint64_t);
|
||||
extern "C" nn::Result Transfer__Q3_2nn2sl10DrcManagerFRCQ3_2nn2sl16TransferableInfobQ4_2nn2sl12ITransferrer12TransferMode(DrcManagerInternal *, TransferableInfo *, bool, TransferMode);
|
||||
|
||||
extern "C" nn::Result
|
||||
Initialize__Q3_2nn2sl10DrcManagerFRQ3_2nn2sl12ITransferrerRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl13ITimeAccessor(
|
||||
DrcManagerInternal *,
|
||||
ITransferrerInternal *,
|
||||
ISettingAccessorInternal *,
|
||||
ITimeAccessorInternal *);
|
||||
extern "C" nn::Result Initialize__Q3_2nn2sl10DrcManagerFRQ3_2nn2sl12ITransferrerRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl13ITimeAccessor(
|
||||
DrcManagerInternal *, ITransferrerInternal *, ISettingAccessorInternal *, ITimeAccessorInternal *);
|
||||
} // namespace details
|
||||
class DrcManager
|
||||
{
|
||||
class DrcManager {
|
||||
public:
|
||||
DrcManager() :
|
||||
mTransferrer(nullptr),
|
||||
DrcManager() : mTransferrer(nullptr),
|
||||
mSettingAccessor(nullptr),
|
||||
mTimeAccessor(nullptr)
|
||||
{
|
||||
mTimeAccessor(nullptr) {
|
||||
if (__ct__Q3_2nn2sl10DrcManagerFv(&mInstance) != nullptr) {
|
||||
mTransferrer = details::TransferrerFromPtr(mInstance.drcTransferrer);
|
||||
mSettingAccessor = details::SettingAccessorFromPtr(mInstance.settingsAccessor);
|
||||
|
|
@ -61,45 +47,31 @@ public:
|
|||
|
||||
~DrcManager() = default;
|
||||
|
||||
details::ITransferrerBase &
|
||||
GetTransferrer()
|
||||
{
|
||||
details::ITransferrerBase &GetTransferrer() {
|
||||
return mTransferrer;
|
||||
}
|
||||
|
||||
details::ISettingAccessorBase &
|
||||
GetSettingAccessor()
|
||||
{
|
||||
details::ISettingAccessorBase &GetSettingAccessor() {
|
||||
return mSettingAccessor;
|
||||
}
|
||||
|
||||
details::ITimeAccessorBase &
|
||||
GetTimeAccessor()
|
||||
{
|
||||
details::ITimeAccessorBase &GetTimeAccessor() {
|
||||
return mTimeAccessor;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
CancelTransfer()
|
||||
{
|
||||
nn::Result CancelTransfer() {
|
||||
return CancelTransfer__Q3_2nn2sl10DrcManagerFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
PushNotification(bool *u1, const KillerNotification *u2, bool u3, bool u4, uint64_t u5)
|
||||
{
|
||||
nn::Result PushNotification(bool *u1, const KillerNotification *u2, bool u3, bool u4, uint64_t u5) {
|
||||
return PushNotification__Q3_2nn2sl10DrcManagerFPbPCQ3_2nn2sl18KillerNotificationbT3L(&mInstance, u1, u2, u3, u4, u5);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Transfer(TransferableInfo *u1, bool u2, TransferMode u3)
|
||||
{
|
||||
nn::Result Transfer(TransferableInfo *u1, bool u2, TransferMode u3) {
|
||||
return Transfer__Q3_2nn2sl10DrcManagerFRCQ3_2nn2sl16TransferableInfobQ4_2nn2sl12ITransferrer12TransferMode(&mInstance, u1, u2, u3);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::ITransferrerBase &transferrer, details::ISettingAccessorBase &settingAccessor, details::ITimeAccessorBase &timeAccessor)
|
||||
{
|
||||
void Initialize(details::ITransferrerBase &transferrer, details::ISettingAccessorBase &settingAccessor, details::ITimeAccessorBase &timeAccessor) {
|
||||
Initialize__Q3_2nn2sl10DrcManagerFRQ3_2nn2sl12ITransferrerRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl13ITimeAccessor(
|
||||
&mInstance,
|
||||
transferrer.GetInternal(),
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/filesystem.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/IStream.h>
|
||||
#include <nn/sl/details/IStreamDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED FileStreamInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED FileStreamInternal {
|
||||
void *vtable;
|
||||
FSClient *fsClient;
|
||||
FSCmdBlock *fsCmdBlock;
|
||||
|
|
@ -25,48 +22,34 @@ WUT_CHECK_OFFSET(FileStreamInternal, 0x04, fsClient);
|
|||
WUT_CHECK_OFFSET(FileStreamInternal, 0x08, fsCmdBlock);
|
||||
WUT_CHECK_OFFSET(FileStreamInternal, 0x0C, fileHandle);
|
||||
|
||||
extern "C" nn::Result
|
||||
Initialize__Q3_2nn2sl10FileStreamFP8FSClientP10FSCmdBlockPCcT3(FileStreamInternal *, FSClient *, FSCmdBlock *, char const *, char const *);
|
||||
extern "C" FileStreamInternal *
|
||||
__ct__Q3_2nn2sl10FileStreamFv(FileStreamInternal *);
|
||||
extern "C" void
|
||||
__dt__Q3_2nn2sl10FileStreamFv(FileStreamInternal *, int);
|
||||
extern "C" nn::Result Initialize__Q3_2nn2sl10FileStreamFP8FSClientP10FSCmdBlockPCcT3(FileStreamInternal *, FSClient *, FSCmdBlock *, char const *, char const *);
|
||||
extern "C" FileStreamInternal *__ct__Q3_2nn2sl10FileStreamFv(FileStreamInternal *);
|
||||
extern "C" void __dt__Q3_2nn2sl10FileStreamFv(FileStreamInternal *, int);
|
||||
} // namespace details
|
||||
|
||||
class FileStream : public details::IStreamBase
|
||||
{
|
||||
class FileStream : public details::IStreamBase {
|
||||
public:
|
||||
FileStream()
|
||||
{
|
||||
FileStream() {
|
||||
__ct__Q3_2nn2sl10FileStreamFv(&mInstance);
|
||||
}
|
||||
|
||||
~FileStream() override
|
||||
{
|
||||
~FileStream() override {
|
||||
__dt__Q3_2nn2sl10FileStreamFv(&mInstance, 2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override
|
||||
{
|
||||
nn::Result Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->ReadFn(base, bytesRead, buffer, readSize);
|
||||
}
|
||||
nn::Result
|
||||
Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override
|
||||
{
|
||||
nn::Result Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->WriteFn(base, bytesWritten, buffer, readSize);
|
||||
}
|
||||
nn::Result
|
||||
GetSize(uint32_t *fileSize) override
|
||||
{
|
||||
nn::Result GetSize(uint32_t *fileSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->GetSizeFn(base, fileSize);
|
||||
}
|
||||
nn::Result
|
||||
Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override
|
||||
{
|
||||
nn::Result Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->SeekFn(base, offset, seekOrigin);
|
||||
}
|
||||
|
|
@ -74,15 +57,11 @@ public:
|
|||
/**
|
||||
* The given client and cmd must be valid during the whole liftime of the filestream
|
||||
*/
|
||||
nn::Result
|
||||
Initialize(FSClient *client, FSCmdBlock *cmdBlock, char const *path, char const *mode)
|
||||
{
|
||||
nn::Result Initialize(FSClient *client, FSCmdBlock *cmdBlock, char const *path, char const *mode) {
|
||||
return Initialize__Q3_2nn2sl10FileStreamFP8FSClientP10FSCmdBlockPCcT3(&mInstance, client, cmdBlock, path, mode);
|
||||
}
|
||||
|
||||
details::IStreamInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IStreamInternal *GetInternal() override {
|
||||
return reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IAccountInfoAccessorDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IAccountInfoAccessor : public details::IAccountInfoAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IAccountInfoAccessor : public details::IAccountInfoAccessorBase {
|
||||
|
||||
public:
|
||||
IAccountInfoAccessor()
|
||||
{
|
||||
IAccountInfoAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IAccountInfoAccessor(IAccountInfoAccessor &src)
|
||||
{
|
||||
IAccountInfoAccessor(IAccountInfoAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IAccountInfoAccessor &
|
||||
operator=(const IAccountInfoAccessor &other)
|
||||
{
|
||||
IAccountInfoAccessor &operator=(const IAccountInfoAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IAccountInfoAccessor &
|
||||
operator=(IAccountInfoAccessor &&src) noexcept
|
||||
{
|
||||
IAccountInfoAccessor &operator=(IAccountInfoAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -39,21 +31,15 @@ public:
|
|||
~IAccountInfoAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IAccountInfoAccessorInternal *instance, AccountInfo *outAccountInfo)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IAccountInfoAccessorInternal *instance, AccountInfo *outAccountInfo) {
|
||||
return instance->vtable->instance->Get(outAccountInfo);
|
||||
}
|
||||
|
||||
details::IAccountInfoAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IAccountInfoAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -63,8 +49,7 @@ private:
|
|||
details::IAccountInfoAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IAccountInfoAccessorBase &
|
||||
GetDefaultAccountInfoAccessor();
|
||||
details::IAccountInfoAccessorBase &GetDefaultAccountInfoAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,40 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IBlackListAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class IBlackListAccessor : public details::IBlackListAccessorBase
|
||||
{
|
||||
class IBlackListAccessor : public details::IBlackListAccessorBase {
|
||||
|
||||
public:
|
||||
IBlackListAccessor()
|
||||
{
|
||||
IBlackListAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
|
||||
IBlackListAccessor(IBlackListAccessor &src)
|
||||
{
|
||||
IBlackListAccessor(IBlackListAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IBlackListAccessor &
|
||||
operator=(const IBlackListAccessor &other)
|
||||
{
|
||||
IBlackListAccessor &operator=(const IBlackListAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IBlackListAccessor &
|
||||
operator=(IBlackListAccessor &&src) noexcept
|
||||
{
|
||||
IBlackListAccessor &operator=(IBlackListAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -42,21 +34,15 @@ public:
|
|||
~IBlackListAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IBlackListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IBlackListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) {
|
||||
return instance->vtable->instance->Get(outTitleInfos, outTitleInfosSize, maxTitleInfos);
|
||||
}
|
||||
|
||||
details::IBlackListAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IBlackListAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -66,8 +52,7 @@ private:
|
|||
details::IBlackListAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IBlackListAccessorBase &
|
||||
GetDefaultBlackListAccessor();
|
||||
details::IBlackListAccessorBase &GetDefaultBlackListAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,39 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IDefaultTitleAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class IDefaultTitleAccessor : public details::IDefaultTitleAccessorBase
|
||||
{
|
||||
class IDefaultTitleAccessor : public details::IDefaultTitleAccessorBase {
|
||||
|
||||
public:
|
||||
IDefaultTitleAccessor()
|
||||
{
|
||||
IDefaultTitleAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IDefaultTitleAccessor(IDefaultTitleAccessor &src)
|
||||
{
|
||||
IDefaultTitleAccessor(IDefaultTitleAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IDefaultTitleAccessor &
|
||||
operator=(const IDefaultTitleAccessor &other)
|
||||
{
|
||||
IDefaultTitleAccessor &operator=(const IDefaultTitleAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IDefaultTitleAccessor &
|
||||
operator=(IDefaultTitleAccessor &&src) noexcept
|
||||
{
|
||||
IDefaultTitleAccessor &operator=(IDefaultTitleAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -41,21 +33,15 @@ public:
|
|||
~IDefaultTitleAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IDefaultTitleAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IDefaultTitleAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) {
|
||||
return instance->vtable->instance->Get(outTitleInfos, outTitleInfosSize, maxTitleInfos);
|
||||
}
|
||||
|
||||
details::IDefaultTitleAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IDefaultTitleAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -65,8 +51,7 @@ private:
|
|||
details::IDefaultTitleAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IDefaultTitleAccessorBase &
|
||||
GetDefaultDefaultTitleAccessor();
|
||||
details::IDefaultTitleAccessorBase &GetDefaultDefaultTitleAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,39 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IDiscCachedTitleAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class DiscCachedTitleAccessor : public details::IDiscCachedTitleAccessorBase
|
||||
{
|
||||
class DiscCachedTitleAccessor : public details::IDiscCachedTitleAccessorBase {
|
||||
|
||||
public:
|
||||
DiscCachedTitleAccessor()
|
||||
{
|
||||
DiscCachedTitleAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
DiscCachedTitleAccessor(DiscCachedTitleAccessor &src)
|
||||
{
|
||||
DiscCachedTitleAccessor(DiscCachedTitleAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
DiscCachedTitleAccessor &
|
||||
operator=(const DiscCachedTitleAccessor &other)
|
||||
{
|
||||
DiscCachedTitleAccessor &operator=(const DiscCachedTitleAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiscCachedTitleAccessor &
|
||||
operator=(DiscCachedTitleAccessor &&src) noexcept
|
||||
{
|
||||
DiscCachedTitleAccessor &operator=(DiscCachedTitleAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -41,21 +33,15 @@ public:
|
|||
~DiscCachedTitleAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IDiscCachedTitleAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IDiscCachedTitleAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) {
|
||||
return instance->vtable->instance->Get(outTitleInfos, outTitleInfosSize, maxTitleInfos);
|
||||
}
|
||||
|
||||
details::IDiscCachedTitleAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IDiscCachedTitleAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -65,8 +51,7 @@ private:
|
|||
details::IDiscCachedTitleAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IDiscCachedTitleAccessorBase &
|
||||
GetDefaultDiscCachedTitleAccessor();
|
||||
details::IDiscCachedTitleAccessorBase &GetDefaultDiscCachedTitleAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IIconInfoAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IIconInfoAccessor : public details::IIconInfoAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IIconInfoAccessor : public details::IIconInfoAccessorBase {
|
||||
|
||||
public:
|
||||
IIconInfoAccessor()
|
||||
{
|
||||
IIconInfoAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IIconInfoAccessor(IIconInfoAccessor &src)
|
||||
{
|
||||
IIconInfoAccessor(IIconInfoAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IIconInfoAccessor &
|
||||
operator=(const IIconInfoAccessor &other)
|
||||
{
|
||||
IIconInfoAccessor &operator=(const IIconInfoAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IIconInfoAccessor &
|
||||
operator=(IIconInfoAccessor &&src) noexcept
|
||||
{
|
||||
IIconInfoAccessor &operator=(IIconInfoAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,26 +32,18 @@ public:
|
|||
~IIconInfoAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetTitleIconInfoWrapper(details::IIconInfoAccessorInternal *instance, nn::sl::IconInfo *outIconInfo, const nn::sl::TitleInfo &titleInfo, nn::sl::Language language)
|
||||
{
|
||||
static nn::Result GetTitleIconInfoWrapper(details::IIconInfoAccessorInternal *instance, nn::sl::IconInfo *outIconInfo, const nn::sl::TitleInfo &titleInfo, nn::sl::Language language) {
|
||||
return instance->vtable->instance->GetTitleIconInfo(outIconInfo, titleInfo, language);
|
||||
}
|
||||
static nn::Result
|
||||
GetMiiIconWrapper(details::IIconInfoAccessorInternal *instance, void *buffer, uint32_t buffer_size, uint32_t slot)
|
||||
{
|
||||
static nn::Result GetMiiIconWrapper(details::IIconInfoAccessorInternal *instance, void *buffer, uint32_t buffer_size, uint32_t slot) {
|
||||
return instance->vtable->instance->GetMiiIcon(buffer, buffer_size, slot);
|
||||
}
|
||||
|
||||
details::IIconInfoAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IIconInfoAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetTitleIconInfoFn = GetTitleIconInfoWrapper,
|
||||
.GetMiiIconFn = GetMiiIconWrapper};
|
||||
|
|
@ -70,8 +54,7 @@ private:
|
|||
details::IIconInfoAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IIconInfoAccessorBase &
|
||||
GetDefaultIconInfoAccessor();
|
||||
details::IIconInfoAccessorBase &GetDefaultIconInfoAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,39 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IInstalledTitleListAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IInstalledTitleListAccessor : public details::IInstalledTitleListAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IInstalledTitleListAccessor : public details::IInstalledTitleListAccessorBase {
|
||||
|
||||
public:
|
||||
IInstalledTitleListAccessor()
|
||||
{
|
||||
IInstalledTitleListAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
|
||||
IInstalledTitleListAccessor(IInstalledTitleListAccessor &src)
|
||||
{
|
||||
IInstalledTitleListAccessor(IInstalledTitleListAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IInstalledTitleListAccessor &
|
||||
operator=(const IInstalledTitleListAccessor &other)
|
||||
{
|
||||
IInstalledTitleListAccessor &operator=(const IInstalledTitleListAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IInstalledTitleListAccessor &
|
||||
operator=(IInstalledTitleListAccessor &&src) noexcept
|
||||
{
|
||||
IInstalledTitleListAccessor &operator=(IInstalledTitleListAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -41,21 +33,15 @@ public:
|
|||
~IInstalledTitleListAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IInstalledTitleListAccessorInternal *instance, nn::sl::TitleInfo *outInstalledTitleInfos, int *outInstalledTitleInfosSize, int maxInstalledTitleInfos)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IInstalledTitleListAccessorInternal *instance, nn::sl::TitleInfo *outInstalledTitleInfos, int *outInstalledTitleInfosSize, int maxInstalledTitleInfos) {
|
||||
return instance->vtable->instance->Get(outInstalledTitleInfos, outInstalledTitleInfosSize, maxInstalledTitleInfos);
|
||||
}
|
||||
|
||||
details::IInstalledTitleListAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IInstalledTitleListAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -65,8 +51,7 @@ private:
|
|||
details::IInstalledTitleListAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IInstalledTitleListAccessorBase &
|
||||
GetDefaultInstalledTitleListAccessor();
|
||||
details::IInstalledTitleListAccessorBase &GetDefaultInstalledTitleListAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IKillerNotificationAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IKillerNotificationAccessor : public details::IKillerNotificationAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IKillerNotificationAccessor : public details::IKillerNotificationAccessorBase {
|
||||
|
||||
public:
|
||||
IKillerNotificationAccessor()
|
||||
{
|
||||
IKillerNotificationAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IKillerNotificationAccessor(IKillerNotificationAccessor &src)
|
||||
{
|
||||
IKillerNotificationAccessor(IKillerNotificationAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IKillerNotificationAccessor &
|
||||
operator=(const IKillerNotificationAccessor &other)
|
||||
{
|
||||
IKillerNotificationAccessor &operator=(const IKillerNotificationAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IKillerNotificationAccessor &
|
||||
operator=(IKillerNotificationAccessor &&src) noexcept
|
||||
{
|
||||
IKillerNotificationAccessor &operator=(IKillerNotificationAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,21 +32,15 @@ public:
|
|||
~IKillerNotificationAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IKillerNotificationAccessorInternal *instance, KillerNotification *outBuffer, int *outNum, int outBufferNum)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IKillerNotificationAccessorInternal *instance, KillerNotification *outBuffer, int *outNum, int outBufferNum) {
|
||||
return instance->vtable->instance->Get(outBuffer, outNum, outBufferNum);
|
||||
}
|
||||
|
||||
details::IKillerNotificationAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IKillerNotificationAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -64,8 +50,7 @@ private:
|
|||
details::IKillerNotificationAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IKillerNotificationAccessorBase &
|
||||
GetDefaultKillerNotificationAccessor();
|
||||
details::IKillerNotificationAccessorBase &GetDefaultKillerNotificationAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,37 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ILaunchedTitleListAccessoDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class ILaunchedTitleListAccessor : public details::ILaunchedTitleListAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class ILaunchedTitleListAccessor : public details::ILaunchedTitleListAccessorBase {
|
||||
|
||||
public:
|
||||
ILaunchedTitleListAccessor()
|
||||
{
|
||||
ILaunchedTitleListAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ILaunchedTitleListAccessor(ILaunchedTitleListAccessor &src)
|
||||
{
|
||||
ILaunchedTitleListAccessor(ILaunchedTitleListAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ILaunchedTitleListAccessor &
|
||||
operator=(const ILaunchedTitleListAccessor &other)
|
||||
{
|
||||
ILaunchedTitleListAccessor &operator=(const ILaunchedTitleListAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ILaunchedTitleListAccessor &
|
||||
operator=(ILaunchedTitleListAccessor &&src) noexcept
|
||||
{
|
||||
ILaunchedTitleListAccessor &operator=(ILaunchedTitleListAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -39,21 +31,15 @@ public:
|
|||
~ILaunchedTitleListAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetByAccountWrapper(details::ILaunchedTitleListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId)
|
||||
{
|
||||
static nn::Result GetByAccountWrapper(details::ILaunchedTitleListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) {
|
||||
return instance->vtable->instance->GetByAccount(outTitleInfos, outTitleInfoSize, inTitleInfosSize, userId);
|
||||
}
|
||||
|
||||
details::ILaunchedTitleListAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ILaunchedTitleListAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetByAccountFn = &GetByAccountWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -63,16 +49,13 @@ private:
|
|||
details::ILaunchedTitleListAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
enum LaunchedTitleListAccessorType
|
||||
{
|
||||
enum LaunchedTitleListAccessorType {
|
||||
TITLE_LIST_ACCESSOR_LAUNCHED_TITLES = 0,
|
||||
TITLE_LIST_ACCESSOR_PLAY_STATS = 1,
|
||||
};
|
||||
|
||||
details::ILaunchedTitleListAccessorBase &
|
||||
GetDefaultLaunchedTitleListAccessor(LaunchedTitleListAccessorType type);
|
||||
details::ILaunchedTitleListAccessorBase &
|
||||
GetDefaultLaunchedTitleListAccessor();
|
||||
details::ILaunchedTitleListAccessorBase &GetDefaultLaunchedTitleListAccessor(LaunchedTitleListAccessorType type);
|
||||
details::ILaunchedTitleListAccessorBase &GetDefaultLaunchedTitleListAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,40 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IMetaInfoAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class MetaInfoAccessor : public details::IMetaInfoAccessorBase
|
||||
{
|
||||
class MetaInfoAccessor : public details::IMetaInfoAccessorBase {
|
||||
|
||||
public:
|
||||
MetaInfoAccessor()
|
||||
{
|
||||
MetaInfoAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
|
||||
MetaInfoAccessor(MetaInfoAccessor &src)
|
||||
{
|
||||
MetaInfoAccessor(MetaInfoAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
MetaInfoAccessor &
|
||||
operator=(const MetaInfoAccessor &other)
|
||||
{
|
||||
MetaInfoAccessor &operator=(const MetaInfoAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
MetaInfoAccessor &
|
||||
operator=(MetaInfoAccessor &&src) noexcept
|
||||
{
|
||||
MetaInfoAccessor &operator=(MetaInfoAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -42,21 +34,15 @@ public:
|
|||
~MetaInfoAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IMetaInfoAccessorInternal *instance, nn::sl::TitleMetaInfo *outMetaInfo, const nn::sl::TitleInfo &titleInfo)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IMetaInfoAccessorInternal *instance, nn::sl::TitleMetaInfo *outMetaInfo, const nn::sl::TitleInfo &titleInfo) {
|
||||
return instance->vtable->instance->Get(outMetaInfo, titleInfo);
|
||||
}
|
||||
|
||||
details::IMetaInfoAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IMetaInfoAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -66,8 +52,7 @@ private:
|
|||
details::IMetaInfoAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IMetaInfoAccessorBase &
|
||||
GetDefaultMetaInfoAccessor();
|
||||
details::IMetaInfoAccessorBase &GetDefaultMetaInfoAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,37 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IPreferentialTitleAccessorDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IPreferentialTitleAccessor : public details::IPreferentialTitleAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IPreferentialTitleAccessor : public details::IPreferentialTitleAccessorBase {
|
||||
|
||||
public:
|
||||
IPreferentialTitleAccessor()
|
||||
{
|
||||
IPreferentialTitleAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IPreferentialTitleAccessor(IPreferentialTitleAccessor &src)
|
||||
{
|
||||
IPreferentialTitleAccessor(IPreferentialTitleAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IPreferentialTitleAccessor &
|
||||
operator=(const IPreferentialTitleAccessor &other)
|
||||
{
|
||||
IPreferentialTitleAccessor &operator=(const IPreferentialTitleAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IPreferentialTitleAccessor &
|
||||
operator=(IPreferentialTitleAccessor &&src) noexcept
|
||||
{
|
||||
IPreferentialTitleAccessor &operator=(IPreferentialTitleAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -39,21 +31,15 @@ public:
|
|||
~IPreferentialTitleAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IPreferentialTitleAccessorInternal *instance, TitleInfo *outTitleInfo, uint32_t *outTitleInfoSize, int maxTitleInfo, uint32_t u1)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IPreferentialTitleAccessorInternal *instance, TitleInfo *outTitleInfo, uint32_t *outTitleInfoSize, int maxTitleInfo, uint32_t u1) {
|
||||
return instance->vtable->instance->Get(outTitleInfo, outTitleInfoSize, maxTitleInfo, u1);
|
||||
}
|
||||
|
||||
details::IPreferentialTitleAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IPreferentialTitleAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -63,8 +49,7 @@ private:
|
|||
details::IPreferentialTitleAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IPreferentialTitleAccessorBase &
|
||||
GetDefaultPreferentialTitleAccessor();
|
||||
details::IPreferentialTitleAccessorBase &GetDefaultPreferentialTitleAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,87 +1,65 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/time.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/KillerNotification.h>
|
||||
#include <nn/sl/details/ISerializerDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
template<typename T>
|
||||
class ISerializer : public details::ISerializerBase<T>
|
||||
{
|
||||
class ISerializer : public details::ISerializerBase<T> {
|
||||
|
||||
public:
|
||||
ISerializer()
|
||||
{
|
||||
ISerializer() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ISerializer(ISerializer &src)
|
||||
{
|
||||
ISerializer(ISerializer &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ISerializer &
|
||||
operator=(const ISerializer &other)
|
||||
{
|
||||
ISerializer &operator=(const ISerializer &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ISerializer &
|
||||
operator=(ISerializer &&src) noexcept
|
||||
{
|
||||
ISerializer &operator=(ISerializer &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Serialize(T *buffer, uint32_t num)
|
||||
{
|
||||
nn::Result Serialize(T *buffer, uint32_t num) {
|
||||
return details::ISerializerBase<T>::Serialize(buffer, num * sizeof(buffer));
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Deserialize(T *buffer, uint32_t num)
|
||||
{
|
||||
nn::Result Deserialize(T *buffer, uint32_t num) {
|
||||
return details::ISerializerBase<T>::Deserialize(buffer, num * sizeof(buffer));
|
||||
}
|
||||
|
||||
~ISerializer() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
SerializeWrapper(details::ISerializerInternal *instance, void *buffer, uint32_t size)
|
||||
{
|
||||
static nn::Result SerializeWrapper(details::ISerializerInternal *instance, void *buffer, uint32_t size) {
|
||||
return details::ISerializerBase<T>::instance->vtable->instance->Serialize(buffer, size);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
DeserializeWrapper(details::ISerializerInternal *instance, void *buffer, uint32_t size)
|
||||
{
|
||||
static nn::Result DeserializeWrapper(details::ISerializerInternal *instance, void *buffer, uint32_t size) {
|
||||
return details::ISerializerBase<T>::instance->vtable->instance->Deserialize(buffer, size);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
GetCountWrapper(details::ISerializerInternal *instance, uint32_t *outCount)
|
||||
{
|
||||
static nn::Result GetCountWrapper(details::ISerializerInternal *instance, uint32_t *outCount) {
|
||||
return details::ISerializerBase<T>::instance->vtable->instance->GetCount(outCount);
|
||||
}
|
||||
|
||||
details::ISerializerInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ISerializerInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.SerializeFn = &SerializeWrapper,
|
||||
.DeserializeFn = &DeserializeWrapper,
|
||||
|
|
@ -93,20 +71,15 @@ private:
|
|||
details::ISerializerInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ISerializerBase<nn::sl::IconInfo> &
|
||||
GetDefaultIconInfoSerializer();
|
||||
details::ISerializerBase<nn::sl::IconInfo> &GetDefaultIconInfoSerializer();
|
||||
|
||||
details::ISerializerBase<nn::sl::TitleInfo> &
|
||||
GetDefaultQuickStartTitleInfoSerializer();
|
||||
details::ISerializerBase<nn::sl::TitleInfo> &GetDefaultQuickStartTitleInfoSerializer();
|
||||
|
||||
details::ISerializerBase<nn::sl::KillerNotification> &
|
||||
GetDefaultKillerNotificationSerializer();
|
||||
details::ISerializerBase<nn::sl::KillerNotification> &GetDefaultKillerNotificationSerializer();
|
||||
|
||||
details::ISerializerBase<nn::sl::TitleInfo> &
|
||||
GetDefaultJumpTitleInfoSerializer();
|
||||
details::ISerializerBase<nn::sl::TitleInfo> &GetDefaultJumpTitleInfoSerializer();
|
||||
|
||||
details::ISerializerBase<OSTime> &
|
||||
GetDefaultPreviousSendingTimeSerializer();
|
||||
details::ISerializerBase<OSTime> &GetDefaultPreviousSendingTimeSerializer();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ISettingAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class ISettingAccessor : public details::ISettingAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class ISettingAccessor : public details::ISettingAccessorBase {
|
||||
|
||||
public:
|
||||
ISettingAccessor()
|
||||
{
|
||||
ISettingAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ISettingAccessor(ISettingAccessor &src)
|
||||
{
|
||||
ISettingAccessor(ISettingAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ISettingAccessor &
|
||||
operator=(const ISettingAccessor &other)
|
||||
{
|
||||
ISettingAccessor &operator=(const ISettingAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ISettingAccessor &
|
||||
operator=(ISettingAccessor &&src) noexcept
|
||||
{
|
||||
ISettingAccessor &operator=(ISettingAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,21 +32,15 @@ public:
|
|||
~ISettingAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::ISettingAccessorInternal *instance, Setting *outSetting)
|
||||
{
|
||||
static nn::Result GetWrapper(details::ISettingAccessorInternal *instance, Setting *outSetting) {
|
||||
return instance->vtable->instance->Get(outSetting);
|
||||
}
|
||||
|
||||
details::ISettingAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ISettingAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -64,8 +50,7 @@ private:
|
|||
details::ISettingAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ISettingAccessorBase &
|
||||
GetDefaultSettingAccessor();
|
||||
details::ISettingAccessorBase &GetDefaultSettingAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IStreamDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IStream : public details::IStreamBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IStream : public details::IStreamBase {
|
||||
|
||||
public:
|
||||
IStream()
|
||||
{
|
||||
IStream() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IStream(IStream &src)
|
||||
{
|
||||
IStream(IStream &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IStream &
|
||||
operator=(const IStream &other)
|
||||
{
|
||||
IStream &operator=(const IStream &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IStream &
|
||||
operator=(IStream &&src) noexcept
|
||||
{
|
||||
IStream &operator=(IStream &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,39 +32,27 @@ public:
|
|||
~IStream() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
ReadWrapper(details::IStreamInternal *instance, uint32_t *bytesRead, void *buffer, uint32_t readSize)
|
||||
{
|
||||
static nn::Result ReadWrapper(details::IStreamInternal *instance, uint32_t *bytesRead, void *buffer, uint32_t readSize) {
|
||||
return instance->vtable->instance->Read(bytesRead, buffer, readSize);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
WriteWrapper(details::IStreamInternal *instance, uint32_t *bytesWritten, void *buffer, uint32_t readSize)
|
||||
{
|
||||
static nn::Result WriteWrapper(details::IStreamInternal *instance, uint32_t *bytesWritten, void *buffer, uint32_t readSize) {
|
||||
return instance->vtable->instance->Write(bytesWritten, buffer, readSize);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
GetSizeWrapper(details::IStreamInternal *instance, uint32_t *fileSize)
|
||||
{
|
||||
static nn::Result GetSizeWrapper(details::IStreamInternal *instance, uint32_t *fileSize) {
|
||||
return instance->vtable->instance->GetSize(fileSize);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
SeekWrapper(details::IStreamInternal *instance, int32_t offset, nn::sl::SeekOrigin seekOrigin)
|
||||
{
|
||||
static nn::Result SeekWrapper(details::IStreamInternal *instance, int32_t offset, nn::sl::SeekOrigin seekOrigin) {
|
||||
return instance->vtable->instance->Seek(offset, seekOrigin);
|
||||
}
|
||||
|
||||
details::IStreamInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IStreamInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.ReadFn = &ReadWrapper,
|
||||
.WriteFn = &WriteWrapper,
|
||||
|
|
|
|||
|
|
@ -1,40 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <coreinit/time.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ITimeAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class ITimeAccessor : public details::ITimeAccessorBase
|
||||
{
|
||||
class ITimeAccessor : public details::ITimeAccessorBase {
|
||||
|
||||
public:
|
||||
ITimeAccessor()
|
||||
{
|
||||
ITimeAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITimeAccessor(ITimeAccessor &src)
|
||||
{
|
||||
ITimeAccessor(ITimeAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITimeAccessor &
|
||||
operator=(const ITimeAccessor &other)
|
||||
{
|
||||
ITimeAccessor &operator=(const ITimeAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ITimeAccessor &
|
||||
operator=(ITimeAccessor &&src) noexcept
|
||||
{
|
||||
ITimeAccessor &operator=(ITimeAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -42,26 +34,18 @@ public:
|
|||
~ITimeAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetNetworkTimeWrapper(details::ITimeAccessorInternal *instance, OSTime *timeOut, bool *successOut)
|
||||
{
|
||||
static nn::Result GetNetworkTimeWrapper(details::ITimeAccessorInternal *instance, OSTime *timeOut, bool *successOut) {
|
||||
return instance->vtable->instance->GetNetworkTime(timeOut, successOut);
|
||||
}
|
||||
static nn::Result
|
||||
GetLocalTimeWrapper(details::ITimeAccessorInternal *instance, OSTime *timeOut, bool *successOut)
|
||||
{
|
||||
static nn::Result GetLocalTimeWrapper(details::ITimeAccessorInternal *instance, OSTime *timeOut, bool *successOut) {
|
||||
return instance->vtable->instance->GetLocalTime(timeOut, successOut);
|
||||
}
|
||||
|
||||
details::ITimeAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ITimeAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetNetworkTimeFn = &GetNetworkTimeWrapper,
|
||||
.GetLocalTimeFn = &GetLocalTimeWrapper};
|
||||
|
|
@ -72,8 +56,7 @@ private:
|
|||
details::ITimeAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ITimeAccessorBase &
|
||||
GetDefaultTimeAccessor();
|
||||
details::ITimeAccessorBase &GetDefaultTimeAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,39 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ITitleIconCacheDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class ITitleIconCache : public details::ITitleIconCacheBase
|
||||
{
|
||||
class ITitleIconCache : public details::ITitleIconCacheBase {
|
||||
|
||||
public:
|
||||
ITitleIconCache()
|
||||
{
|
||||
ITitleIconCache() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITitleIconCache(ITitleIconCache &src)
|
||||
{
|
||||
ITitleIconCache(ITitleIconCache &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITitleIconCache &
|
||||
operator=(const ITitleIconCache &other)
|
||||
{
|
||||
ITitleIconCache &operator=(const ITitleIconCache &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ITitleIconCache &
|
||||
operator=(ITitleIconCache &&src) noexcept
|
||||
{
|
||||
ITitleIconCache &operator=(ITitleIconCache &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -41,39 +33,27 @@ public:
|
|||
~ITitleIconCache() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
LoadWrapper(details::ITitleIconCacheInternal *instance)
|
||||
{
|
||||
static nn::Result LoadWrapper(details::ITitleIconCacheInternal *instance) {
|
||||
return instance->vtable->instance->Load();
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
UpdateWrapper(details::ITitleIconCacheInternal *instance, TitleInfo *titleInfos, int num)
|
||||
{
|
||||
static nn::Result UpdateWrapper(details::ITitleIconCacheInternal *instance, TitleInfo *titleInfos, int num) {
|
||||
return instance->vtable->instance->Update(titleInfos, num);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
StoreWrapper(details::ITitleIconCacheInternal *instance)
|
||||
{
|
||||
static nn::Result StoreWrapper(details::ITitleIconCacheInternal *instance) {
|
||||
return instance->vtable->instance->Store();
|
||||
}
|
||||
|
||||
static void
|
||||
GetWrapper(details::ITitleIconCacheInternal *instance, IconInfo *iconInfos, int num)
|
||||
{
|
||||
static void GetWrapper(details::ITitleIconCacheInternal *instance, IconInfo *iconInfos, int num) {
|
||||
return instance->vtable->instance->Get(iconInfos, num);
|
||||
}
|
||||
|
||||
details::ITitleIconCacheInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ITitleIconCacheInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.LoadFn = &LoadWrapper,
|
||||
.UpdateFn = &UpdateWrapper,
|
||||
|
|
@ -86,8 +66,7 @@ private:
|
|||
details::ITitleIconCacheInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ITitleIconCacheBase &
|
||||
GetDefaultTitleIconCache();
|
||||
details::ITitleIconCacheBase &GetDefaultTitleIconCache();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,40 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ITitleListAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class ITitleListAccessor : public details::ITitleListAccessorBase
|
||||
{
|
||||
class ITitleListAccessor : public details::ITitleListAccessorBase {
|
||||
|
||||
public:
|
||||
ITitleListAccessor()
|
||||
{
|
||||
ITitleListAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
|
||||
ITitleListAccessor(ITitleListAccessor &src)
|
||||
{
|
||||
ITitleListAccessor(ITitleListAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITitleListAccessor &
|
||||
operator=(const ITitleListAccessor &other)
|
||||
{
|
||||
ITitleListAccessor &operator=(const ITitleListAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ITitleListAccessor &
|
||||
operator=(ITitleListAccessor &&src) noexcept
|
||||
{
|
||||
ITitleListAccessor &operator=(ITitleListAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -42,21 +34,15 @@ public:
|
|||
~ITitleListAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::ITitleListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos)
|
||||
{
|
||||
static nn::Result GetWrapper(details::ITitleListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) {
|
||||
return instance->vtable->instance->Get(outTitleInfos, outTitleInfosSize, maxTitleInfos);
|
||||
}
|
||||
|
||||
details::ITitleListAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ITitleListAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
mInstance.vtable = &mVTable;
|
||||
|
|
@ -66,8 +52,7 @@ private:
|
|||
details::ITitleListAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ITitleListAccessorBase &
|
||||
GetDefaultTitleListAccessor();
|
||||
details::ITitleListAccessorBase &GetDefaultTitleListAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/ITransferrerDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class ITransferrer : public details::ITransferrerBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class ITransferrer : public details::ITransferrerBase {
|
||||
|
||||
public:
|
||||
ITransferrer()
|
||||
{
|
||||
ITransferrer() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITransferrer(ITransferrer &src)
|
||||
{
|
||||
ITransferrer(ITransferrer &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
ITransferrer &
|
||||
operator=(const ITransferrer &other)
|
||||
{
|
||||
ITransferrer &operator=(const ITransferrer &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ITransferrer &
|
||||
operator=(ITransferrer &&src) noexcept
|
||||
{
|
||||
ITransferrer &operator=(ITransferrer &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,41 +32,27 @@ public:
|
|||
~ITransferrer() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
TransferDeprecatedWrapper(details::ITransferrerInternal *instance, void *buffer, uint32_t size, bool setKillerNotification, int transferMode)
|
||||
{
|
||||
static nn::Result TransferDeprecatedWrapper(details::ITransferrerInternal *instance, void *buffer, uint32_t size, bool setKillerNotification, int transferMode) {
|
||||
return instance->vtable->instance->TransferDeprecated(buffer, size, setKillerNotification, transferMode);
|
||||
}
|
||||
static nn::Result
|
||||
TransferWrapper(details::ITransferrerInternal *instance, void *buffer, uint32_t size, bool setKillerNotification, TransferMode transferMode)
|
||||
{
|
||||
static nn::Result TransferWrapper(details::ITransferrerInternal *instance, void *buffer, uint32_t size, bool setKillerNotification, TransferMode transferMode) {
|
||||
return instance->vtable->instance->Transfer(buffer, size, setKillerNotification, transferMode);
|
||||
}
|
||||
static nn::Result
|
||||
CancelTransferWrapper(details::ITransferrerInternal *instance)
|
||||
{
|
||||
static nn::Result CancelTransferWrapper(details::ITransferrerInternal *instance) {
|
||||
return instance->vtable->instance->CancelTransfer();
|
||||
}
|
||||
static nn::Result
|
||||
InvalidateNotificationWrapper(details::ITransferrerInternal *instance, uint32_t u1)
|
||||
{
|
||||
static nn::Result InvalidateNotificationWrapper(details::ITransferrerInternal *instance, uint32_t u1) {
|
||||
return instance->vtable->instance->InvalidateNotification(u1);
|
||||
}
|
||||
static nn::Result
|
||||
DisplayNotificationWrapper(details::ITransferrerInternal *instance, uint32_t u1, uint32_t u2, uint32_t u3)
|
||||
{
|
||||
static nn::Result DisplayNotificationWrapper(details::ITransferrerInternal *instance, uint32_t u1, uint32_t u2, uint32_t u3) {
|
||||
return instance->vtable->instance->DisplayNotification(u1, u2, u3);
|
||||
}
|
||||
|
||||
details::ITransferrerInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ITransferrerInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.TransferDeprecatedFn = &TransferDeprecatedWrapper,
|
||||
.TransferFn = &TransferWrapper,
|
||||
|
|
@ -88,8 +66,7 @@ private:
|
|||
details::ITransferrerInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::ITransferrerBase &
|
||||
GetDrcTransferrer();
|
||||
details::ITransferrerBase &GetDrcTransferrer();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,37 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IUpdatePackageAccessorDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IUpdatePackageAccessor : public details::IUpdatePackageAccessorBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IUpdatePackageAccessor : public details::IUpdatePackageAccessorBase {
|
||||
|
||||
public:
|
||||
IUpdatePackageAccessor()
|
||||
{
|
||||
IUpdatePackageAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IUpdatePackageAccessor(IUpdatePackageAccessor &src)
|
||||
{
|
||||
IUpdatePackageAccessor(IUpdatePackageAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IUpdatePackageAccessor &
|
||||
operator=(const IUpdatePackageAccessor &other)
|
||||
{
|
||||
IUpdatePackageAccessor &operator=(const IUpdatePackageAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IUpdatePackageAccessor &
|
||||
operator=(IUpdatePackageAccessor &&src) noexcept
|
||||
{
|
||||
IUpdatePackageAccessor &operator=(IUpdatePackageAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -39,26 +31,18 @@ public:
|
|||
~IUpdatePackageAccessor() override = default;
|
||||
|
||||
private:
|
||||
static bool
|
||||
PackageExistsWrapper(details::IUpdatePackageAccessorInternal *instance)
|
||||
{
|
||||
static bool PackageExistsWrapper(details::IUpdatePackageAccessorInternal *instance) {
|
||||
return instance->vtable->instance->PackageExists();
|
||||
}
|
||||
static bool
|
||||
IsUpdatePackageDownloadedWrapper(details::IUpdatePackageAccessorInternal *instance)
|
||||
{
|
||||
static bool IsUpdatePackageDownloadedWrapper(details::IUpdatePackageAccessorInternal *instance) {
|
||||
return instance->vtable->instance->IsUpdatePackageDownloaded();
|
||||
}
|
||||
|
||||
details::IUpdatePackageAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IUpdatePackageAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.PackageExistsFn = PackageExistsWrapper,
|
||||
.IsUpdatePackageDownloadedFn = IsUpdatePackageDownloadedWrapper};
|
||||
|
|
@ -69,8 +53,7 @@ private:
|
|||
details::IUpdatePackageAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IUpdatePackageAccessorBase &
|
||||
GetDefaultUpdatePackageAccessor();
|
||||
details::IUpdatePackageAccessorBase &GetDefaultUpdatePackageAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,39 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/details/IWhiteListAccessorDetails.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
class IWhiteListAccessor : public details::IWhiteListAccessorBase
|
||||
{
|
||||
class IWhiteListAccessor : public details::IWhiteListAccessorBase {
|
||||
|
||||
public:
|
||||
IWhiteListAccessor()
|
||||
{
|
||||
IWhiteListAccessor() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IWhiteListAccessor(IWhiteListAccessor &src)
|
||||
{
|
||||
IWhiteListAccessor(IWhiteListAccessor &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IWhiteListAccessor &
|
||||
operator=(const IWhiteListAccessor &other)
|
||||
{
|
||||
IWhiteListAccessor &operator=(const IWhiteListAccessor &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IWhiteListAccessor &
|
||||
operator=(IWhiteListAccessor &&src) noexcept
|
||||
{
|
||||
IWhiteListAccessor &operator=(IWhiteListAccessor &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -41,21 +33,15 @@ public:
|
|||
~IWhiteListAccessor() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
GetWrapper(details::IWhiteListAccessorInternal *instance, nn::sl::WhiteList *outWhiteList)
|
||||
{
|
||||
static nn::Result GetWrapper(details::IWhiteListAccessorInternal *instance, nn::sl::WhiteList *outWhiteList) {
|
||||
return instance->vtable->instance->Get(outWhiteList);
|
||||
}
|
||||
|
||||
details::IWhiteListAccessorInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IWhiteListAccessorInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
|
||||
mVTable = {.instance = this,
|
||||
.GetFn = &GetWrapper};
|
||||
|
|
@ -66,8 +52,7 @@ private:
|
|||
details::IWhiteListAccessorInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
details::IWhiteListAccessorBase &
|
||||
GetDefaultWhiteListAccessor();
|
||||
details::IWhiteListAccessorBase &GetDefaultWhiteListAccessor();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,63 +1,52 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include "sl_cpp.h"
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/KillerNotification.h>
|
||||
#include "sl_cpp.h"
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
struct KillerNotification;
|
||||
namespace details
|
||||
{
|
||||
extern "C" nn::Result
|
||||
__CPR81__CheckEmptyValue__Q3_2nn2sl18KillerNotificationSFPbPCQ3_2nn2slJ26J(bool *u1, const KillerNotification *u2);
|
||||
extern "C" void
|
||||
__CPR76__GetEmptyValue__Q3_2nn2sl18KillerNotificationSFPQ3_2nn2slJ24J(KillerNotification *u1);
|
||||
namespace details {
|
||||
extern "C" nn::Result __CPR81__CheckEmptyValue__Q3_2nn2sl18KillerNotificationSFPbPCQ3_2nn2slJ26J(bool *u1, const KillerNotification *u2);
|
||||
extern "C" void __CPR76__GetEmptyValue__Q3_2nn2sl18KillerNotificationSFPQ3_2nn2slJ24J(KillerNotification *u1);
|
||||
} // namespace details
|
||||
|
||||
typedef enum KillerNotificationType
|
||||
{
|
||||
typedef enum KillerNotificationType {
|
||||
PROMOTION = 0,
|
||||
PUSH_APP = 1,
|
||||
NON_COMMERCIAL = 2
|
||||
} KillerNotificationType;
|
||||
|
||||
typedef enum KillerNotificationNotificationPattern
|
||||
{
|
||||
typedef enum KillerNotificationNotificationPattern {
|
||||
NORMAL = 0,
|
||||
SILENT = 1
|
||||
} KillerNotificationNotificationPattern;
|
||||
|
||||
typedef enum KillerNotificationGender
|
||||
{
|
||||
typedef enum KillerNotificationGender {
|
||||
UNKNOWN = 0,
|
||||
MALE = 1,
|
||||
FEMALE = 2
|
||||
} KillerNotificationGender;
|
||||
|
||||
typedef enum KillerNotificationAllowLocalAccount : int8_t
|
||||
{
|
||||
typedef enum KillerNotificationAllowLocalAccount : int8_t {
|
||||
ALLOW = 0,
|
||||
NOT_ALLOW = 1
|
||||
} KillerNotificationAllowLocalAccount;
|
||||
|
||||
typedef enum KillerNotificationAccountMailActivation : int8_t
|
||||
{
|
||||
typedef enum KillerNotificationAccountMailActivation : int8_t {
|
||||
NOT_ACTIVATED = 0,
|
||||
ANYBODY = 1
|
||||
} KillerNotificationAccountMailActivation;
|
||||
|
||||
typedef enum KillerNotificationConjunction
|
||||
{
|
||||
typedef enum KillerNotificationConjunction {
|
||||
AND = 0,
|
||||
OR = 1
|
||||
} KillerNotificationConjunction;
|
||||
|
||||
struct WUT_PACKED KillerNotificationInstalledTitleFilter
|
||||
{
|
||||
struct WUT_PACKED KillerNotificationInstalledTitleFilter {
|
||||
uint64_t titleId;
|
||||
KillerNotificationConjunction conjunction;
|
||||
};
|
||||
|
|
@ -65,8 +54,7 @@ WUT_CHECK_SIZE(KillerNotificationInstalledTitleFilter, 0x0C);
|
|||
WUT_CHECK_OFFSET(KillerNotificationInstalledTitleFilter, 0x00, titleId);
|
||||
WUT_CHECK_OFFSET(KillerNotificationInstalledTitleFilter, 0x08, conjunction);
|
||||
|
||||
struct WUT_PACKED KillerNotificationPlayedTitleFilter
|
||||
{
|
||||
struct WUT_PACKED KillerNotificationPlayedTitleFilter {
|
||||
uint64_t titleId;
|
||||
enum KillerNotificationConjunction conjunction;
|
||||
};
|
||||
|
|
@ -74,8 +62,7 @@ WUT_CHECK_SIZE(KillerNotificationPlayedTitleFilter, 0x0C);
|
|||
WUT_CHECK_OFFSET(KillerNotificationPlayedTitleFilter, 0x00, titleId);
|
||||
WUT_CHECK_OFFSET(KillerNotificationPlayedTitleFilter, 0x08, conjunction);
|
||||
|
||||
struct WUT_PACKED KillerNotificationTitleFilter
|
||||
{
|
||||
struct WUT_PACKED KillerNotificationTitleFilter {
|
||||
uint64_t titleId;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
int32_t played;
|
||||
|
|
@ -87,8 +74,7 @@ WUT_CHECK_OFFSET(KillerNotificationTitleFilter, 0x0C, played);
|
|||
WUT_CHECK_OFFSET(KillerNotificationTitleFilter, 0x14, installed);
|
||||
|
||||
|
||||
struct WUT_PACKED KillerNotification
|
||||
{
|
||||
struct WUT_PACKED KillerNotification {
|
||||
uint32_t serialId;
|
||||
uint32_t version;
|
||||
WUT_UNKNOWN_BYTES(16);
|
||||
|
|
@ -97,56 +83,46 @@ struct WUT_PACKED KillerNotification
|
|||
WUT_UNKNOWN_BYTES(3);
|
||||
KillerNotificationType type;
|
||||
KillerNotificationNotificationPattern notificationPattern;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint64_t titleId;
|
||||
char parameter[2048];
|
||||
} launchApplication;
|
||||
uint32_t priority;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
struct {
|
||||
DRCImagePalette palette; // the "main" image actually uses the button palette in the quick start menu
|
||||
uint8_t pixels[400][854]; // index of color in (button) palette - 854x400
|
||||
} main;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
DRCImagePalette palette;
|
||||
uint8_t pixels[160][487]; // index of color in palette - 487*160
|
||||
} button;
|
||||
WUT_PADDING_BYTES(0);
|
||||
char banner[290416]; // BMP! 854×85, Bit depth: 32
|
||||
} images;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
WUT_UNKNOWN_BYTES(12);
|
||||
struct WUT_PACKED
|
||||
{
|
||||
struct WUT_PACKED {
|
||||
uint64_t startUnixTime;
|
||||
uint64_t endUnixTime;
|
||||
} duration;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
uint32_t lifetime;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
struct {
|
||||
uint32_t lowerBound;
|
||||
uint32_t upperBound;
|
||||
} age;
|
||||
KillerNotificationGender gender;
|
||||
} account;
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint32_t titleCount;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
KillerNotificationTitleFilter titles[2];
|
||||
} titleFilter;
|
||||
WUT_UNKNOWN_BYTES(1);
|
||||
struct WUT_PACKED
|
||||
{
|
||||
struct WUT_PACKED {
|
||||
KillerNotificationAllowLocalAccount allowLocalAccount;
|
||||
WUT_UNKNOWN_BYTES(2);
|
||||
uint32_t ageRestrictionLowerBound;
|
||||
|
|
@ -158,16 +134,14 @@ struct WUT_PACKED KillerNotification
|
|||
WUT_UNKNOWN_BYTES(4);
|
||||
int8_t anticipatoryDownload;
|
||||
WUT_UNKNOWN_BYTES(15);
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int32_t installedTitleCount;
|
||||
enum KillerNotificationConjunction installedConjunction;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
struct KillerNotificationInstalledTitleFilter installedTitleFilter[2];
|
||||
};
|
||||
WUT_UNKNOWN_BYTES(12);
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
uint32_t playedTitleFilterCount;
|
||||
enum KillerNotificationConjunction playedConjunction;
|
||||
WUT_UNKNOWN_BYTES(4);
|
||||
|
|
@ -181,15 +155,11 @@ struct WUT_PACKED KillerNotification
|
|||
uint32_t tags;
|
||||
WUT_UNKNOWN_BYTES(256);
|
||||
|
||||
static nn::Result
|
||||
CheckEmptyValue(bool *outRes, const KillerNotification *u2)
|
||||
{
|
||||
static nn::Result CheckEmptyValue(bool *outRes, const KillerNotification *u2) {
|
||||
return details::__CPR81__CheckEmptyValue__Q3_2nn2sl18KillerNotificationSFPbPCQ3_2nn2slJ26J(outRes, u2);
|
||||
}
|
||||
|
||||
static void
|
||||
GetEmptyValue(KillerNotification *u1)
|
||||
{
|
||||
static void GetEmptyValue(KillerNotification *u1) {
|
||||
return details::__CPR76__GetEmptyValue__Q3_2nn2sl18KillerNotificationSFPQ3_2nn2slJ24J(u1);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/IAccountInfoAccessor.h>
|
||||
#include <nn/sl/IKillerNotificationAccessor.h>
|
||||
|
|
@ -12,15 +11,13 @@
|
|||
#include <nn/sl/KillerNotificationTransferRecordManager.h>
|
||||
#include <nn/sl/TitleListCache.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED KillerNotificationSelectorInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED KillerNotificationSelectorInternal {
|
||||
ILaunchedTitleListAccessorInternal *launchedTitleListAccessor;
|
||||
IKillerNotificationAccessorInternal *killerNotificationAccessor;
|
||||
ITitleListCacheInternal *titleListCache;
|
||||
|
|
@ -42,14 +39,10 @@ WUT_CHECK_OFFSET(KillerNotificationSelectorInternal, 0x18, timeAccessor);
|
|||
WUT_CHECK_OFFSET(KillerNotificationSelectorInternal, 0x1C, killerNotificationTransferRecordManager);
|
||||
WUT_CHECK_OFFSET(KillerNotificationSelectorInternal, 0x20, vtable);
|
||||
|
||||
extern "C" KillerNotificationSelectorInternal *
|
||||
__ct__Q3_2nn2sl26KillerNotificationSelectorFv(KillerNotificationSelectorInternal *);
|
||||
extern "C" void
|
||||
__dt__Q3_2nn2sl26KillerNotificationSelectorFv(KillerNotificationSelectorInternal *, int);
|
||||
extern "C" nn::Result
|
||||
Select__Q3_2nn2sl26KillerNotificationSelectorFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfoPb(KillerNotificationSelectorInternal *, KillerNotification *, TitleInfo *, bool *);
|
||||
extern "C" void
|
||||
Initialize__Q3_2nn2sl26KillerNotificationSelectorFRQ3_2nn2sl26ILaunchedTitleListAccessorRQ3_2nn2sl27IKillerNotificationAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl13ITimeAccessorRQ3_2nn2sl40IKillerNotificationTransferRecordManager(
|
||||
extern "C" KillerNotificationSelectorInternal *__ct__Q3_2nn2sl26KillerNotificationSelectorFv(KillerNotificationSelectorInternal *);
|
||||
extern "C" void __dt__Q3_2nn2sl26KillerNotificationSelectorFv(KillerNotificationSelectorInternal *, int);
|
||||
extern "C" nn::Result Select__Q3_2nn2sl26KillerNotificationSelectorFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfoPb(KillerNotificationSelectorInternal *, KillerNotification *, TitleInfo *, bool *);
|
||||
extern "C" void Initialize__Q3_2nn2sl26KillerNotificationSelectorFRQ3_2nn2sl26ILaunchedTitleListAccessorRQ3_2nn2sl27IKillerNotificationAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl13ITimeAccessorRQ3_2nn2sl40IKillerNotificationTransferRecordManager(
|
||||
KillerNotificationSelectorInternal *,
|
||||
ILaunchedTitleListAccessorInternal *,
|
||||
IKillerNotificationAccessorInternal *,
|
||||
|
|
@ -61,19 +54,16 @@ Initialize__Q3_2nn2sl26KillerNotificationSelectorFRQ3_2nn2sl26ILaunchedTitleList
|
|||
IKillerNotificationTransferRecordManagerInternal *);
|
||||
} // namespace details
|
||||
|
||||
class KillerNotificationSelector
|
||||
{
|
||||
class KillerNotificationSelector {
|
||||
public:
|
||||
KillerNotificationSelector() :
|
||||
mLaunchedTitleListAccessor(nullptr),
|
||||
KillerNotificationSelector() : mLaunchedTitleListAccessor(nullptr),
|
||||
mKillerNotificationAccessor(nullptr),
|
||||
mTitleListCache(nullptr),
|
||||
mKillerNotificationSerializer(nullptr),
|
||||
mSettingAccessor(nullptr),
|
||||
mAccountInfoAccessor(nullptr),
|
||||
mTimeAccessor(nullptr),
|
||||
mKillerNotificationTransferRecordManager(nullptr)
|
||||
{
|
||||
mKillerNotificationTransferRecordManager(nullptr) {
|
||||
if (__ct__Q3_2nn2sl26KillerNotificationSelectorFv(&mInstance) != nullptr) {
|
||||
mLaunchedTitleListAccessor = details::LaunchedTitleListAccessorFromPtr(mInstance.launchedTitleListAccessor);
|
||||
mKillerNotificationAccessor = details::KillerNotificationAccessorFromPtr(mInstance.killerNotificationAccessor);
|
||||
|
|
@ -86,75 +76,54 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
~KillerNotificationSelector()
|
||||
{
|
||||
~KillerNotificationSelector() {
|
||||
__dt__Q3_2nn2sl26KillerNotificationSelectorFv(&mInstance, 2);
|
||||
}
|
||||
|
||||
details::ILaunchedTitleListAccessorBase &
|
||||
GetLaunchedTitleListAccessor()
|
||||
{
|
||||
details::ILaunchedTitleListAccessorBase &GetLaunchedTitleListAccessor() {
|
||||
return mLaunchedTitleListAccessor;
|
||||
}
|
||||
|
||||
details::IKillerNotificationAccessorBase &
|
||||
GetKillerNotificationAccessor()
|
||||
{
|
||||
details::IKillerNotificationAccessorBase &GetKillerNotificationAccessor() {
|
||||
return mKillerNotificationAccessor;
|
||||
}
|
||||
|
||||
details::ITitleListCacheBase &
|
||||
GetTitleListCache()
|
||||
{
|
||||
details::ITitleListCacheBase &GetTitleListCache() {
|
||||
return mTitleListCache;
|
||||
}
|
||||
|
||||
details::ISerializerBase<KillerNotification> &
|
||||
GetKillerNotificationSerializer()
|
||||
{
|
||||
details::ISerializerBase<KillerNotification> &GetKillerNotificationSerializer() {
|
||||
return mKillerNotificationSerializer;
|
||||
}
|
||||
|
||||
details::ISettingAccessorBase &
|
||||
GetSettingAccessor()
|
||||
{
|
||||
details::ISettingAccessorBase &GetSettingAccessor() {
|
||||
return mSettingAccessor;
|
||||
}
|
||||
|
||||
details::IAccountInfoAccessorBase &
|
||||
GetAccountInfoAccessor()
|
||||
{
|
||||
details::IAccountInfoAccessorBase &GetAccountInfoAccessor() {
|
||||
return mAccountInfoAccessor;
|
||||
}
|
||||
|
||||
details::ITimeAccessorBase &
|
||||
GetTimeAccessor()
|
||||
{
|
||||
details::ITimeAccessorBase &GetTimeAccessor() {
|
||||
return mTimeAccessor;
|
||||
}
|
||||
|
||||
details::IKillerNotificationTransferRecordManagerBase &
|
||||
GetKillerNotificationTransferRecordManager()
|
||||
{
|
||||
details::IKillerNotificationTransferRecordManagerBase &GetKillerNotificationTransferRecordManager() {
|
||||
return mKillerNotificationTransferRecordManager;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Select(KillerNotification *outKillerNotification, TitleInfo *outKillerNotificationTitle, bool *u1)
|
||||
{
|
||||
nn::Result Select(KillerNotification *outKillerNotification, TitleInfo *outKillerNotificationTitle, bool *u1) {
|
||||
return Select__Q3_2nn2sl26KillerNotificationSelectorFPQ3_2nn2sl18KillerNotificationPQ3_2nn2sl9TitleInfoPb(&mInstance, outKillerNotification, outKillerNotificationTitle, u1);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::ILaunchedTitleListAccessorBase &launchedTitleListAccessor,
|
||||
void Initialize(details::ILaunchedTitleListAccessorBase &launchedTitleListAccessor,
|
||||
details::IKillerNotificationAccessorBase &killerNotificationAccessor,
|
||||
details::ITitleListCacheBase &titleListCache,
|
||||
details::ISerializerBase<KillerNotification> &killerNotificationSerializer,
|
||||
details::ISettingAccessorBase &settingAccessor,
|
||||
details::IAccountInfoAccessorBase &accountInfoAccessor,
|
||||
details::ITimeAccessorBase &timeAccessor,
|
||||
details::IKillerNotificationTransferRecordManagerBase &killerNotificationTransferRecordManager)
|
||||
{
|
||||
details::IKillerNotificationTransferRecordManagerBase &killerNotificationTransferRecordManager) {
|
||||
Initialize__Q3_2nn2sl26KillerNotificationSelectorFRQ3_2nn2sl26ILaunchedTitleListAccessorRQ3_2nn2sl27IKillerNotificationAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl49ISerializer__tm__30_Q3_2nn2sl18KillerNotificationRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl20IAccountInfoAccessorRQ3_2nn2sl13ITimeAccessorRQ3_2nn2sl40IKillerNotificationTransferRecordManager(
|
||||
&mInstance,
|
||||
launchedTitleListAccessor.GetInternal(),
|
||||
|
|
|
|||
|
|
@ -1,38 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/FileStream.h>
|
||||
#include <nn/sl/details/IKillerNotificationTransferRecordManagerDetails.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
class IKillerNotificationTransferRecordManager : public details::IKillerNotificationTransferRecordManagerBase
|
||||
{
|
||||
namespace nn::sl {
|
||||
class IKillerNotificationTransferRecordManager : public details::IKillerNotificationTransferRecordManagerBase {
|
||||
|
||||
public:
|
||||
IKillerNotificationTransferRecordManager()
|
||||
{
|
||||
IKillerNotificationTransferRecordManager() {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IKillerNotificationTransferRecordManager(IKillerNotificationTransferRecordManager &src)
|
||||
{
|
||||
IKillerNotificationTransferRecordManager(IKillerNotificationTransferRecordManager &src) {
|
||||
InitInternalVtable();
|
||||
}
|
||||
|
||||
IKillerNotificationTransferRecordManager &
|
||||
operator=(const IKillerNotificationTransferRecordManager &other)
|
||||
{
|
||||
IKillerNotificationTransferRecordManager &operator=(const IKillerNotificationTransferRecordManager &other) {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
||||
IKillerNotificationTransferRecordManager &
|
||||
operator=(IKillerNotificationTransferRecordManager &&src) noexcept
|
||||
{
|
||||
IKillerNotificationTransferRecordManager &operator=(IKillerNotificationTransferRecordManager &&src) noexcept {
|
||||
InitInternalVtable();
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -40,57 +32,39 @@ public:
|
|||
~IKillerNotificationTransferRecordManager() override = default;
|
||||
|
||||
private:
|
||||
static nn::Result
|
||||
LoadWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, nn::sl::details::IStreamInternal *stream)
|
||||
{
|
||||
static nn::Result LoadWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, nn::sl::details::IStreamInternal *stream) {
|
||||
return instance->vtable->instance->Load(*stream->vtable->instance);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
LoadInitialWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance)
|
||||
{
|
||||
static nn::Result LoadInitialWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance) {
|
||||
return instance->vtable->instance->LoadInitial();
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
StoreWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, nn::sl::details::IStreamInternal *stream)
|
||||
{
|
||||
static nn::Result StoreWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, nn::sl::details::IStreamInternal *stream) {
|
||||
return instance->vtable->instance->Store(*stream->vtable->instance);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
GetRecordCountWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance)
|
||||
{
|
||||
static uint32_t GetRecordCountWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance) {
|
||||
return instance->vtable->instance->GetRecordCount();
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
GetRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, KillerNotificationTransferRecord *u1, uint32_t u2)
|
||||
{
|
||||
static uint32_t GetRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, KillerNotificationTransferRecord *u1, uint32_t u2) {
|
||||
return instance->vtable->instance->GetRecords(u1, u2);
|
||||
}
|
||||
|
||||
static void
|
||||
RegisterRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const KillerNotificationTransferRecord *u1, uint32_t u2)
|
||||
{
|
||||
static void RegisterRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const KillerNotificationTransferRecord *u1, uint32_t u2) {
|
||||
return instance->vtable->instance->RegisterRecords(u1, u2);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
RegisterRecordsOtherWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const uint32_t *u1, uint32_t u2)
|
||||
{
|
||||
static nn::Result RegisterRecordsOtherWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const uint32_t *u1, uint32_t u2) {
|
||||
return instance->vtable->instance->RegisterRecords(u1, u2);
|
||||
}
|
||||
|
||||
details::IKillerNotificationTransferRecordManagerInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IKillerNotificationTransferRecordManagerInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
|
||||
void
|
||||
InitInternalVtable()
|
||||
{
|
||||
void InitInternalVtable() {
|
||||
mVTable = {.instance = this,
|
||||
.LoadFn = &LoadWrapper,
|
||||
.LoadInitialFn = &LoadInitialWrapper,
|
||||
|
|
@ -105,141 +79,101 @@ private:
|
|||
details::IKillerNotificationTransferRecordManagerInternalVTable mVTable{};
|
||||
};
|
||||
|
||||
class KillerNotificationTransferRecordManager : public details::IKillerNotificationTransferRecordManagerBase
|
||||
{
|
||||
class KillerNotificationTransferRecordManager : public details::IKillerNotificationTransferRecordManagerBase {
|
||||
public:
|
||||
KillerNotificationTransferRecordManager()
|
||||
{
|
||||
KillerNotificationTransferRecordManager() {
|
||||
__ct__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(&mInstance);
|
||||
}
|
||||
|
||||
~KillerNotificationTransferRecordManager() override
|
||||
{
|
||||
~KillerNotificationTransferRecordManager() override {
|
||||
__dt__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(&mInstance, 2);
|
||||
}
|
||||
|
||||
void
|
||||
Finalize() override
|
||||
{
|
||||
void Finalize() override {
|
||||
Finalize__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Load(nn::sl::details::IStreamBase &stream) override
|
||||
{
|
||||
nn::Result Load(nn::sl::details::IStreamBase &stream) override {
|
||||
return Load__Q3_2nn2sl39KillerNotificationTransferRecordManagerFRQ3_2nn2sl7IStream(&mInstance, stream.GetInternal());
|
||||
}
|
||||
|
||||
nn::Result
|
||||
LoadInitial() override
|
||||
{
|
||||
nn::Result LoadInitial() override {
|
||||
return LoadInitial__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Store(nn::sl::details::IStreamBase &stream) override
|
||||
{
|
||||
nn::Result Store(nn::sl::details::IStreamBase &stream) override {
|
||||
return Store__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFRQ3_2nn2sl7IStream(&mInstance, stream.GetInternal());
|
||||
}
|
||||
|
||||
uint32_t
|
||||
GetRecordCount() const override
|
||||
{
|
||||
uint32_t GetRecordCount() const override {
|
||||
return GetRecordCount__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFv((details::IKillerNotificationTransferRecordManagerInternal *) &mInstance);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override
|
||||
{
|
||||
uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override {
|
||||
return GetRecords__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFPQ3_2nn2sl32KillerNotificationTransferRecordUi((details::IKillerNotificationTransferRecordManagerInternal *) &mInstance, u1, u2);
|
||||
}
|
||||
|
||||
void
|
||||
RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override
|
||||
{
|
||||
void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override {
|
||||
RegisterRecords__Q3_2nn2sl39KillerNotificationTransferRecordManagerFPCQ3_2nn2sl32KillerNotificationTransferRecordUi(&mInstance, u1, u2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
RegisterRecords(const uint32_t *u1, uint32_t u2) override
|
||||
{
|
||||
nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override {
|
||||
return mInstance.vtable->RegisterRecordsOtherFn(&mInstance, u1, u2);
|
||||
}
|
||||
|
||||
private:
|
||||
details::IKillerNotificationTransferRecordManagerInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IKillerNotificationTransferRecordManagerInternal *GetInternal() override {
|
||||
return &mInstance;
|
||||
}
|
||||
details::IKillerNotificationTransferRecordManagerInternal mInstance = {};
|
||||
};
|
||||
|
||||
class KillerNotificationTransferRecordManagerInternal : public details::IKillerNotificationTransferRecordManagerBase
|
||||
{
|
||||
class KillerNotificationTransferRecordManagerInternal : public details::IKillerNotificationTransferRecordManagerBase {
|
||||
public:
|
||||
KillerNotificationTransferRecordManagerInternal()
|
||||
{
|
||||
KillerNotificationTransferRecordManagerInternal() {
|
||||
__ct__Q3_2nn2sl47KillerNotificationTransferRecordManagerInternalFv(&mInstance);
|
||||
}
|
||||
|
||||
~KillerNotificationTransferRecordManagerInternal() override
|
||||
{
|
||||
~KillerNotificationTransferRecordManagerInternal() override {
|
||||
__dt__Q3_2nn2sl47KillerNotificationTransferRecordManagerInternalFv(&mInstance, 2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Load(nn::sl::details::IStreamBase &stream) override
|
||||
{
|
||||
nn::Result Load(nn::sl::details::IStreamBase &stream) override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->LoadFn(base, stream.GetInternal());
|
||||
}
|
||||
|
||||
nn::Result
|
||||
LoadInitial() override
|
||||
{
|
||||
nn::Result LoadInitial() override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->LoadInitialFn(base);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Store(nn::sl::details::IStreamBase &stream) override
|
||||
{
|
||||
nn::Result Store(nn::sl::details::IStreamBase &stream) override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->StoreFn(base, stream.GetInternal());
|
||||
}
|
||||
|
||||
void
|
||||
Finalize() override
|
||||
{
|
||||
void Finalize() override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->FinalizeFn(base);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
GetRecordCount() const override
|
||||
{
|
||||
uint32_t GetRecordCount() const override {
|
||||
auto *base = (details::IKillerNotificationTransferRecordManagerInternal *) (&mInstance);
|
||||
return mInstance.vtable->GetRecordCountFn(base);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override
|
||||
{
|
||||
uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override {
|
||||
auto *base = (details::IKillerNotificationTransferRecordManagerInternal *) (&mInstance);
|
||||
return mInstance.vtable->GetRecordsFn(base, u1, u2);
|
||||
}
|
||||
|
||||
void
|
||||
RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override
|
||||
{
|
||||
void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->RegisterRecordsFn(base, u1, u2);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
RegisterRecords(const uint32_t *u1, uint32_t u2) override
|
||||
{
|
||||
nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override {
|
||||
auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
|
||||
return mInstance.vtable->RegisterRecordsOtherFn(base, u1, u2);
|
||||
}
|
||||
|
|
@ -248,8 +182,7 @@ private:
|
|||
details::KillerNotificationTransferRecordManagerInternalInternal mInstance = {};
|
||||
};
|
||||
|
||||
details::IKillerNotificationTransferRecordManagerBase &
|
||||
GetDefaultKillerNotificationTransferRecordManager();
|
||||
details::IKillerNotificationTransferRecordManagerBase &GetDefaultKillerNotificationTransferRecordManager();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -1,17 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/FileStream.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED KillerNotificationTransferRecordStreamInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED KillerNotificationTransferRecordStreamInternal {
|
||||
void *vtable;
|
||||
FileStreamInternal fileStream;
|
||||
uint32_t unkn1;
|
||||
|
|
@ -23,44 +20,31 @@ WUT_CHECK_OFFSET(KillerNotificationTransferRecordStreamInternal, 0x04, fileStrea
|
|||
WUT_CHECK_OFFSET(KillerNotificationTransferRecordStreamInternal, 0x14, unkn1);
|
||||
} // namespace details
|
||||
|
||||
class KillerNotificationTransferRecordStream : public nn::sl::details::IStreamBase
|
||||
{
|
||||
class KillerNotificationTransferRecordStream : public nn::sl::details::IStreamBase {
|
||||
public:
|
||||
explicit KillerNotificationTransferRecordStream(details::KillerNotificationTransferRecordStreamInternal *instance) :
|
||||
mInstance(instance)
|
||||
{
|
||||
explicit KillerNotificationTransferRecordStream(details::KillerNotificationTransferRecordStreamInternal *instance) : mInstance(instance) {
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override
|
||||
{
|
||||
nn::Result Read(uint32_t *bytesRead, void *buffer, uint32_t readSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->ReadFn(base, bytesRead, buffer, readSize);
|
||||
}
|
||||
nn::Result
|
||||
Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override
|
||||
{
|
||||
nn::Result Write(uint32_t *bytesWritten, void *buffer, uint32_t readSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->WriteFn(base, bytesWritten, buffer, readSize);
|
||||
}
|
||||
nn::Result
|
||||
GetSize(uint32_t *fileSize) override
|
||||
{
|
||||
nn::Result GetSize(uint32_t *fileSize) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->GetSizeFn(base, fileSize);
|
||||
}
|
||||
nn::Result
|
||||
Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override
|
||||
{
|
||||
nn::Result Seek(int32_t offset, nn::sl::SeekOrigin seekOrigin) override {
|
||||
auto *base = reinterpret_cast<details::IStreamInternal *>(&mInstance);
|
||||
return base->vtable->SeekFn(base, offset, seekOrigin);
|
||||
}
|
||||
|
||||
~KillerNotificationTransferRecordStream() override = default;
|
||||
|
||||
details::IStreamInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::IStreamInternal *GetInternal() override {
|
||||
return reinterpret_cast<details::IStreamInternal *>(mInstance);
|
||||
}
|
||||
|
||||
|
|
@ -68,8 +52,7 @@ private:
|
|||
details::KillerNotificationTransferRecordStreamInternal *mInstance = {};
|
||||
};
|
||||
|
||||
nn::sl::details::IStreamBase &
|
||||
GetDefaultKillerNotificationTransferRecordStream();
|
||||
nn::sl::details::IStreamBase &GetDefaultKillerNotificationTransferRecordStream();
|
||||
} // namespace nn::sl
|
||||
|
||||
#endif
|
||||
|
|
@ -2,18 +2,15 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/FileStream.h>
|
||||
#include <nn/sl/sl_cpp.h>
|
||||
#include <optional>
|
||||
#include <wut.h>
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED LaunchInfoDatabaseInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED LaunchInfoDatabaseInternal {
|
||||
uint64_t *currentIdPtr;
|
||||
uint32_t *entryCountPtr;
|
||||
uint32_t *maxEntriesPtr;
|
||||
|
|
@ -31,160 +28,117 @@ WUT_CHECK_OFFSET(LaunchInfoDatabaseInternal, 0x10, entriesPtr);
|
|||
WUT_CHECK_OFFSET(LaunchInfoDatabaseInternal, 0x14, systemTablePtr);
|
||||
WUT_CHECK_OFFSET(LaunchInfoDatabaseInternal, 0x18, systemTableNum);
|
||||
|
||||
extern "C" LaunchInfoDatabaseInternal *
|
||||
__ct__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" nn::Result
|
||||
Store__Q3_2nn2sl18LaunchInfoDatabaseCFRQ3_2nn2sl7IStream(LaunchInfoDatabaseInternal *, nn::sl::details::IStreamInternal *);
|
||||
extern "C" nn::Result
|
||||
Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamQ3_2nn2sl6Region(LaunchInfoDatabaseInternal *, nn::sl::details::IStreamInternal *, nn::sl::Region);
|
||||
extern "C" nn::Result
|
||||
LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiQ3_2nn2sl6Region(LaunchInfoDatabaseInternal *, int, nn::sl::Region);
|
||||
extern "C" nn::Result
|
||||
GetLaunchInfoById__Q3_2nn2sl18LaunchInfoDatabaseCFPQ3_2nn2sl10LaunchInfoUL(LaunchInfoDatabaseInternal *, nn::sl::LaunchInfo *, uint64_t titleId);
|
||||
extern "C" void
|
||||
Finalize__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint32_t
|
||||
GetEntryCount__Q3_2nn2sl18LaunchInfoDatabaseCFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" void
|
||||
Clear__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint64_t
|
||||
GetCurrentId__Q3_2nn2sl18LaunchInfoDatabaseCFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint64_t
|
||||
Register__Q3_2nn2sl18LaunchInfoDatabaseFRCQ3_2nn2sl10LaunchInfo(LaunchInfoDatabaseInternal *, const nn::sl::LaunchInfo &);
|
||||
extern "C" nn::Result
|
||||
Unregister__Q3_2nn2sl18LaunchInfoDatabaseFUL(LaunchInfoDatabaseInternal *, uint64_t);
|
||||
extern "C" nn::Result
|
||||
__CPR84__LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiPCQ4_2nn2slJ22J5EntryT1(LaunchInfoDatabaseInternal *, uint32_t max_entries, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum);
|
||||
extern "C" uint32_t
|
||||
__CPR86__ListLaunchInfos__Q3_2nn2sl18LaunchInfoDatabaseCFPQ4_2nn2slJ26J5EntryUi(LaunchInfoDatabaseInternal *, nn::sl::LaunchInfoDatabaseEntry *entriesOut, uint32_t num);
|
||||
extern "C" nn::Result
|
||||
__CPR93__Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamPCQ4_2nn2slJ15J5EntryUi(LaunchInfoDatabaseInternal *, details::IStreamInternal *stream, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum);
|
||||
extern "C" LaunchInfoDatabaseInternal *__ct__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" nn::Result Store__Q3_2nn2sl18LaunchInfoDatabaseCFRQ3_2nn2sl7IStream(LaunchInfoDatabaseInternal *, nn::sl::details::IStreamInternal *);
|
||||
extern "C" nn::Result Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamQ3_2nn2sl6Region(LaunchInfoDatabaseInternal *, nn::sl::details::IStreamInternal *, nn::sl::Region);
|
||||
extern "C" nn::Result LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiQ3_2nn2sl6Region(LaunchInfoDatabaseInternal *, int, nn::sl::Region);
|
||||
extern "C" nn::Result GetLaunchInfoById__Q3_2nn2sl18LaunchInfoDatabaseCFPQ3_2nn2sl10LaunchInfoUL(LaunchInfoDatabaseInternal *, nn::sl::LaunchInfo *, uint64_t titleId);
|
||||
extern "C" void Finalize__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint32_t GetEntryCount__Q3_2nn2sl18LaunchInfoDatabaseCFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" void Clear__Q3_2nn2sl18LaunchInfoDatabaseFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint64_t GetCurrentId__Q3_2nn2sl18LaunchInfoDatabaseCFv(LaunchInfoDatabaseInternal *);
|
||||
extern "C" uint64_t Register__Q3_2nn2sl18LaunchInfoDatabaseFRCQ3_2nn2sl10LaunchInfo(LaunchInfoDatabaseInternal *, const nn::sl::LaunchInfo &);
|
||||
extern "C" nn::Result Unregister__Q3_2nn2sl18LaunchInfoDatabaseFUL(LaunchInfoDatabaseInternal *, uint64_t);
|
||||
extern "C" nn::Result __CPR84__LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiPCQ4_2nn2slJ22J5EntryT1(LaunchInfoDatabaseInternal *, uint32_t max_entries, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum);
|
||||
extern "C" uint32_t __CPR86__ListLaunchInfos__Q3_2nn2sl18LaunchInfoDatabaseCFPQ4_2nn2slJ26J5EntryUi(LaunchInfoDatabaseInternal *, nn::sl::LaunchInfoDatabaseEntry *entriesOut, uint32_t num);
|
||||
extern "C" nn::Result __CPR93__Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamPCQ4_2nn2slJ15J5EntryUi(LaunchInfoDatabaseInternal *, details::IStreamInternal *stream, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum);
|
||||
} // namespace details
|
||||
|
||||
class LaunchInfoDatabase
|
||||
{
|
||||
class LaunchInfoDatabase {
|
||||
public:
|
||||
LaunchInfoDatabase()
|
||||
{
|
||||
LaunchInfoDatabase() {
|
||||
__ct__Q3_2nn2sl18LaunchInfoDatabaseFv(&mInstance);
|
||||
}
|
||||
|
||||
~LaunchInfoDatabase()
|
||||
{
|
||||
~LaunchInfoDatabase() {
|
||||
Finalize();
|
||||
}
|
||||
|
||||
void
|
||||
Finalize()
|
||||
{
|
||||
void Finalize() {
|
||||
// Only actually call finalize if the database is still loaded, otherwise we might trigger an assertion.
|
||||
if (mInstance.pDatabase != nullptr) {
|
||||
Finalize__Q3_2nn2sl18LaunchInfoDatabaseFv(&mInstance);
|
||||
}
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Load(nn::sl::details::IStreamBase &fileStream, nn::sl::Region region)
|
||||
{
|
||||
nn::Result Load(nn::sl::details::IStreamBase &fileStream, nn::sl::Region region) {
|
||||
if (mInstance.pDatabase != nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return Load__Q3_2nn2sl18LaunchInfoDatabaseFRQ3_2nn2sl7IStreamQ3_2nn2sl6Region(&mInstance, fileStream.GetInternal(), region);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Store(nn::sl::details::IStreamBase &fileStream)
|
||||
{
|
||||
nn::Result Store(nn::sl::details::IStreamBase &fileStream) {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return Store__Q3_2nn2sl18LaunchInfoDatabaseCFRQ3_2nn2sl7IStream(&mInstance, fileStream.GetInternal());
|
||||
}
|
||||
|
||||
nn::Result
|
||||
LoadInitial(int maxEntries, nn::sl::Region region)
|
||||
{
|
||||
nn::Result LoadInitial(int maxEntries, nn::sl::Region region) {
|
||||
if (mInstance.pDatabase != nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiQ3_2nn2sl6Region(&mInstance, maxEntries, region);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
GetLaunchInfoById(nn::sl::LaunchInfo *launchInfo, uint64_t id) const
|
||||
{
|
||||
nn::Result GetLaunchInfoById(nn::sl::LaunchInfo *launchInfo, uint64_t id) const {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return GetLaunchInfoById__Q3_2nn2sl18LaunchInfoDatabaseCFPQ3_2nn2sl10LaunchInfoUL((details::LaunchInfoDatabaseInternal *) &mInstance, launchInfo, id);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::optional<uint32_t>
|
||||
GetEntryCount() const
|
||||
{
|
||||
[[nodiscard]] std::optional<uint32_t> GetEntryCount() const {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {};
|
||||
}
|
||||
return details::GetEntryCount__Q3_2nn2sl18LaunchInfoDatabaseCFv((details::LaunchInfoDatabaseInternal *) &mInstance);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::optional<uint64_t>
|
||||
GetCurrentId() const
|
||||
{
|
||||
[[nodiscard]] std::optional<uint64_t> GetCurrentId() const {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {};
|
||||
}
|
||||
return details::GetCurrentId__Q3_2nn2sl18LaunchInfoDatabaseCFv((details::LaunchInfoDatabaseInternal *) &mInstance);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::optional<uint64_t>
|
||||
Register(const nn::sl::LaunchInfo &launchInfo)
|
||||
{
|
||||
[[nodiscard]] std::optional<uint64_t> Register(const nn::sl::LaunchInfo &launchInfo) {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {};
|
||||
}
|
||||
return details::Register__Q3_2nn2sl18LaunchInfoDatabaseFRCQ3_2nn2sl10LaunchInfo((details::LaunchInfoDatabaseInternal *) &mInstance, launchInfo);
|
||||
}
|
||||
|
||||
[[nodiscard]] nn::Result
|
||||
Unregister(uint64_t id)
|
||||
{
|
||||
[[nodiscard]] nn::Result Unregister(uint64_t id) {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return details::Unregister__Q3_2nn2sl18LaunchInfoDatabaseFUL((details::LaunchInfoDatabaseInternal *) &mInstance, id);
|
||||
}
|
||||
|
||||
void
|
||||
Clear()
|
||||
{
|
||||
void Clear() {
|
||||
if (mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return;
|
||||
}
|
||||
return details::Clear__Q3_2nn2sl18LaunchInfoDatabaseFv(&mInstance);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
LoadInitial(LaunchInfoDatabase &launchDatabase, uint32_t maxEntries, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum)
|
||||
{
|
||||
static nn::Result LoadInitial(LaunchInfoDatabase &launchDatabase, uint32_t maxEntries, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum) {
|
||||
if (launchDatabase.mInstance.pDatabase != nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
return details::__CPR84__LoadInitial__Q3_2nn2sl18LaunchInfoDatabaseFUiPCQ4_2nn2slJ22J5EntryT1(&launchDatabase.mInstance, maxEntries, defaultEntries, defaultEntryNum);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
ListLaunchInfos(const LaunchInfoDatabase &launchDatabase, nn::sl::LaunchInfoDatabaseEntry *entriesOut, uint32_t num)
|
||||
{
|
||||
static uint32_t ListLaunchInfos(const LaunchInfoDatabase &launchDatabase, nn::sl::LaunchInfoDatabaseEntry *entriesOut, uint32_t num) {
|
||||
if (launchDatabase.mInstance.pDatabase == nullptr) { // Avoid triggering an assertion
|
||||
return 0;
|
||||
}
|
||||
return details::__CPR86__ListLaunchInfos__Q3_2nn2sl18LaunchInfoDatabaseCFPQ4_2nn2slJ26J5EntryUi((details::LaunchInfoDatabaseInternal *) &launchDatabase.mInstance, entriesOut, num);
|
||||
}
|
||||
|
||||
static nn::Result
|
||||
Load(LaunchInfoDatabase &launchDatabase, nn::sl::details::IStreamBase &fileStream, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum)
|
||||
{
|
||||
static nn::Result Load(LaunchInfoDatabase &launchDatabase, nn::sl::details::IStreamBase &fileStream, nn::sl::LaunchInfoDatabaseEntry *defaultEntries, uint32_t defaultEntryNum) {
|
||||
if (launchDatabase.mInstance.pDatabase != nullptr) { // Avoid triggering an assertion
|
||||
return {Result::LEVEL_FATAL, Result::RESULT_MODULE_NN_SL, 0};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <wut.h>
|
||||
#include <nn/result.h>
|
||||
#include <nn/sl/IBlackListAccessor.h>
|
||||
#include <nn/sl/IDefaultTitleAccessor.h>
|
||||
|
|
@ -8,15 +7,13 @@
|
|||
#include <nn/sl/ISettingAccessor.h>
|
||||
#include <nn/sl/IWhiteListAccessor.h>
|
||||
#include <nn/sl/TitleListCache.h>
|
||||
#include <wut.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED QuickStartApplicationSelectorInternal
|
||||
{
|
||||
namespace nn::sl {
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED QuickStartApplicationSelectorInternal {
|
||||
IPreferentialTitleAccessorInternal *preferentialTitleAccessor;
|
||||
IDefaultTitleAccessorInternal *defaultTitleAccessor;
|
||||
IWhiteListAccessorInternal *whiteListAccessor;
|
||||
|
|
@ -34,12 +31,9 @@ WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x10, settingsAccessor);
|
|||
WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x14, blackListAccessor);
|
||||
WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x18, vtable);
|
||||
|
||||
extern "C" QuickStartApplicationSelectorInternal *
|
||||
__ct__Q3_2nn2sl29QuickStartApplicationSelectorFv(QuickStartApplicationSelectorInternal *);
|
||||
extern "C" nn::Result
|
||||
Select__Q3_2nn2sl29QuickStartApplicationSelectorFPQ3_2nn2sl9TitleInfoi(QuickStartApplicationSelectorInternal *, nn::sl::TitleInfo *, int);
|
||||
extern "C" void
|
||||
Initialize__Q3_2nn2sl29QuickStartApplicationSelectorFRQ3_2nn2sl26IPreferentialTitleAccessorRQ3_2nn2sl21IDefaultTitleAccessorRQ3_2nn2sl18IWhiteListAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl18IBlackListAccessor(
|
||||
extern "C" QuickStartApplicationSelectorInternal *__ct__Q3_2nn2sl29QuickStartApplicationSelectorFv(QuickStartApplicationSelectorInternal *);
|
||||
extern "C" nn::Result Select__Q3_2nn2sl29QuickStartApplicationSelectorFPQ3_2nn2sl9TitleInfoi(QuickStartApplicationSelectorInternal *, nn::sl::TitleInfo *, int);
|
||||
extern "C" void Initialize__Q3_2nn2sl29QuickStartApplicationSelectorFRQ3_2nn2sl26IPreferentialTitleAccessorRQ3_2nn2sl21IDefaultTitleAccessorRQ3_2nn2sl18IWhiteListAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl18IBlackListAccessor(
|
||||
QuickStartApplicationSelectorInternal *,
|
||||
IPreferentialTitleAccessorInternal *,
|
||||
IDefaultTitleAccessorInternal *,
|
||||
|
|
@ -49,17 +43,14 @@ Initialize__Q3_2nn2sl29QuickStartApplicationSelectorFRQ3_2nn2sl26IPreferentialTi
|
|||
details::IBlackListAccessorInternal *);
|
||||
} // namespace details
|
||||
|
||||
class QuickStartApplicationSelector
|
||||
{
|
||||
class QuickStartApplicationSelector {
|
||||
public:
|
||||
QuickStartApplicationSelector() :
|
||||
mPreferentialTitleAccessorFromPtr(nullptr),
|
||||
QuickStartApplicationSelector() : mPreferentialTitleAccessorFromPtr(nullptr),
|
||||
mDefaultTitleAccessorFromPtr(nullptr),
|
||||
mWhiteListAccessorFromPtr(nullptr),
|
||||
mTitleListCacheFromPtr(nullptr),
|
||||
mSettingAccessorFromPtr(nullptr),
|
||||
mBlackListAccessorFromPtr(nullptr)
|
||||
{
|
||||
mBlackListAccessorFromPtr(nullptr) {
|
||||
if (__ct__Q3_2nn2sl29QuickStartApplicationSelectorFv(&mInstance) != nullptr) {
|
||||
mPreferentialTitleAccessorFromPtr = details::PreferentialTitleAccessorFromPtr(mInstance.preferentialTitleAccessor);
|
||||
mDefaultTitleAccessorFromPtr = details::DefaultTitleAccessorFromPtr(mInstance.defaultTitleAccessor);
|
||||
|
|
@ -72,56 +63,40 @@ public:
|
|||
|
||||
~QuickStartApplicationSelector() = default;
|
||||
|
||||
details::IPreferentialTitleAccessorBase &
|
||||
GetPreferentialTitleAccessor()
|
||||
{
|
||||
details::IPreferentialTitleAccessorBase &GetPreferentialTitleAccessor() {
|
||||
return mPreferentialTitleAccessorFromPtr;
|
||||
}
|
||||
|
||||
details::IDefaultTitleAccessorBase &
|
||||
GetDefaultTitleAccessor()
|
||||
{
|
||||
details::IDefaultTitleAccessorBase &GetDefaultTitleAccessor() {
|
||||
return mDefaultTitleAccessorFromPtr;
|
||||
}
|
||||
|
||||
details::IWhiteListAccessorBase &
|
||||
GetWhiteListAccessor()
|
||||
{
|
||||
details::IWhiteListAccessorBase &GetWhiteListAccessor() {
|
||||
return mWhiteListAccessorFromPtr;
|
||||
}
|
||||
|
||||
details::ITitleListCacheBase &
|
||||
GetTitleListCache()
|
||||
{
|
||||
details::ITitleListCacheBase &GetTitleListCache() {
|
||||
return mTitleListCacheFromPtr;
|
||||
}
|
||||
|
||||
details::ISettingAccessorBase &
|
||||
GetSettingAccessor()
|
||||
{
|
||||
details::ISettingAccessorBase &GetSettingAccessor() {
|
||||
return mSettingAccessorFromPtr;
|
||||
}
|
||||
|
||||
details::IBlackListAccessorBase &
|
||||
GetBlackListAccessor()
|
||||
{
|
||||
details::IBlackListAccessorBase &GetBlackListAccessor() {
|
||||
return mBlackListAccessorFromPtr;
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Select(nn::sl::TitleInfo *titleInfos, int num)
|
||||
{
|
||||
nn::Result Select(nn::sl::TitleInfo *titleInfos, int num) {
|
||||
return Select__Q3_2nn2sl29QuickStartApplicationSelectorFPQ3_2nn2sl9TitleInfoi(&mInstance, titleInfos, num);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(details::IPreferentialTitleAccessorBase &preferentialTitleAccessor,
|
||||
void Initialize(details::IPreferentialTitleAccessorBase &preferentialTitleAccessor,
|
||||
details::IDefaultTitleAccessorBase &defaultTitleAccessor,
|
||||
details::IWhiteListAccessorBase &whiteListAccessor,
|
||||
details::ITitleListCacheBase &titleListCache,
|
||||
details::ISettingAccessorBase &settingAccessor,
|
||||
details::IBlackListAccessorBase &blackListAccessor)
|
||||
{
|
||||
details::IBlackListAccessorBase &blackListAccessor) {
|
||||
Initialize__Q3_2nn2sl29QuickStartApplicationSelectorFRQ3_2nn2sl26IPreferentialTitleAccessorRQ3_2nn2sl21IDefaultTitleAccessorRQ3_2nn2sl18IWhiteListAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl18IBlackListAccessor(
|
||||
&mInstance,
|
||||
preferentialTitleAccessor.GetInternal(),
|
||||
|
|
|
|||
|
|
@ -7,13 +7,10 @@
|
|||
#include <nn/sl/details/ISettingAccessorDetails.h>
|
||||
#include <nn/sl/details/ITitleIconCacheDetails.h>
|
||||
|
||||
namespace nn::sl
|
||||
{
|
||||
namespace nn::sl {
|
||||
|
||||
namespace details
|
||||
{
|
||||
typedef struct WUT_PACKED TitleIconCacheInternal
|
||||
{
|
||||
namespace details {
|
||||
typedef struct WUT_PACKED TitleIconCacheInternal {
|
||||
void *vtable;
|
||||
uint32_t num;
|
||||
void *cachedIconsBuffer;
|
||||
|
|
@ -29,55 +26,39 @@ WUT_CHECK_OFFSET(TitleIconCacheInternal, 0x0C, iconInfoAccessor);
|
|||
WUT_CHECK_OFFSET(TitleIconCacheInternal, 0x10, iconInfoSerializer);
|
||||
WUT_CHECK_OFFSET(TitleIconCacheInternal, 0x14, settingAccessor);
|
||||
|
||||
extern "C" ITitleIconCacheInternal *
|
||||
__ct__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" ITitleIconCacheInternal *
|
||||
__dt__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *, int);
|
||||
extern "C" void
|
||||
Initialize__Q3_2nn2sl14TitleIconCacheFi(TitleIconCacheInternal *, int);
|
||||
extern "C" void
|
||||
Initialize__Q3_2nn2sl14TitleIconCacheFiRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl38ISerializer__tm__19_Q3_2nn2sl8IconInfoRQ3_2nn2sl16ISettingAccessor(
|
||||
extern "C" ITitleIconCacheInternal *__ct__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" ITitleIconCacheInternal *__dt__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *, int);
|
||||
extern "C" void Initialize__Q3_2nn2sl14TitleIconCacheFi(TitleIconCacheInternal *, int);
|
||||
extern "C" void Initialize__Q3_2nn2sl14TitleIconCacheFiRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl38ISerializer__tm__19_Q3_2nn2sl8IconInfoRQ3_2nn2sl16ISettingAccessor(
|
||||
TitleIconCacheInternal *,
|
||||
int,
|
||||
IIconInfoAccessorInternal *,
|
||||
ISerializerInternal *,
|
||||
ISettingAccessorInternal *);
|
||||
extern "C" void
|
||||
Finalize__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" void
|
||||
Get__Q3_2nn2sl14TitleIconCacheCFPQ3_2nn2sl8IconInfoi(TitleIconCacheInternal *, nn::sl::IconInfo *iconInfos, int num);
|
||||
extern "C" nn::Result
|
||||
Load__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" nn::Result
|
||||
Update__Q3_2nn2sl14TitleIconCacheFPCQ3_2nn2sl9TitleInfoi(TitleIconCacheInternal *, nn::sl ::TitleInfo *, int);
|
||||
extern "C" nn::Result
|
||||
Store__Q3_2nn2sl14TitleIconCacheCFv(TitleIconCacheInternal *);
|
||||
extern "C" void Finalize__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" void Get__Q3_2nn2sl14TitleIconCacheCFPQ3_2nn2sl8IconInfoi(TitleIconCacheInternal *, nn::sl::IconInfo *iconInfos, int num);
|
||||
extern "C" nn::Result Load__Q3_2nn2sl14TitleIconCacheFv(TitleIconCacheInternal *);
|
||||
extern "C" nn::Result Update__Q3_2nn2sl14TitleIconCacheFPCQ3_2nn2sl9TitleInfoi(TitleIconCacheInternal *, nn::sl ::TitleInfo *, int);
|
||||
extern "C" nn::Result Store__Q3_2nn2sl14TitleIconCacheCFv(TitleIconCacheInternal *);
|
||||
} // namespace details
|
||||
|
||||
class TitleIconCache : public details::ITitleIconCacheBase
|
||||
{
|
||||
class TitleIconCache : public details::ITitleIconCacheBase {
|
||||
public:
|
||||
TitleIconCache()
|
||||
{
|
||||
TitleIconCache() {
|
||||
details::__ct__Q3_2nn2sl14TitleIconCacheFv(&mInstance);
|
||||
}
|
||||
~TitleIconCache() override
|
||||
{
|
||||
~TitleIconCache() override {
|
||||
__dt__Q3_2nn2sl14TitleIconCacheFv(&mInstance, 2);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(int cacheSize)
|
||||
{
|
||||
void Initialize(int cacheSize) {
|
||||
Initialize__Q3_2nn2sl14TitleIconCacheFi(&mInstance, cacheSize);
|
||||
}
|
||||
|
||||
void
|
||||
Initialize(int cacheSize,
|
||||
void Initialize(int cacheSize,
|
||||
details::IIconInfoAccessorBase &iconInfoAccessor,
|
||||
details::ISerializerBase<nn::sl::IconInfo> &iconInfoSerializer,
|
||||
details::ISettingAccessorBase &settingAccessor)
|
||||
{
|
||||
details::ISettingAccessorBase &settingAccessor) {
|
||||
Initialize__Q3_2nn2sl14TitleIconCacheFiRQ3_2nn2sl17IIconInfoAccessorRQ3_2nn2sl38ISerializer__tm__19_Q3_2nn2sl8IconInfoRQ3_2nn2sl16ISettingAccessor(
|
||||
&mInstance,
|
||||
cacheSize,
|
||||
|
|
@ -86,40 +67,28 @@ public:
|
|||
settingAccessor.GetInternal());
|
||||
}
|
||||
|
||||
void
|
||||
Finalize(int cacheSize)
|
||||
{
|
||||
void Finalize(int cacheSize) {
|
||||
Finalize__Q3_2nn2sl14TitleIconCacheFv(&mInstance);
|
||||
}
|
||||
|
||||
void
|
||||
Get(nn::sl::IconInfo *iconInfos, int num) const override
|
||||
{
|
||||
void Get(nn::sl::IconInfo *iconInfos, int num) const override {
|
||||
return Get__Q3_2nn2sl14TitleIconCacheCFPQ3_2nn2sl8IconInfoi((details::TitleIconCacheInternal *) &mInstance, iconInfos, num);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Load() override
|
||||
{
|
||||
nn::Result Load() override {
|
||||
return Load__Q3_2nn2sl14TitleIconCacheFv(&mInstance);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Update(nn::sl::TitleInfo *titleInfos, int num) override
|
||||
{
|
||||
nn::Result Update(nn::sl::TitleInfo *titleInfos, int num) override {
|
||||
return Update__Q3_2nn2sl14TitleIconCacheFPCQ3_2nn2sl9TitleInfoi(&mInstance, titleInfos, num);
|
||||
}
|
||||
|
||||
nn::Result
|
||||
Store() override
|
||||
{
|
||||
nn::Result Store() override {
|
||||
return Store__Q3_2nn2sl14TitleIconCacheCFv(&mInstance);
|
||||
}
|
||||
|
||||
private:
|
||||
details::ITitleIconCacheInternal *
|
||||
GetInternal() override
|
||||
{
|
||||
details::ITitleIconCacheInternal *GetInternal() override {
|
||||
return reinterpret_cast<details::ITitleIconCacheInternal *>(&mInstance);
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user