2018-01-13 13:22:39 -08:00
|
|
|
// Copyright 2018 yuzu emulator team
|
2017-10-14 19:50:04 -07:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-01-22 10:46:36 -08:00
|
|
|
#include <memory>
|
2017-10-14 19:50:04 -07:00
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2018-02-02 13:03:40 -08:00
|
|
|
namespace Kernel {
|
|
|
|
class Event;
|
|
|
|
}
|
|
|
|
|
2017-10-14 19:50:04 -07:00
|
|
|
namespace Service {
|
2018-01-22 10:46:36 -08:00
|
|
|
namespace NVFlinger {
|
|
|
|
class NVFlinger;
|
|
|
|
}
|
|
|
|
|
2017-10-14 19:50:04 -07:00
|
|
|
namespace AM {
|
|
|
|
|
2018-02-02 13:03:40 -08:00
|
|
|
enum SystemLanguage {
|
|
|
|
Japanese = 0,
|
2018-05-25 19:31:54 -07:00
|
|
|
English = 1, // en-US
|
|
|
|
French = 2,
|
|
|
|
German = 3,
|
|
|
|
Italian = 4,
|
|
|
|
Spanish = 5,
|
|
|
|
Chinese = 6,
|
|
|
|
Korean = 7,
|
|
|
|
Dutch = 8,
|
|
|
|
Portuguese = 9,
|
|
|
|
Russian = 10,
|
|
|
|
Taiwanese = 11,
|
|
|
|
BritishEnglish = 12, // en-GB
|
|
|
|
CanadianFrench = 13,
|
|
|
|
LatinAmericanSpanish = 14, // es-419
|
|
|
|
// 4.0.0+
|
|
|
|
SimplifiedChinese = 15,
|
|
|
|
TraditionalChinese = 16,
|
2018-02-02 13:03:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class IWindowController final : public ServiceFramework<IWindowController> {
|
|
|
|
public:
|
|
|
|
IWindowController();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void GetAppletResourceUserId(Kernel::HLERequestContext& ctx);
|
|
|
|
void AcquireForegroundRights(Kernel::HLERequestContext& ctx);
|
|
|
|
};
|
|
|
|
|
|
|
|
class IAudioController final : public ServiceFramework<IAudioController> {
|
|
|
|
public:
|
|
|
|
IAudioController();
|
2018-02-22 06:28:15 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
|
|
|
|
|
|
|
|
u32 volume{100};
|
2018-02-02 13:03:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class IDisplayController final : public ServiceFramework<IDisplayController> {
|
|
|
|
public:
|
|
|
|
IDisplayController();
|
|
|
|
};
|
|
|
|
|
|
|
|
class IDebugFunctions final : public ServiceFramework<IDebugFunctions> {
|
|
|
|
public:
|
|
|
|
IDebugFunctions();
|
|
|
|
};
|
|
|
|
|
|
|
|
class ISelfController final : public ServiceFramework<ISelfController> {
|
|
|
|
public:
|
2018-07-19 09:05:48 -07:00
|
|
|
explicit ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
2018-02-02 13:03:40 -08:00
|
|
|
|
|
|
|
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);
|
2018-02-07 04:11:17 -08:00
|
|
|
void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
|
2018-08-07 21:40:46 -07:00
|
|
|
void SetScreenShotImageOrientation(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
|
2018-02-22 02:04:23 -08:00
|
|
|
void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
|
2018-05-07 08:27:30 -07:00
|
|
|
void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
|
2018-08-16 21:23:08 -07:00
|
|
|
void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
|
|
|
|
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
|
2018-02-07 04:11:17 -08:00
|
|
|
Kernel::SharedPtr<Kernel::Event> launchable_event;
|
2018-08-16 21:23:08 -07:00
|
|
|
u32 idle_time_detection_extension = 0;
|
2018-02-02 13:03:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
|
|
|
|
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);
|
2018-08-16 14:20:54 -07:00
|
|
|
void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
void GetOperationMode(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetPerformanceMode(Kernel::HLERequestContext& ctx);
|
2018-08-23 15:31:45 -07:00
|
|
|
void GetBootMode(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
|
|
|
|
Kernel::SharedPtr<Kernel::Event> event;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
|
|
|
|
public:
|
|
|
|
ILibraryAppletCreator();
|
2018-02-07 04:11:17 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateLibraryApplet(Kernel::HLERequestContext& ctx);
|
2018-06-03 11:19:24 -07:00
|
|
|
void CreateStorage(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
|
|
|
|
public:
|
|
|
|
IApplicationFunctions();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void PopLaunchParameter(Kernel::HLERequestContext& ctx);
|
2018-05-07 08:27:30 -07:00
|
|
|
void CreateApplicationAndRequestToStartForQuest(Kernel::HLERequestContext& ctx);
|
2018-02-05 17:58:11 -08:00
|
|
|
void EnsureSaveData(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
void SetTerminateResult(Kernel::HLERequestContext& ctx);
|
2018-05-25 21:21:03 -07:00
|
|
|
void GetDisplayVersion(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
void GetDesiredLanguage(Kernel::HLERequestContext& ctx);
|
|
|
|
void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx);
|
|
|
|
void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx);
|
|
|
|
void NotifyRunning(Kernel::HLERequestContext& ctx);
|
2018-06-05 15:44:01 -07:00
|
|
|
void GetPseudoDeviceId(Kernel::HLERequestContext& ctx);
|
2018-02-02 13:03:40 -08:00
|
|
|
};
|
|
|
|
|
2018-05-07 08:27:30 -07:00
|
|
|
class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> {
|
|
|
|
public:
|
|
|
|
IHomeMenuFunctions();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void RequestToGetForeground(Kernel::HLERequestContext& ctx);
|
|
|
|
};
|
|
|
|
|
|
|
|
class IGlobalStateController final : public ServiceFramework<IGlobalStateController> {
|
|
|
|
public:
|
|
|
|
IGlobalStateController();
|
|
|
|
};
|
|
|
|
|
|
|
|
class IApplicationCreator final : public ServiceFramework<IApplicationCreator> {
|
|
|
|
public:
|
|
|
|
IApplicationCreator();
|
|
|
|
};
|
|
|
|
|
|
|
|
class IProcessWindingController final : public ServiceFramework<IProcessWindingController> {
|
|
|
|
public:
|
|
|
|
IProcessWindingController();
|
|
|
|
};
|
|
|
|
|
2017-10-14 19:50:04 -07:00
|
|
|
/// Registers all AM services with the specified service manager.
|
2018-01-22 10:46:36 -08:00
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager,
|
|
|
|
std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
2017-10-14 19:50:04 -07:00
|
|
|
|
|
|
|
} // namespace AM
|
|
|
|
} // namespace Service
|