// Copyright 2018 yuzu emulator team // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include #include "core/hle/service/service.h" namespace Kernel { class Event; } namespace Service { namespace NVFlinger { class NVFlinger; } namespace AM { // TODO: Add more languages enum SystemLanguage { Japanese = 0, English = 1, }; class IWindowController final : public ServiceFramework { public: IWindowController(); private: void GetAppletResourceUserId(Kernel::HLERequestContext& ctx); void AcquireForegroundRights(Kernel::HLERequestContext& ctx); }; class IAudioController final : public ServiceFramework { public: IAudioController(); }; class IDisplayController final : public ServiceFramework { public: IDisplayController(); }; class IDebugFunctions final : public ServiceFramework { public: IDebugFunctions(); }; class ISelfController final : public ServiceFramework { public: ISelfController(std::shared_ptr nvflinger); private: void SetFocusHandlingMode(Kernel::HLERequestContext& ctx); void SetRestartMessageEnabled(Kernel::HLERequestContext& ctx); void SetPerformanceModeChangedNotification(Kernel::HLERequestContext& ctx); void SetOperationModeChangedNotification(Kernel::HLERequestContext& ctx); void SetOutOfFocusSuspendingEnabled(Kernel::HLERequestContext& ctx); void LockExit(Kernel::HLERequestContext& ctx); void UnlockExit(Kernel::HLERequestContext& ctx); void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx); std::shared_ptr nvflinger; }; class ICommonStateGetter final : public ServiceFramework { public: ICommonStateGetter(); private: enum class FocusState : u8 { InFocus = 1, NotInFocus = 2, }; enum class OperationMode : u8 { Handheld = 0, Docked = 1, }; void GetEventHandle(Kernel::HLERequestContext& ctx); void ReceiveMessage(Kernel::HLERequestContext& ctx); void GetCurrentFocusState(Kernel::HLERequestContext& ctx); void GetOperationMode(Kernel::HLERequestContext& ctx); void GetPerformanceMode(Kernel::HLERequestContext& ctx); Kernel::SharedPtr event; }; class ILibraryAppletCreator final : public ServiceFramework { public: ILibraryAppletCreator(); }; class IApplicationFunctions final : public ServiceFramework { public: IApplicationFunctions(); private: void PopLaunchParameter(Kernel::HLERequestContext& ctx); void EnsureSaveData(Kernel::HLERequestContext& ctx); void SetTerminateResult(Kernel::HLERequestContext& ctx); void GetDesiredLanguage(Kernel::HLERequestContext& ctx); void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx); void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); void NotifyRunning(Kernel::HLERequestContext& ctx); }; /// Registers all AM services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager, std::shared_ptr nvflinger); } // namespace AM } // namespace Service