service: Add stubs for Qlaunch
This commit is contained in:
@@ -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:
|
||||||
@@ -338,7 +340,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> {
|
||||||
|
@@ -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>();
|
||||||
|
@@ -11,6 +11,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"
|
||||||
@@ -35,12 +36,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"},
|
||||||
@@ -69,14 +71,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"},
|
||||||
@@ -147,7 +149,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"},
|
||||||
@@ -327,10 +329,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>();
|
||||||
@@ -390,6 +416,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>();
|
||||||
@@ -503,7 +568,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"},
|
||||||
@@ -518,24 +583,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));
|
||||||
}
|
}
|
||||||
@@ -591,7 +663,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"},
|
||||||
};
|
};
|
||||||
@@ -602,6 +674,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
|
||||||
@@ -814,7 +892,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"},
|
||||||
@@ -824,7 +903,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"},
|
||||||
@@ -838,9 +917,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");
|
||||||
|
|
||||||
@@ -848,6 +932,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> {
|
||||||
@@ -874,6 +966,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);
|
||||||
|
|
||||||
@@ -893,6 +1006,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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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);
|
||||||
};
|
};
|
||||||
@@ -68,6 +83,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> {
|
||||||
|
@@ -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> {
|
||||||
|
@@ -154,7 +154,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"},
|
||||||
@@ -321,6 +321,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");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user