service: Add stubs for Qlaunch

This commit is contained in:
german77
2023-08-05 20:48:36 -06:00
committed by Narr the Reg
parent ab6ed38ea8
commit 7486e214bf
9 changed files with 270 additions and 27 deletions

View File

@ -1623,6 +1623,7 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_)
PushInShowController(); PushInShowController();
break; break;
default: default:
PushInShow();
break; break;
} }
} }
@ -1848,6 +1849,35 @@ void ILibraryAppletSelfAccessor::PushInShowCabinetData() {
queue_data.emplace_back(std::move(settings_data)); queue_data.emplace_back(std::move(settings_data));
} }
void ILibraryAppletSelfAccessor::PushInShow() {
const Applets::CommonArguments arguments{
.arguments_version = Applets::CommonArgumentVersion::Version3,
.size = Applets::CommonArgumentSize::Version3,
.library_version = static_cast<u32>(Applets::CabinetAppletVersion::Version1),
.theme_color = Applets::ThemeColor::BasicBlack,
.play_startup_sound = true,
.system_tick = system.CoreTiming().GetClockTicks(),
};
const Applets::StartParamForAmiiboSettings amiibo_settings{
.param_1 = 0,
.applet_mode = {},
.flags = {},
.amiibo_settings_1 = 0,
.device_handle = 0,
.tag_info{},
.register_info{},
.amiibo_settings_3{},
};
std::vector<u8> argument_data(sizeof(arguments));
std::vector<u8> settings_data(sizeof(amiibo_settings));
std::memcpy(argument_data.data(), &arguments, sizeof(arguments));
std::memcpy(settings_data.data(), &amiibo_settings, sizeof(amiibo_settings));
queue_data.emplace_back(std::move(argument_data));
queue_data.emplace_back(std::move(settings_data));
}
void ILibraryAppletSelfAccessor::PushInShowMiiEditData() { void ILibraryAppletSelfAccessor::PushInShowMiiEditData() {
struct MiiEditV3 { struct MiiEditV3 {
Applets::MiiEditAppletInputCommon common; Applets::MiiEditAppletInputCommon common;
@ -2599,7 +2629,8 @@ void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) {
} }
IGlobalStateController::IGlobalStateController(Core::System& system_) IGlobalStateController::IGlobalStateController(Core::System& system_)
: ServiceFramework{system_, "IGlobalStateController"} { : ServiceFramework{system_, "IGlobalStateController"},
service_context{system_, "IGlobalStateController"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "RequestToEnterSleep"}, {0, nullptr, "RequestToEnterSleep"},
@ -2612,17 +2643,36 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
{11, nullptr, "NotifyCecSettingsChanged"}, {11, nullptr, "NotifyCecSettingsChanged"},
{12, nullptr, "SetDefaultHomeButtonLongPressTime"}, {12, nullptr, "SetDefaultHomeButtonLongPressTime"},
{13, nullptr, "UpdateDefaultDisplayResolution"}, {13, nullptr, "UpdateDefaultDisplayResolution"},
{14, nullptr, "ShouldSleepOnBoot"}, {14, &IGlobalStateController::ShouldSleepOnBoot, "ShouldSleepOnBoot"},
{15, nullptr, "GetHdcpAuthenticationFailedEvent"}, {15, &IGlobalStateController::GetHdcpAuthenticationFailedEvent, "GetHdcpAuthenticationFailedEvent"},
{30, nullptr, "OpenCradleFirmwareUpdater"}, {30, nullptr, "OpenCradleFirmwareUpdater"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
hdcp_authentification_failed_event =
service_context.CreateEvent("IGlobalStateController::HdcpAuthenticationFailedEvent");
} }
IGlobalStateController::~IGlobalStateController() = default; IGlobalStateController::~IGlobalStateController() = default;
void IGlobalStateController::ShouldSleepOnBoot(HLERequestContext& ctx) {
LOG_ERROR(Service_AM, "called");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push(0);
}
void IGlobalStateController::GetHdcpAuthenticationFailedEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_AM, "called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(hdcp_authentification_failed_event->GetReadableEvent());
}
IApplicationCreator::IApplicationCreator(Core::System& system_) IApplicationCreator::IApplicationCreator(Core::System& system_)
: ServiceFramework{system_, "IApplicationCreator"} { : ServiceFramework{system_, "IApplicationCreator"} {
// clang-format off // clang-format off

View File

@ -355,6 +355,7 @@ private:
void PushInShowAlbum(); void PushInShowAlbum();
void PushInShowCabinetData(); void PushInShowCabinetData();
void PushInShow();
void PushInShowMiiEditData(); void PushInShowMiiEditData();
void PushInShowSoftwareKeyboard(); void PushInShowSoftwareKeyboard();
void PushInShowController(); void PushInShowController();
@ -441,6 +442,13 @@ class IGlobalStateController final : public ServiceFramework<IGlobalStateControl
public: public:
explicit IGlobalStateController(Core::System& system_); explicit IGlobalStateController(Core::System& system_);
~IGlobalStateController() override; ~IGlobalStateController() override;
private:
void ShouldSleepOnBoot(HLERequestContext& ctx);
void GetHdcpAuthenticationFailedEvent(HLERequestContext& ctx);
Kernel::KEvent* hdcp_authentification_failed_event;
KernelHelpers::ServiceContext service_context;
}; };
class IApplicationCreator final : public ServiceFramework<IApplicationCreator> { class IApplicationCreator final : public ServiceFramework<IApplicationCreator> {

View File

@ -260,7 +260,8 @@ public:
class IBtmSystemCore final : public ServiceFramework<IBtmSystemCore> { class IBtmSystemCore final : public ServiceFramework<IBtmSystemCore> {
public: public:
explicit IBtmSystemCore(Core::System& system_) : ServiceFramework{system_, "IBtmSystemCore"} { explicit IBtmSystemCore(Core::System& system_)
: ServiceFramework{system_, "IBtmSystemCore"}, service_context{system_, "IBtmSystemCore"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &IBtmSystemCore::StartGamepadPairing, "StartGamepadPairing"}, {0, &IBtmSystemCore::StartGamepadPairing, "StartGamepadPairing"},
@ -270,7 +271,7 @@ public:
{4, nullptr, "EnableRadio"}, {4, nullptr, "EnableRadio"},
{5, nullptr, "DisableRadio"}, {5, nullptr, "DisableRadio"},
{6, &IBtmSystemCore::IsRadioEnabled, "IsRadioEnabled"}, {6, &IBtmSystemCore::IsRadioEnabled, "IsRadioEnabled"},
{7, nullptr, "AcquireRadioEvent"}, {7, &IBtmSystemCore::AcquireRadioEvent, "AcquireRadioEvent"},
{8, nullptr, "AcquireGamepadPairingEvent"}, {8, nullptr, "AcquireGamepadPairingEvent"},
{9, nullptr, "IsGamepadPairingStarted"}, {9, nullptr, "IsGamepadPairingStarted"},
{10, nullptr, "StartAudioDeviceDiscovery"}, {10, nullptr, "StartAudioDeviceDiscovery"},
@ -291,6 +292,7 @@ public:
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent");
} }
private: private:
@ -331,7 +333,19 @@ private:
LOG_WARNING(Service_BTM, "(STUBBED) called"); LOG_WARNING(Service_BTM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess); rb.Push(ResultSuccess);
} void AcquireRadioEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_BTM, "called");
radio_event->Signal();
IPC::ResponseBuilder rb{ ctx, 3, 1 };
rb.Push(ResultSuccess);
rb.Push(true);
rb.PushCopyObjects(radio_event->GetReadableEvent());
} }
Kernel::KEvent* radio_event;
KernelHelpers::ServiceContext service_context;
}; };
class BTM_SYS final : public ServiceFramework<BTM_SYS> { class BTM_SYS final : public ServiceFramework<BTM_SYS> {

View File

@ -19,7 +19,7 @@ public:
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "SaveCurrentSetting"}, {0, nullptr, "SaveCurrentSetting"},
{1, nullptr, "LoadCurrentSetting"}, {1, &LBL::LoadCurrentSetting, "LoadCurrentSetting"},
{2, &LBL::SetCurrentBrightnessSetting, "SetCurrentBrightnessSetting"}, {2, &LBL::SetCurrentBrightnessSetting, "SetCurrentBrightnessSetting"},
{3, &LBL::GetCurrentBrightnessSetting, "GetCurrentBrightnessSetting"}, {3, &LBL::GetCurrentBrightnessSetting, "GetCurrentBrightnessSetting"},
{4, nullptr, "ApplyCurrentBrightnessSettingToBacklight"}, {4, nullptr, "ApplyCurrentBrightnessSettingToBacklight"},
@ -60,6 +60,13 @@ private:
On = 1, On = 1,
}; };
void LoadCurrentSetting(HLERequestContext& ctx) {
LOG_WARNING(Service_LBL, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
void SetCurrentBrightnessSetting(HLERequestContext& ctx) { void SetCurrentBrightnessSetting(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
auto brightness = rp.Pop<float>(); auto brightness = rp.Pop<float>();

View File

@ -10,6 +10,7 @@
#include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/glue/glue_manager.h" #include "core/hle/service/glue/glue_manager.h"
#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/ns/errors.h" #include "core/hle/service/ns/errors.h"
#include "core/hle/service/ns/iplatform_service_manager.h" #include "core/hle/service/ns/iplatform_service_manager.h"
#include "core/hle/service/ns/language.h" #include "core/hle/service/ns/language.h"
@ -34,12 +35,13 @@ IAccountProxyInterface::IAccountProxyInterface(Core::System& system_)
IAccountProxyInterface::~IAccountProxyInterface() = default; IAccountProxyInterface::~IAccountProxyInterface() = default;
IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_) IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_)
: ServiceFramework{system_, "IApplicationManagerInterface"} { : ServiceFramework{system_, "IApplicationManagerInterface"},
service_context{system_, "IApplicationManagerInterface"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "ListApplicationRecord"}, {0, &IApplicationManagerInterface::ListApplicationRecord, "ListApplicationRecord"},
{1, nullptr, "GenerateApplicationRecordCount"}, {1, nullptr, "GenerateApplicationRecordCount"},
{2, nullptr, "GetApplicationRecordUpdateSystemEvent"}, {2, &IApplicationManagerInterface::GetApplicationRecordUpdateSystemEvent, "GetApplicationRecordUpdateSystemEvent"},
{3, nullptr, "GetApplicationViewDeprecated"}, {3, nullptr, "GetApplicationViewDeprecated"},
{4, nullptr, "DeleteApplicationEntity"}, {4, nullptr, "DeleteApplicationEntity"},
{5, nullptr, "DeleteApplicationCompletely"}, {5, nullptr, "DeleteApplicationCompletely"},
@ -68,14 +70,14 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{40, nullptr, "GetApplicationLogoData"}, {40, nullptr, "GetApplicationLogoData"},
{41, nullptr, "CalculateApplicationDownloadRequiredSize"}, {41, nullptr, "CalculateApplicationDownloadRequiredSize"},
{42, nullptr, "CleanupSdCard"}, {42, nullptr, "CleanupSdCard"},
{43, nullptr, "CheckSdCardMountStatus"}, {43, &IApplicationManagerInterface::CheckSdCardMountStatus, "CheckSdCardMountStatus"},
{44, nullptr, "GetSdCardMountStatusChangedEvent"}, {44, &IApplicationManagerInterface::GetSdCardMountStatusChangedEvent, "GetSdCardMountStatusChangedEvent"},
{45, nullptr, "GetGameCardAttachmentEvent"}, {45, nullptr, "GetGameCardAttachmentEvent"},
{46, nullptr, "GetGameCardAttachmentInfo"}, {46, nullptr, "GetGameCardAttachmentInfo"},
{47, nullptr, "GetTotalSpaceSize"}, {47, nullptr, "GetTotalSpaceSize"},
{48, nullptr, "GetFreeSpaceSize"}, {48, &IApplicationManagerInterface::GetFreeSpaceSize, "GetFreeSpaceSize"},
{49, nullptr, "GetSdCardRemovedEvent"}, {49, nullptr, "GetSdCardRemovedEvent"},
{52, nullptr, "GetGameCardUpdateDetectionEvent"}, {52, &IApplicationManagerInterface::GetGameCardUpdateDetectionEvent, "GetGameCardUpdateDetectionEvent"},
{53, nullptr, "DisableApplicationAutoDelete"}, {53, nullptr, "DisableApplicationAutoDelete"},
{54, nullptr, "EnableApplicationAutoDelete"}, {54, nullptr, "EnableApplicationAutoDelete"},
{55, &IApplicationManagerInterface::GetApplicationDesiredLanguage, "GetApplicationDesiredLanguage"}, {55, &IApplicationManagerInterface::GetApplicationDesiredLanguage, "GetApplicationDesiredLanguage"},
@ -146,7 +148,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{502, nullptr, "RequestCheckGameCardRegistration"}, {502, nullptr, "RequestCheckGameCardRegistration"},
{503, nullptr, "RequestGameCardRegistrationGoldPoint"}, {503, nullptr, "RequestGameCardRegistrationGoldPoint"},
{504, nullptr, "RequestRegisterGameCard"}, {504, nullptr, "RequestRegisterGameCard"},
{505, nullptr, "GetGameCardMountFailureEvent"}, {505, &IApplicationManagerInterface::GetGameCardMountFailureEvent, "GetGameCardMountFailureEvent"},
{506, nullptr, "IsGameCardInserted"}, {506, nullptr, "IsGameCardInserted"},
{507, nullptr, "EnsureGameCardAccess"}, {507, nullptr, "EnsureGameCardAccess"},
{508, nullptr, "GetLastGameCardMountFailureResult"}, {508, nullptr, "GetLastGameCardMountFailureResult"},
@ -326,10 +328,34 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
record_update_system_event =
service_context.CreateEvent("IApplicationManagerInterface::RecordUpdateSystemEvent");
gamecard_update_detection_event =
service_context.CreateEvent("IApplicationManagerInterface::GamecardUpdateDetectionEvent");
gamecard_mount_status_event =
service_context.CreateEvent("IApplicationManagerInterface::GamecardMountStatusEvent");
gamecard_mount_failure_event =
service_context.CreateEvent("IApplicationManagerInterface::GamecardMountFailureEvent");
} }
IApplicationManagerInterface::~IApplicationManagerInterface() = default; IApplicationManagerInterface::~IApplicationManagerInterface() = default;
void IApplicationManagerInterface::ListApplicationRecord(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.Push(0);
}
void IApplicationManagerInterface::GetApplicationRecordUpdateSystemEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(record_update_system_event->GetReadableEvent());
}
void IApplicationManagerInterface::GetApplicationControlData(HLERequestContext& ctx) { void IApplicationManagerInterface::GetApplicationControlData(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
const auto flag = rp.PopRaw<u64>(); const auto flag = rp.PopRaw<u64>();
@ -389,6 +415,45 @@ void IApplicationManagerInterface::GetApplicationControlData(HLERequestContext&
rb.Push<u32>(static_cast<u32>(out.size())); rb.Push<u32>(static_cast<u32>(out.size()));
} }
void IApplicationManagerInterface::GetGameCardMountFailureEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(gamecard_mount_failure_event->GetReadableEvent());
}
void IApplicationManagerInterface::CheckSdCardMountStatus(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
void IApplicationManagerInterface::GetSdCardMountStatusChangedEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(gamecard_mount_status_event->GetReadableEvent());
}
void IApplicationManagerInterface::GetFreeSpaceSize(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(ResultSuccess);
rb.Push<u64>(1024UL * 1024UL * 1024UL);
}
void IApplicationManagerInterface::GetGameCardUpdateDetectionEvent(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(gamecard_update_detection_event->GetReadableEvent());
}
void IApplicationManagerInterface::GetApplicationDesiredLanguage(HLERequestContext& ctx) { void IApplicationManagerInterface::GetApplicationDesiredLanguage(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
const auto supported_languages = rp.Pop<u32>(); const auto supported_languages = rp.Pop<u32>();
@ -502,7 +567,7 @@ IContentManagementInterface::IContentManagementInterface(Core::System& system_)
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{11, nullptr, "CalculateApplicationOccupiedSize"}, {11, nullptr, "CalculateApplicationOccupiedSize"},
{43, nullptr, "CheckSdCardMountStatus"}, {43, &IContentManagementInterface::CheckSdCardMountStatus, "CheckSdCardMountStatus"},
{47, &IContentManagementInterface::GetTotalSpaceSize, "GetTotalSpaceSize"}, {47, &IContentManagementInterface::GetTotalSpaceSize, "GetTotalSpaceSize"},
{48, &IContentManagementInterface::GetFreeSpaceSize, "GetFreeSpaceSize"}, {48, &IContentManagementInterface::GetFreeSpaceSize, "GetFreeSpaceSize"},
{600, nullptr, "CountApplicationContentMeta"}, {600, nullptr, "CountApplicationContentMeta"},
@ -517,24 +582,31 @@ IContentManagementInterface::IContentManagementInterface(Core::System& system_)
IContentManagementInterface::~IContentManagementInterface() = default; IContentManagementInterface::~IContentManagementInterface() = default;
void IContentManagementInterface::CheckSdCardMountStatus(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
void IContentManagementInterface::GetTotalSpaceSize(HLERequestContext& ctx) { void IContentManagementInterface::GetTotalSpaceSize(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ ctx };
const auto storage{rp.PopEnum<FileSys::StorageId>()}; const auto storage{ rp.PopEnum<FileSys::StorageId>() };
LOG_INFO(Service_Capture, "called, storage={}", storage); LOG_INFO(Service_Capture, "called, storage={}", storage);
IPC::ResponseBuilder rb{ctx, 4}; IPC::ResponseBuilder rb{ ctx, 4 };
rb.Push(ResultSuccess); rb.Push(ResultSuccess);
rb.Push<u64>(system.GetFileSystemController().GetTotalSpaceSize(storage)); rb.Push<u64>(system.GetFileSystemController().GetTotalSpaceSize(storage));
} }
void IContentManagementInterface::GetFreeSpaceSize(HLERequestContext& ctx) { void IContentManagementInterface::GetFreeSpaceSize(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ ctx };
const auto storage{rp.PopEnum<FileSys::StorageId>()}; const auto storage{ rp.PopEnum<FileSys::StorageId>() };
LOG_INFO(Service_Capture, "called, storage={}", storage); LOG_INFO(Service_Capture, "called, storage={}", storage);
IPC::ResponseBuilder rb{ctx, 4}; IPC::ResponseBuilder rb{ ctx, 4 };
rb.Push(ResultSuccess); rb.Push(ResultSuccess);
rb.Push<u64>(system.GetFileSystemController().GetFreeSpaceSize(storage)); rb.Push<u64>(system.GetFileSystemController().GetFreeSpaceSize(storage));
} }
@ -564,7 +636,7 @@ IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_)
{704, nullptr, "ListDownloadTaskStatus"}, {704, nullptr, "ListDownloadTaskStatus"},
{705, nullptr, "RequestDownloadTaskListData"}, {705, nullptr, "RequestDownloadTaskListData"},
{706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, {706, nullptr, "TryCommitCurrentApplicationDownloadTask"},
{707, nullptr, "EnableAutoCommit"}, {707, &IDownloadTaskInterface::EnableAutoCommit, "EnableAutoCommit"},
{708, nullptr, "DisableAutoCommit"}, {708, nullptr, "DisableAutoCommit"},
{709, nullptr, "TriggerDynamicCommitEvent"}, {709, nullptr, "TriggerDynamicCommitEvent"},
}; };
@ -575,6 +647,12 @@ IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_)
IDownloadTaskInterface::~IDownloadTaskInterface() = default; IDownloadTaskInterface::~IDownloadTaskInterface() = default;
void IDownloadTaskInterface::EnableAutoCommit(HLERequestContext& ctx) {
LOG_ERROR(Service_SET, "called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
IECommerceInterface::IECommerceInterface(Core::System& system_) IECommerceInterface::IECommerceInterface(Core::System& system_)
: ServiceFramework{system_, "IECommerceInterface"} { : ServiceFramework{system_, "IECommerceInterface"} {
// clang-format off // clang-format off
@ -753,7 +831,8 @@ public:
class NS_SU final : public ServiceFramework<NS_SU> { class NS_SU final : public ServiceFramework<NS_SU> {
public: public:
explicit NS_SU(Core::System& system_) : ServiceFramework{system_, "ns:su"} { explicit NS_SU(Core::System& system_)
: ServiceFramework{system_, "ns:su"}, service_context{system_, "ns:su"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetBackgroundNetworkUpdateState"}, {0, nullptr, "GetBackgroundNetworkUpdateState"},
@ -763,7 +842,7 @@ public:
{4, nullptr, "RequestBackgroundNetworkUpdate"}, {4, nullptr, "RequestBackgroundNetworkUpdate"},
{5, nullptr, "NotifyBackgroundNetworkUpdate"}, {5, nullptr, "NotifyBackgroundNetworkUpdate"},
{6, nullptr, "NotifyExFatDriverDownloadedForDebug"}, {6, nullptr, "NotifyExFatDriverDownloadedForDebug"},
{9, nullptr, "GetSystemUpdateNotificationEventForContentDelivery"}, {9, &NS_SU::GetSystemUpdateNotificationEventForContentDelivery, "GetSystemUpdateNotificationEventForContentDelivery"},
{10, nullptr, "NotifySystemUpdateForContentDelivery"}, {10, nullptr, "NotifySystemUpdateForContentDelivery"},
{11, nullptr, "PrepareShutdown"}, {11, nullptr, "PrepareShutdown"},
{12, nullptr, "Unknown12"}, {12, nullptr, "Unknown12"},
@ -777,9 +856,14 @@ public:
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
update_notification_event = service_context.CreateEvent("NS_SU::UpdateNotificationEvent");
} }
private: private:
Kernel::KEvent* update_notification_event;
KernelHelpers::ServiceContext service_context;
void OpenSystemUpdateControl(HLERequestContext& ctx) { void OpenSystemUpdateControl(HLERequestContext& ctx) {
LOG_DEBUG(Service_NS, "called"); LOG_DEBUG(Service_NS, "called");
@ -787,6 +871,14 @@ private:
rb.Push(ResultSuccess); rb.Push(ResultSuccess);
rb.PushIpcInterface<ISystemUpdateControl>(system); rb.PushIpcInterface<ISystemUpdateControl>(system);
} }
void GetSystemUpdateNotificationEventForContentDelivery(HLERequestContext& ctx) {
LOG_ERROR(Service_AM, "called");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(ResultSuccess);
rb.PushCopyObjects(update_notification_event->GetReadableEvent());
}
}; };
class NS_VM final : public ServiceFramework<NS_VM> { class NS_VM final : public ServiceFramework<NS_VM> {
@ -813,6 +905,27 @@ private:
} }
}; };
class ISenderService final : public ServiceFramework<ISenderService> {
public:
explicit ISenderService(Core::System& system_) : ServiceFramework{system_, "ovln:snd"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &ISenderService::OpenSender, "OpenSender"},
};
// clang-format on
RegisterHandlers(functions);
}
private:
void OpenSender(HLERequestContext& ctx) {
LOG_ERROR(Service_NS, "(STUBBED) called, check in out");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
};
void LoopProcess(Core::System& system) { void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system); auto server_manager = std::make_unique<ServerManager>(system);
@ -832,6 +945,9 @@ void LoopProcess(Core::System& system) {
std::make_shared<IPlatformServiceManager>(system, "pl:s")); std::make_shared<IPlatformServiceManager>(system, "pl:s"));
server_manager->RegisterNamedService("pl:u", server_manager->RegisterNamedService("pl:u",
std::make_shared<IPlatformServiceManager>(system, "pl:u")); std::make_shared<IPlatformServiceManager>(system, "pl:u"));
server_manager->RegisterNamedService("ovln:snd", std::make_shared<ISenderService>(system));
ServerManager::RunServer(std::move(server_manager)); ServerManager::RunServer(std::move(server_manager));
} }

View File

@ -3,6 +3,7 @@
#pragma once #pragma once
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
namespace Core { namespace Core {
@ -33,9 +34,22 @@ public:
u8 application_language); u8 application_language);
private: private:
void ListApplicationRecord(HLERequestContext& ctx);
void GetApplicationRecordUpdateSystemEvent(HLERequestContext& ctx);
void GetApplicationControlData(HLERequestContext& ctx); void GetApplicationControlData(HLERequestContext& ctx);
void GetGameCardMountFailureEvent(HLERequestContext& ctx);
void CheckSdCardMountStatus(HLERequestContext& ctx);
void GetSdCardMountStatusChangedEvent(HLERequestContext& ctx);
void GetFreeSpaceSize(HLERequestContext& ctx);
void GetGameCardUpdateDetectionEvent(HLERequestContext& ctx);
void GetApplicationDesiredLanguage(HLERequestContext& ctx); void GetApplicationDesiredLanguage(HLERequestContext& ctx);
void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx);
Kernel::KEvent* record_update_system_event;
Kernel::KEvent* gamecard_update_detection_event;
Kernel::KEvent* gamecard_mount_status_event;
Kernel::KEvent* gamecard_mount_failure_event;
KernelHelpers::ServiceContext service_context;
}; };
class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> {
@ -50,6 +64,7 @@ public:
~IContentManagementInterface() override; ~IContentManagementInterface() override;
private: private:
void CheckSdCardMountStatus(HLERequestContext& ctx);
void GetTotalSpaceSize(HLERequestContext& ctx); void GetTotalSpaceSize(HLERequestContext& ctx);
void GetFreeSpaceSize(HLERequestContext& ctx); void GetFreeSpaceSize(HLERequestContext& ctx);
}; };
@ -64,6 +79,9 @@ class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterf
public: public:
explicit IDownloadTaskInterface(Core::System& system_); explicit IDownloadTaskInterface(Core::System& system_);
~IDownloadTaskInterface() override; ~IDownloadTaskInterface() override;
private:
void EnableAutoCommit(HLERequestContext& ctx);
}; };
class IECommerceInterface final : public ServiceFramework<IECommerceInterface> { class IECommerceInterface final : public ServiceFramework<IECommerceInterface> {

View File

@ -79,12 +79,20 @@ public:
: ServiceFramework{system_, "INativeHandleHolder"} { : ServiceFramework{system_, "INativeHandleHolder"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetNativeHandle"}, {0, &INativeHandleHolder::GetNativeHandle, "GetNativeHandle"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
void GetNativeHandle(HLERequestContext& ctx) {
LOG_ERROR(Service_OLSC, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push(0);
}
}; };
class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> { class ITransferTaskListController final : public ServiceFramework<ITransferTaskListController> {

View File

@ -153,7 +153,7 @@ public:
{2400, nullptr, "OpenIndirectLayer"}, {2400, nullptr, "OpenIndirectLayer"},
{2401, nullptr, "CloseIndirectLayer"}, {2401, nullptr, "CloseIndirectLayer"},
{2402, nullptr, "FlipIndirectLayer"}, {2402, nullptr, "FlipIndirectLayer"},
{3000, nullptr, "ListDisplayModes"}, {3000, &ISystemDisplayService::ListDisplayModes, "ListDisplayModes"},
{3001, nullptr, "ListDisplayRgbRanges"}, {3001, nullptr, "ListDisplayRgbRanges"},
{3002, nullptr, "ListDisplayContentTypes"}, {3002, nullptr, "ListDisplayContentTypes"},
{3200, &ISystemDisplayService::GetDisplayMode, "GetDisplayMode"}, {3200, &ISystemDisplayService::GetDisplayMode, "GetDisplayMode"},
@ -319,6 +319,28 @@ private:
rb.Push(ResultSuccess); rb.Push(ResultSuccess);
} }
void ListDisplayModes(HLERequestContext& ctx) {
struct DisplayInfo {
u8 unknownString[0x40];
bool unknownBool;
INSERT_PADDING_BYTES(0x7);
u64 unknownU64_1;
u64 unknownU64_2;
u64 unknownU64_3;
};
static_assert(sizeof(DisplayInfo) == 0x60, "DisplayInfo is an invalid size");
LOG_WARNING(Service_VI, "(STUBBED) called");
std::vector<DisplayInfo> display_modes(1);
ctx.WriteBuffer(display_modes);
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push(1);
}
void GetDisplayMode(HLERequestContext& ctx) { void GetDisplayMode(HLERequestContext& ctx) {
LOG_WARNING(Service_VI, "(STUBBED) called"); LOG_WARNING(Service_VI, "(STUBBED) called");

View File

@ -4217,7 +4217,7 @@ void GMainWindow::OnMiiEdit() {
return; return;
} }
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::MiiEdit); system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::QLaunch);
const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath())); const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath()));
UISettings::values.roms_path = QFileInfo(filename).path().toStdString(); UISettings::values.roms_path = QFileInfo(filename).path().toStdString();