diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/am/frontend/applet_cabinet.cpp (renamed from src/core/hle/service/am/applets/applet_cabinet.cpp) | 12 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_cabinet.h (renamed from src/core/hle/service/am/applets/applet_cabinet.h) | 8 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_controller.cpp (renamed from src/core/hle/service/am/applets/applet_controller.cpp) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_controller.h (renamed from src/core/hle/service/am/applets/applet_controller.h) | 8 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_error.cpp (renamed from src/core/hle/service/am/applets/applet_error.cpp) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_error.h (renamed from src/core/hle/service/am/applets/applet_error.h) | 8 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_general.cpp (renamed from src/core/hle/service/am/applets/applet_general_backend.cpp) | 20 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_general.h (renamed from src/core/hle/service/am/applets/applet_general_backend.h) | 12 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_mii_edit.cpp (renamed from src/core/hle/service/am/applets/applet_mii_edit.cpp) | 8 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_mii_edit.h (renamed from src/core/hle/service/am/applets/applet_mii_edit.h) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_mii_edit_types.h (renamed from src/core/hle/service/am/applets/applet_mii_edit_types.h) | 4 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_profile_select.cpp (renamed from src/core/hle/service/am/applets/applet_profile_select.cpp) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_profile_select.h (renamed from src/core/hle/service/am/applets/applet_profile_select.h) | 8 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_software_keyboard.cpp (renamed from src/core/hle/service/am/applets/applet_software_keyboard.cpp) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_software_keyboard.h (renamed from src/core/hle/service/am/applets/applet_software_keyboard.h) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_software_keyboard_types.h (renamed from src/core/hle/service/am/applets/applet_software_keyboard_types.h) | 4 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_web_browser.cpp (renamed from src/core/hle/service/am/applets/applet_web_browser.cpp) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_web_browser.h (renamed from src/core/hle/service/am/applets/applet_web_browser.h) | 10 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applet_web_browser_types.h (renamed from src/core/hle/service/am/applets/applet_web_browser_types.h) | 4 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applets.cpp (renamed from src/core/hle/service/am/applets/applets.cpp) | 65 | ||||
-rw-r--r-- | src/core/hle/service/am/frontend/applets.h (renamed from src/core/hle/service/am/applets/applets.h) | 125 |
21 files changed, 142 insertions, 224 deletions
diff --git a/src/core/hle/service/am/applets/applet_cabinet.cpp b/src/core/hle/service/am/frontend/applet_cabinet.cpp index 1b756fbd7..f1f49e83b 100644 --- a/src/core/hle/service/am/applets/applet_cabinet.cpp +++ b/src/core/hle/service/am/frontend/applet_cabinet.cpp @@ -8,18 +8,18 @@ #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_cabinet.h" +#include "core/hle/service/am/frontend/applet_cabinet.h" #include "core/hle/service/am/storage.h" #include "core/hle/service/mii/mii_manager.h" #include "core/hle/service/nfc/common/device.h" #include "hid_core/hid_core.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { Cabinet::Cabinet(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::CabinetApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_}, - service_context{system_, "CabinetApplet"} { + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, + system{system_}, service_context{system_, "CabinetApplet"} { availability_change_event = service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent"); @@ -30,7 +30,7 @@ Cabinet::~Cabinet() { }; void Cabinet::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); LOG_INFO(Service_HID, "Initializing Cabinet Applet."); @@ -184,4 +184,4 @@ Result Cabinet::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_cabinet.h b/src/core/hle/service/am/frontend/applet_cabinet.h index f498796f7..85d25bcb3 100644 --- a/src/core/hle/service/am/applets/applet_cabinet.h +++ b/src/core/hle/service/am/frontend/applet_cabinet.h @@ -6,7 +6,7 @@ #include <array> #include "core/hle/result.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applets.h" #include "core/hle/service/kernel_helpers.h" #include "core/hle/service/nfp/nfp_types.h" @@ -23,7 +23,7 @@ namespace Service::NFC { class NfcDevice; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class CabinetAppletVersion : u32 { Version1 = 0x1, @@ -84,7 +84,7 @@ static_assert(sizeof(ReturnValueForAmiiboSettings) == 0x188, "ReturnValueForAmiiboSettings is an invalid size"); #pragma pack(pop) -class Cabinet final : public Applet { +class Cabinet final : public FrontendApplet { public: explicit Cabinet(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::CabinetApplet& frontend_); @@ -111,4 +111,4 @@ private: StartParamForAmiiboSettings applet_input_common{}; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/frontend/applet_controller.cpp index bc8de6b60..b4114f6a3 100644 --- a/src/core/hle/service/am/applets/applet_controller.cpp +++ b/src/core/hle/service/am/frontend/applet_controller.cpp @@ -11,14 +11,14 @@ #include "core/frontend/applets/controller.h" #include "core/hle/result.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_controller.h" +#include "core/hle/service/am/frontend/applet_controller.h" #include "core/hle/service/am/storage.h" #include "hid_core/frontend/emulated_controller.h" #include "hid_core/hid_core.h" #include "hid_core/hid_types.h" #include "hid_core/resources/npad/npad.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { [[maybe_unused]] constexpr Result ResultControllerSupportCanceled{ErrorModule::HID, 3101}; [[maybe_unused]] constexpr Result ResultControllerSupportNotSupportedNpadStyle{ErrorModule::HID, @@ -49,12 +49,12 @@ static Core::Frontend::ControllerParameters ConvertToFrontendParameters( Controller::Controller(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ControllerApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} Controller::~Controller() = default; void Controller::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); LOG_INFO(Service_HID, "Initializing Controller Applet."); @@ -270,4 +270,4 @@ Result Controller::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_controller.h b/src/core/hle/service/am/frontend/applet_controller.h index 9f839f3d7..bf2bed332 100644 --- a/src/core/hle/service/am/applets/applet_controller.h +++ b/src/core/hle/service/am/frontend/applet_controller.h @@ -9,7 +9,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" #include "core/hle/result.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; @@ -19,7 +19,7 @@ namespace Core::HID { enum class NpadStyleSet : u32; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { using IdentificationColor = std::array<u8, 4>; using ExplainText = std::array<char, 0x81>; @@ -122,7 +122,7 @@ struct ControllerSupportResultInfo { static_assert(sizeof(ControllerSupportResultInfo) == 0xC, "ControllerSupportResultInfo has incorrect size."); -class Controller final : public Applet { +class Controller final : public FrontendApplet { public: explicit Controller(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ControllerApplet& frontend_); @@ -154,4 +154,4 @@ private: std::vector<u8> out_data; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/frontend/applet_error.cpp index 96126832c..48be77da2 100644 --- a/src/core/hle/service/am/applets/applet_error.cpp +++ b/src/core/hle/service/am/frontend/applet_error.cpp @@ -9,11 +9,11 @@ #include "core/core.h" #include "core/frontend/applets/error.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_error.h" +#include "core/hle/service/am/frontend/applet_error.h" #include "core/hle/service/am/storage.h" #include "core/reporter.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { struct ErrorCode { u32 error_category{}; @@ -106,12 +106,12 @@ Result Decode64BitError(u64 error) { Error::Error(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ErrorApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} Error::~Error() = default; void Error::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); args = std::make_unique<ErrorArguments>(); complete = false; @@ -220,4 +220,4 @@ Result Error::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_error.h b/src/core/hle/service/am/frontend/applet_error.h index d822a32bb..639e3c224 100644 --- a/src/core/hle/service/am/applets/applet_error.h +++ b/src/core/hle/service/am/frontend/applet_error.h @@ -4,13 +4,13 @@ #pragma once #include "core/hle/result.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class ErrorAppletMode : u8 { ShowError = 0, @@ -22,7 +22,7 @@ enum class ErrorAppletMode : u8 { ShowUpdateEula = 8, }; -class Error final : public Applet { +class Error final : public FrontendApplet { public: explicit Error(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ErrorApplet& frontend_); @@ -50,4 +50,4 @@ private: Core::System& system; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/frontend/applet_general.cpp index c010c78e2..e51171525 100644 --- a/src/core/hle/service/am/applets/applet_general_backend.cpp +++ b/src/core/hle/service/am/frontend/applet_general.cpp @@ -5,14 +5,14 @@ #include "common/hex_util.h" #include "common/logging/log.h" #include "core/core.h" -#include "core/frontend/applets/general_frontend.h" +#include "core/frontend/applets/general.h" #include "core/hle/result.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_general_backend.h" +#include "core/hle/service/am/frontend/applet_general.h" #include "core/hle/service/am/storage.h" #include "core/reporter.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { constexpr Result ERROR_INVALID_PIN{ErrorModule::PCTL, 221}; @@ -36,12 +36,12 @@ static void LogCurrentStorage(AppletDataBroker& broker, std::string_view prefix) Auth::Auth(Core::System& system_, LibraryAppletMode applet_mode_, Core::Frontend::ParentalControlsApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} Auth::~Auth() = default; void Auth::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); complete = false; const auto storage = broker.PopNormalDataToApplet(); @@ -158,12 +158,12 @@ Result Auth::RequestExit() { PhotoViewer::PhotoViewer(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::PhotoViewerApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} PhotoViewer::~PhotoViewer() = default; void PhotoViewer::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); complete = false; const auto storage = broker.PopNormalDataToApplet(); @@ -214,13 +214,13 @@ Result PhotoViewer::RequestExit() { } StubApplet::StubApplet(Core::System& system_, AppletId id_, LibraryAppletMode applet_mode_) - : Applet{system_, applet_mode_}, id{id_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, id{id_}, system{system_} {} StubApplet::~StubApplet() = default; void StubApplet::Initialize() { LOG_WARNING(Service_AM, "called (STUBBED)"); - Applet::Initialize(); + FrontendApplet::Initialize(); const auto data = broker.PeekDataToAppletForDebug(); system.GetReporter().SaveUnimplementedAppletReport( @@ -266,4 +266,4 @@ Result StubApplet::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_general_backend.h b/src/core/hle/service/am/frontend/applet_general.h index 34ecaebb9..b39a9a3f1 100644 --- a/src/core/hle/service/am/applets/applet_general_backend.h +++ b/src/core/hle/service/am/frontend/applet_general.h @@ -3,13 +3,13 @@ #pragma once -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class AuthAppletType : u32 { ShowParentalAuthentication, @@ -17,7 +17,7 @@ enum class AuthAppletType : u32 { ChangeParentalPasscode, }; -class Auth final : public Applet { +class Auth final : public FrontendApplet { public: explicit Auth(Core::System& system_, LibraryAppletMode applet_mode_, Core::Frontend::ParentalControlsApplet& frontend_); @@ -49,7 +49,7 @@ enum class PhotoViewerAppletMode : u8 { AllApps = 1, }; -class PhotoViewer final : public Applet { +class PhotoViewer final : public FrontendApplet { public: explicit PhotoViewer(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::PhotoViewerApplet& frontend_); @@ -71,7 +71,7 @@ private: Core::System& system; }; -class StubApplet final : public Applet { +class StubApplet final : public FrontendApplet { public: explicit StubApplet(Core::System& system_, AppletId id_, LibraryAppletMode applet_mode_); ~StubApplet() override; @@ -89,4 +89,4 @@ private: Core::System& system; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_mii_edit.cpp b/src/core/hle/service/am/frontend/applet_mii_edit.cpp index 1576b45c4..6203ebd2e 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit.cpp +++ b/src/core/hle/service/am/frontend/applet_mii_edit.cpp @@ -6,17 +6,17 @@ #include "core/core.h" #include "core/frontend/applets/mii_edit.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_mii_edit.h" +#include "core/hle/service/am/frontend/applet_mii_edit.h" #include "core/hle/service/am/storage.h" #include "core/hle/service/mii/mii.h" #include "core/hle/service/mii/mii_manager.h" #include "core/hle/service/sm/sm.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { MiiEdit::MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::MiiEditApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} MiiEdit::~MiiEdit() = default; @@ -178,4 +178,4 @@ Result MiiEdit::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_mii_edit.h b/src/core/hle/service/am/frontend/applet_mii_edit.h index 7ff34af49..ebde37028 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit.h +++ b/src/core/hle/service/am/frontend/applet_mii_edit.h @@ -4,8 +4,8 @@ #pragma once #include "core/hle/result.h" -#include "core/hle/service/am/applets/applet_mii_edit_types.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applet_mii_edit_types.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; @@ -16,9 +16,9 @@ struct DatabaseSessionMetadata; class MiiManager; } // namespace Service::Mii -namespace Service::AM::Applets { +namespace Service::AM::Frontend { -class MiiEdit final : public Applet { +class MiiEdit final : public FrontendApplet { public: explicit MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::MiiEditApplet& frontend_); @@ -49,4 +49,4 @@ private: Mii::DatabaseSessionMetadata metadata{}; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_mii_edit_types.h b/src/core/hle/service/am/frontend/applet_mii_edit_types.h index f3d764073..23d9d7a69 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit_types.h +++ b/src/core/hle/service/am/frontend/applet_mii_edit_types.h @@ -10,7 +10,7 @@ #include "common/uuid.h" #include "core/hle/service/mii/types/char_info.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class MiiEditAppletVersion : s32 { Version3 = 0x3, // 1.0.0 - 10.1.1 @@ -80,4 +80,4 @@ struct MiiEditAppletOutputForCharInfoEditing { static_assert(sizeof(MiiEditAppletOutputForCharInfoEditing) == 0x80, "MiiEditAppletOutputForCharInfoEditing has incorrect size."); -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_profile_select.cpp b/src/core/hle/service/am/frontend/applet_profile_select.cpp index f32db6842..5d71f985e 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.cpp +++ b/src/core/hle/service/am/frontend/applet_profile_select.cpp @@ -9,14 +9,14 @@ #include "core/frontend/applets/profile_select.h" #include "core/hle/service/acc/errors.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_profile_select.h" +#include "core/hle/service/am/frontend/applet_profile_select.h" #include "core/hle/service/am/storage.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { ProfileSelect::ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ProfileSelectApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} ProfileSelect::~ProfileSelect() = default; @@ -25,7 +25,7 @@ void ProfileSelect::Initialize() { status = ResultSuccess; final_data.clear(); - Applet::Initialize(); + FrontendApplet::Initialize(); profile_select_version = ProfileSelectAppletVersion{common_args.library_version}; const auto user_config_storage = broker.PopNormalDataToApplet(); @@ -121,4 +121,4 @@ Result ProfileSelect::RequestExit() { R_SUCCEED(); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_profile_select.h b/src/core/hle/service/am/frontend/applet_profile_select.h index 673eed516..43ec67c8e 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.h +++ b/src/core/hle/service/am/frontend/applet_profile_select.h @@ -8,13 +8,13 @@ #include "common/common_funcs.h" #include "common/uuid.h" #include "core/hle/result.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class ProfileSelectAppletVersion : u32 { Version1 = 0x1, // 1.0.0+ @@ -111,7 +111,7 @@ struct UiReturnArg { }; static_assert(sizeof(UiReturnArg) == 0x18, "UiReturnArg has incorrect size."); -class ProfileSelect final : public Applet { +class ProfileSelect final : public FrontendApplet { public: explicit ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::ProfileSelectApplet& frontend_); @@ -140,4 +140,4 @@ private: Core::System& system; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/frontend/applet_software_keyboard.cpp index a6a07cef3..7974995cc 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/frontend/applet_software_keyboard.cpp @@ -5,10 +5,10 @@ #include "core/core.h" #include "core/frontend/applets/software_keyboard.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_software_keyboard.h" +#include "core/hle/service/am/frontend/applet_software_keyboard.h" #include "core/hle/service/am/storage.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { namespace { @@ -44,12 +44,12 @@ void SetReplyBase(std::vector<u8>& reply, SwkbdState state, SwkbdReplyType reply SoftwareKeyboard::SoftwareKeyboard(Core::System& system_, LibraryAppletMode applet_mode_, Core::Frontend::SoftwareKeyboardApplet& frontend_) - : Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {} SoftwareKeyboard::~SoftwareKeyboard() = default; void SoftwareKeyboard::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); LOG_INFO(Service_AM, "Initializing Software Keyboard Applet with LibraryAppletMode={}", applet_mode); @@ -1274,4 +1274,4 @@ void SoftwareKeyboard::ReplyMovedCursorUtf8V2() { broker.PushInteractiveDataFromApplet(std::make_shared<IStorage>(system, std::move(reply))); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.h b/src/core/hle/service/am/frontend/applet_software_keyboard.h index 2e919811b..00ad0add3 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.h +++ b/src/core/hle/service/am/frontend/applet_software_keyboard.h @@ -5,8 +5,8 @@ #include "common/common_types.h" #include "core/hle/result.h" -#include "core/hle/service/am/applets/applet_software_keyboard_types.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applet_software_keyboard_types.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; @@ -17,9 +17,9 @@ struct KeyboardInitializeParameters; struct InlineAppearParameters; } // namespace Core::Frontend -namespace Service::AM::Applets { +namespace Service::AM::Frontend { -class SoftwareKeyboard final : public Applet { +class SoftwareKeyboard final : public FrontendApplet { public: explicit SoftwareKeyboard(Core::System& system_, LibraryAppletMode applet_mode_, Core::Frontend::SoftwareKeyboardApplet& frontend_); @@ -184,4 +184,4 @@ private: Result status{ResultSuccess}; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_software_keyboard_types.h b/src/core/hle/service/am/frontend/applet_software_keyboard_types.h index 1f696900e..a25ff2a6d 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard_types.h +++ b/src/core/hle/service/am/frontend/applet_software_keyboard_types.h @@ -11,7 +11,7 @@ #include "common/swap.h" #include "common/uuid.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { constexpr std::size_t MAX_OK_TEXT_LENGTH = 8; constexpr std::size_t MAX_HEADER_TEXT_LENGTH = 64; @@ -351,4 +351,4 @@ struct SwkbdDecidedEnterArg { }; static_assert(sizeof(SwkbdDecidedEnterArg) == 0x4, "SwkbdDecidedEnterArg has incorrect size."); -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/frontend/applet_web_browser.cpp index 871737b3e..28a20c72b 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/frontend/applet_web_browser.cpp @@ -19,13 +19,13 @@ #include "core/frontend/applets/web_browser.h" #include "core/hle/result.h" #include "core/hle/service/am/am.h" -#include "core/hle/service/am/applets/applet_web_browser.h" +#include "core/hle/service/am/frontend/applet_web_browser.h" #include "core/hle/service/am/storage.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/ns/iplatform_service_manager.h" #include "core/loader/loader.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { namespace { @@ -226,12 +226,12 @@ void ExtractSharedFonts(Core::System& system) { WebBrowser::WebBrowser(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::WebBrowserApplet& frontend_) - : Applet{system_, applet_mode_}, frontend(frontend_), system{system_} {} + : FrontendApplet{system_, applet_mode_}, frontend(frontend_), system{system_} {} WebBrowser::~WebBrowser() = default; void WebBrowser::Initialize() { - Applet::Initialize(); + FrontendApplet::Initialize(); LOG_INFO(Service_AM, "Initializing Web Browser Applet."); @@ -505,4 +505,4 @@ void WebBrowser::ExecuteLobby() { LOG_WARNING(Service_AM, "(STUBBED) called, Lobby Applet is not implemented"); WebBrowserExit(WebExitReason::EndButtonPressed); } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_web_browser.h b/src/core/hle/service/am/frontend/applet_web_browser.h index 36adb2510..613d8e9ea 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.h +++ b/src/core/hle/service/am/frontend/applet_web_browser.h @@ -9,8 +9,8 @@ #include "common/common_types.h" #include "core/file_sys/vfs/vfs_types.h" #include "core/hle/result.h" -#include "core/hle/service/am/applets/applet_web_browser_types.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applet_web_browser_types.h" +#include "core/hle/service/am/frontend/applets.h" namespace Core { class System; @@ -20,9 +20,9 @@ namespace FileSys { enum class ContentRecordType : u8; } -namespace Service::AM::Applets { +namespace Service::AM::Frontend { -class WebBrowser final : public Applet { +class WebBrowser final : public FrontendApplet { public: WebBrowser(Core::System& system_, LibraryAppletMode applet_mode_, const Core::Frontend::WebBrowserApplet& frontend_); @@ -84,4 +84,4 @@ private: Core::System& system; }; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applet_web_browser_types.h b/src/core/hle/service/am/frontend/applet_web_browser_types.h index c522c5c1a..2f7c05c24 100644 --- a/src/core/hle/service/am/applets/applet_web_browser_types.h +++ b/src/core/hle/service/am/frontend/applet_web_browser_types.h @@ -11,7 +11,7 @@ #include "common/common_types.h" #include "common/swap.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { enum class WebAppletVersion : u32_le { Version0 = 0x0, // Only used by WifiWebAuthApplet @@ -174,4 +174,4 @@ static_assert(sizeof(WebCommonReturnValue) == 0x1010, "WebCommonReturnValue has using WebArgInputTLVMap = std::unordered_map<WebArgInputTLVType, std::vector<u8>>; -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/frontend/applets.cpp index 6a47f4b7a..4e8f806d7 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/frontend/applets.cpp @@ -8,7 +8,7 @@ #include "core/frontend/applets/cabinet.h" #include "core/frontend/applets/controller.h" #include "core/frontend/applets/error.h" -#include "core/frontend/applets/general_frontend.h" +#include "core/frontend/applets/general.h" #include "core/frontend/applets/mii_edit.h" #include "core/frontend/applets/profile_select.h" #include "core/frontend/applets/software_keyboard.h" @@ -18,19 +18,19 @@ #include "core/hle/service/am/applet_ae.h" #include "core/hle/service/am/applet_message_queue.h" #include "core/hle/service/am/applet_oe.h" -#include "core/hle/service/am/applets/applet_cabinet.h" -#include "core/hle/service/am/applets/applet_controller.h" -#include "core/hle/service/am/applets/applet_error.h" -#include "core/hle/service/am/applets/applet_general_backend.h" -#include "core/hle/service/am/applets/applet_mii_edit.h" -#include "core/hle/service/am/applets/applet_profile_select.h" -#include "core/hle/service/am/applets/applet_software_keyboard.h" -#include "core/hle/service/am/applets/applet_web_browser.h" -#include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/am/frontend/applet_cabinet.h" +#include "core/hle/service/am/frontend/applet_controller.h" +#include "core/hle/service/am/frontend/applet_error.h" +#include "core/hle/service/am/frontend/applet_general.h" +#include "core/hle/service/am/frontend/applet_mii_edit.h" +#include "core/hle/service/am/frontend/applet_profile_select.h" +#include "core/hle/service/am/frontend/applet_software_keyboard.h" +#include "core/hle/service/am/frontend/applet_web_browser.h" +#include "core/hle/service/am/frontend/applets.h" #include "core/hle/service/am/storage.h" #include "core/hle/service/sm/sm.h" -namespace Service::AM::Applets { +namespace Service::AM::Frontend { AppletDataBroker::AppletDataBroker(Core::System& system_, LibraryAppletMode applet_mode_) : system{system_}, applet_mode{applet_mode_}, @@ -156,12 +156,12 @@ Kernel::KReadableEvent& AppletDataBroker::GetStateChangedEvent() { return state_changed_event->GetReadableEvent(); } -Applet::Applet(Core::System& system_, LibraryAppletMode applet_mode_) +FrontendApplet::FrontendApplet(Core::System& system_, LibraryAppletMode applet_mode_) : broker{system_, applet_mode_}, applet_mode{applet_mode_} {} -Applet::~Applet() = default; +FrontendApplet::~FrontendApplet() = default; -void Applet::Initialize() { +void FrontendApplet::Initialize() { const auto common = broker.PopNormalDataToApplet(); ASSERT(common != nullptr); @@ -173,9 +173,9 @@ void Applet::Initialize() { initialized = true; } -AppletFrontendSet::AppletFrontendSet() = default; +FrontendAppletSet::FrontendAppletSet() = default; -AppletFrontendSet::AppletFrontendSet(CabinetApplet cabinet_applet, +FrontendAppletSet::FrontendAppletSet(CabinetApplet cabinet_applet, ControllerApplet controller_applet, ErrorApplet error_applet, MiiEdit mii_edit_, ParentalControlsApplet parental_controls_applet, @@ -187,29 +187,29 @@ AppletFrontendSet::AppletFrontendSet(CabinetApplet cabinet_applet, photo_viewer{std::move(photo_viewer_)}, profile_select{std::move(profile_select_)}, software_keyboard{std::move(software_keyboard_)}, web_browser{std::move(web_browser_)} {} -AppletFrontendSet::~AppletFrontendSet() = default; +FrontendAppletSet::~FrontendAppletSet() = default; -AppletFrontendSet::AppletFrontendSet(AppletFrontendSet&&) noexcept = default; +FrontendAppletSet::FrontendAppletSet(FrontendAppletSet&&) noexcept = default; -AppletFrontendSet& AppletFrontendSet::operator=(AppletFrontendSet&&) noexcept = default; +FrontendAppletSet& FrontendAppletSet::operator=(FrontendAppletSet&&) noexcept = default; -AppletManager::AppletManager(Core::System& system_) : system{system_} {} +FrontendAppletHolder::FrontendAppletHolder(Core::System& system_) : system{system_} {} -AppletManager::~AppletManager() = default; +FrontendAppletHolder::~FrontendAppletHolder() = default; -const AppletFrontendSet& AppletManager::GetAppletFrontendSet() const { +const FrontendAppletSet& FrontendAppletHolder::GetFrontendAppletSet() const { return frontend; } -NFP::CabinetMode AppletManager::GetCabinetMode() const { +NFP::CabinetMode FrontendAppletHolder::GetCabinetMode() const { return cabinet_mode; } -AppletId AppletManager::GetCurrentAppletId() const { +AppletId FrontendAppletHolder::GetCurrentAppletId() const { return current_applet_id; } -void AppletManager::SetAppletFrontendSet(AppletFrontendSet set) { +void FrontendAppletHolder::SetFrontendAppletSet(FrontendAppletSet set) { if (set.cabinet != nullptr) { frontend.cabinet = std::move(set.cabinet); } @@ -247,20 +247,20 @@ void AppletManager::SetAppletFrontendSet(AppletFrontendSet set) { } } -void AppletManager::SetCabinetMode(NFP::CabinetMode mode) { +void FrontendAppletHolder::SetCabinetMode(NFP::CabinetMode mode) { cabinet_mode = mode; } -void AppletManager::SetCurrentAppletId(AppletId applet_id) { +void FrontendAppletHolder::SetCurrentAppletId(AppletId applet_id) { current_applet_id = applet_id; } -void AppletManager::SetDefaultAppletFrontendSet() { +void FrontendAppletHolder::SetDefaultAppletFrontendSet() { ClearAll(); SetDefaultAppletsIfMissing(); } -void AppletManager::SetDefaultAppletsIfMissing() { +void FrontendAppletHolder::SetDefaultAppletsIfMissing() { if (frontend.cabinet == nullptr) { frontend.cabinet = std::make_unique<Core::Frontend::DefaultCabinetApplet>(); } @@ -301,11 +301,12 @@ void AppletManager::SetDefaultAppletsIfMissing() { } } -void AppletManager::ClearAll() { +void FrontendAppletHolder::ClearAll() { frontend = {}; } -std::shared_ptr<Applet> AppletManager::GetApplet(AppletId id, LibraryAppletMode mode) const { +std::shared_ptr<FrontendApplet> FrontendAppletHolder::GetApplet(AppletId id, + LibraryAppletMode mode) const { switch (id) { case AppletId::Auth: return std::make_shared<Auth>(system, mode, *frontend.parental_controls); @@ -337,4 +338,4 @@ std::shared_ptr<Applet> AppletManager::GetApplet(AppletId id, LibraryAppletMode } } -} // namespace Service::AM::Applets +} // namespace Service::AM::Frontend diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/frontend/applets.h index 0bf2598b7..f58147955 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/frontend/applets.h @@ -7,7 +7,7 @@ #include <queue> #include "common/swap.h" -#include "core/hle/service/kernel_helpers.h" +#include "core/hle/service/am/applet.h" union Result; @@ -42,90 +42,7 @@ namespace Service::AM { class IStorage; -namespace Applets { - -enum class AppletId : u32 { - None = 0x00, - Application = 0x01, - OverlayDisplay = 0x02, - QLaunch = 0x03, - Starter = 0x04, - Auth = 0x0A, - Cabinet = 0x0B, - Controller = 0x0C, - DataErase = 0x0D, - Error = 0x0E, - NetConnect = 0x0F, - ProfileSelect = 0x10, - SoftwareKeyboard = 0x11, - MiiEdit = 0x12, - Web = 0x13, - Shop = 0x14, - PhotoViewer = 0x15, - Settings = 0x16, - OfflineWeb = 0x17, - LoginShare = 0x18, - WebAuth = 0x19, - MyPage = 0x1A, -}; - -enum class AppletProgramId : u64 { - QLaunch = 0x0100000000001000ull, - Auth = 0x0100000000001001ull, - Cabinet = 0x0100000000001002ull, - Controller = 0x0100000000001003ull, - DataErase = 0x0100000000001004ull, - Error = 0x0100000000001005ull, - NetConnect = 0x0100000000001006ull, - ProfileSelect = 0x0100000000001007ull, - SoftwareKeyboard = 0x0100000000001008ull, - MiiEdit = 0x0100000000001009ull, - Web = 0x010000000000100Aull, - Shop = 0x010000000000100Bull, - OverlayDisplay = 0x010000000000100Cull, - PhotoViewer = 0x010000000000100Dull, - Settings = 0x010000000000100Eull, - OfflineWeb = 0x010000000000100Full, - LoginShare = 0x0100000000001010ull, - WebAuth = 0x0100000000001011ull, - Starter = 0x0100000000001012ull, - MyPage = 0x0100000000001013ull, - MaxProgramId = 0x0100000000001FFFull, -}; - -enum class LibraryAppletMode : u32 { - AllForeground = 0, - Background = 1, - NoUI = 2, - BackgroundIndirectDisplay = 3, - AllForegroundInitiallyHidden = 4, -}; - -enum class CommonArgumentVersion : u32 { - Version0, - Version1, - Version2, - Version3, -}; - -enum class CommonArgumentSize : u32 { - Version3 = 0x20, -}; - -enum class ThemeColor : u32 { - BasicWhite = 0, - BasicBlack = 3, -}; - -struct CommonArguments { - CommonArgumentVersion arguments_version; - CommonArgumentSize size; - u32 library_version; - ThemeColor theme_color; - bool play_startup_sound; - u64_le system_tick; -}; -static_assert(sizeof(CommonArguments) == 0x20, "CommonArguments has incorrect size."); +namespace Frontend { class AppletDataBroker final { public: @@ -187,10 +104,10 @@ private: Kernel::KEvent* pop_interactive_out_data_event; }; -class Applet { +class FrontendApplet { public: - explicit Applet(Core::System& system_, LibraryAppletMode applet_mode_); - virtual ~Applet(); + explicit FrontendApplet(Core::System& system_, LibraryAppletMode applet_mode_); + virtual ~FrontendApplet(); virtual void Initialize(); @@ -223,7 +140,7 @@ protected: bool initialized = false; }; -struct AppletFrontendSet { +struct FrontendAppletSet { using CabinetApplet = std::unique_ptr<Core::Frontend::CabinetApplet>; using ControllerApplet = std::unique_ptr<Core::Frontend::ControllerApplet>; using ErrorApplet = std::unique_ptr<Core::Frontend::ErrorApplet>; @@ -234,19 +151,19 @@ struct AppletFrontendSet { using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>; using WebBrowser = std::unique_ptr<Core::Frontend::WebBrowserApplet>; - AppletFrontendSet(); - AppletFrontendSet(CabinetApplet cabinet_applet, ControllerApplet controller_applet, + FrontendAppletSet(); + FrontendAppletSet(CabinetApplet cabinet_applet, ControllerApplet controller_applet, ErrorApplet error_applet, MiiEdit mii_edit_, ParentalControlsApplet parental_controls_applet, PhotoViewer photo_viewer_, ProfileSelect profile_select_, SoftwareKeyboard software_keyboard_, WebBrowser web_browser_); - ~AppletFrontendSet(); + ~FrontendAppletSet(); - AppletFrontendSet(const AppletFrontendSet&) = delete; - AppletFrontendSet& operator=(const AppletFrontendSet&) = delete; + FrontendAppletSet(const FrontendAppletSet&) = delete; + FrontendAppletSet& operator=(const FrontendAppletSet&) = delete; - AppletFrontendSet(AppletFrontendSet&&) noexcept; - AppletFrontendSet& operator=(AppletFrontendSet&&) noexcept; + FrontendAppletSet(FrontendAppletSet&&) noexcept; + FrontendAppletSet& operator=(FrontendAppletSet&&) noexcept; CabinetApplet cabinet; ControllerApplet controller; @@ -259,31 +176,31 @@ struct AppletFrontendSet { WebBrowser web_browser; }; -class AppletManager { +class FrontendAppletHolder { public: - explicit AppletManager(Core::System& system_); - ~AppletManager(); + explicit FrontendAppletHolder(Core::System& system_); + ~FrontendAppletHolder(); - const AppletFrontendSet& GetAppletFrontendSet() const; + const FrontendAppletSet& GetFrontendAppletSet() const; NFP::CabinetMode GetCabinetMode() const; AppletId GetCurrentAppletId() const; - void SetAppletFrontendSet(AppletFrontendSet set); + void SetFrontendAppletSet(FrontendAppletSet set); void SetCabinetMode(NFP::CabinetMode mode); void SetCurrentAppletId(AppletId applet_id); void SetDefaultAppletFrontendSet(); void SetDefaultAppletsIfMissing(); void ClearAll(); - std::shared_ptr<Applet> GetApplet(AppletId id, LibraryAppletMode mode) const; + std::shared_ptr<FrontendApplet> GetApplet(AppletId id, LibraryAppletMode mode) const; private: AppletId current_applet_id{}; NFP::CabinetMode cabinet_mode{}; - AppletFrontendSet frontend; + FrontendAppletSet frontend; Core::System& system; }; -} // namespace Applets +} // namespace Frontend } // namespace Service::AM |