From 7dbf4c1ae5fbe6287575e7ac1b0f93dbb16843c2 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 23 May 2019 00:55:56 -0700 Subject: Implement IApplicationFunctions::GetDesiredLanguage --- src/core/hle/service/ns/ns.h | 74 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'src/core/hle/service/ns/ns.h') diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index b81ca8f1e..a2b35e795 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h @@ -5,9 +5,83 @@ #pragma once #include "core/hle/service/service.h" +#include "core/hle/service/set/set.h" namespace Service::NS { +class IAccountProxyInterface final : public ServiceFramework { +public: + explicit IAccountProxyInterface(); +}; + +class IApplicationManagerInterface final : public ServiceFramework { +public: + explicit IApplicationManagerInterface(); + + ResultVal GetApplicationDesiredLanguage(u32 supported_languages); + ResultVal ConvertApplicationLanguageToLanguageCode(u8 application_language); + +private: + void GetApplicationControlData(Kernel::HLERequestContext& ctx); + void GetApplicationDesiredLanguage(Kernel::HLERequestContext& ctx); + void ConvertApplicationLanguageToLanguageCode(Kernel::HLERequestContext& ctx); +}; + +class IApplicationVersionInterface final : public ServiceFramework { +public: + explicit IApplicationVersionInterface(); +}; + +class IContentManagerInterface final : public ServiceFramework { +public: + explicit IContentManagerInterface(); +}; + +class IDocumentInterface final : public ServiceFramework { +public: + explicit IDocumentInterface(); +}; + +class IDownloadTaskInterface final : public ServiceFramework { +public: + explicit IDownloadTaskInterface(); +}; + +class IECommerceInterface final : public ServiceFramework { +public: + explicit IECommerceInterface(); +}; + +class IFactoryResetInterface final : public ServiceFramework { +public: + explicit IFactoryResetInterface(); +}; + +class NS final : public ServiceFramework { +public: + explicit NS(const char* name); + + std::shared_ptr GetApplicationManagerInterface(); + +private: + template + void PushInterface(Kernel::HLERequestContext& ctx) { + LOG_DEBUG(Service_NS, "called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface(); + } + + template + std::shared_ptr GetInterface() { + static_assert(std::is_base_of_v, + "Not a base of ServiceFrameworkBase"); + + return std::make_shared(); + } +}; + /// Registers all NS services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); -- cgit v1.2.3