2018-01-13 22:22:39 +01:00
|
|
|
// Copyright 2018 yuzu emulator team
|
2017-10-15 04:50:04 +02:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-01-22 19:46:36 +01:00
|
|
|
#include <memory>
|
2017-10-15 04:50:04 +02:00
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2018-02-02 22:03:40 +01:00
|
|
|
namespace Kernel {
|
|
|
|
class Event;
|
|
|
|
}
|
|
|
|
|
2017-10-15 04:50:04 +02:00
|
|
|
namespace Service {
|
2018-01-22 19:46:36 +01:00
|
|
|
namespace NVFlinger {
|
|
|
|
class NVFlinger;
|
|
|
|
}
|
|
|
|
|
2017-10-15 04:50:04 +02:00
|
|
|
namespace AM {
|
|
|
|
|
2018-02-02 22:03:40 +01:00
|
|
|
// TODO: Add more languages
|
|
|
|
enum SystemLanguage {
|
|
|
|
Japanese = 0,
|
|
|
|
English = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
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();
|
|
|
|
};
|
|
|
|
|
|
|
|
class IDisplayController final : public ServiceFramework<IDisplayController> {
|
|
|
|
public:
|
|
|
|
IDisplayController();
|
|
|
|
};
|
|
|
|
|
|
|
|
class IDebugFunctions final : public ServiceFramework<IDebugFunctions> {
|
|
|
|
public:
|
|
|
|
IDebugFunctions();
|
|
|
|
};
|
|
|
|
|
|
|
|
class ISelfController final : public ServiceFramework<ISelfController> {
|
|
|
|
public:
|
|
|
|
ISelfController(std::shared_ptr<NVFlinger::NVFlinger> 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);
|
2018-02-07 13:11:17 +01:00
|
|
|
void GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext& ctx);
|
2018-02-02 22:03:40 +01:00
|
|
|
void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
|
|
|
|
|
|
|
|
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
|
2018-02-07 13:11:17 +01:00
|
|
|
Kernel::SharedPtr<Kernel::Event> launchable_event;
|
2018-02-02 22:03:40 +01: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);
|
|
|
|
void GetOperationMode(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetPerformanceMode(Kernel::HLERequestContext& ctx);
|
|
|
|
|
|
|
|
Kernel::SharedPtr<Kernel::Event> event;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {
|
|
|
|
public:
|
|
|
|
ILibraryAppletCreator();
|
2018-02-07 13:11:17 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateLibraryApplet(Kernel::HLERequestContext& ctx);
|
2018-02-02 22:03:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
|
|
|
|
public:
|
|
|
|
IApplicationFunctions();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void PopLaunchParameter(Kernel::HLERequestContext& ctx);
|
2018-02-06 02:58:11 +01:00
|
|
|
void EnsureSaveData(Kernel::HLERequestContext& ctx);
|
2018-02-02 22:03:40 +01:00
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
2017-10-15 04:50:04 +02:00
|
|
|
/// Registers all AM services with the specified service manager.
|
2018-01-22 19:46:36 +01:00
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager,
|
|
|
|
std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
|
2017-10-15 04:50:04 +02:00
|
|
|
|
|
|
|
} // namespace AM
|
|
|
|
} // namespace Service
|