// Copyright 2018 yuzu emulator team // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include "core/hle/service/service.h" namespace Service { namespace FileSystem { class FileSystemController; } // namespace FileSystem namespace NS { class IAccountProxyInterface final : public ServiceFramework { public: explicit IAccountProxyInterface(); ~IAccountProxyInterface() override; }; class IApplicationManagerInterface final : public ServiceFramework { public: explicit IApplicationManagerInterface(); ~IApplicationManagerInterface() override; 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(); ~IApplicationVersionInterface() override; }; class IContentManagerInterface final : public ServiceFramework { public: explicit IContentManagerInterface(); ~IContentManagerInterface() override; }; class IDocumentInterface final : public ServiceFramework { public: explicit IDocumentInterface(); ~IDocumentInterface() override; }; class IDownloadTaskInterface final : public ServiceFramework { public: explicit IDownloadTaskInterface(); ~IDownloadTaskInterface() override; }; class IECommerceInterface final : public ServiceFramework { public: explicit IECommerceInterface(); ~IECommerceInterface() override; }; class IFactoryResetInterface final : public ServiceFramework { public: explicit IFactoryResetInterface(); ~IFactoryResetInterface() override; }; class NS final : public ServiceFramework { public: explicit NS(const char* name); ~NS() override; std::shared_ptr GetApplicationManagerInterface() const; 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() const { 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, Core::System& system); } // namespace NS } // namespace Service