2018-04-24 18:08:23 +03:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-03-27 02:03:18 +11:00
|
|
|
#include "common/common_funcs.h"
|
2018-04-24 18:08:23 +03:00
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
|
2020-11-26 15:19:08 -05:00
|
|
|
namespace Core {
|
|
|
|
|
class System;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-24 18:08:23 +03:00
|
|
|
namespace Service::PCTL {
|
|
|
|
|
|
2021-03-30 20:27:27 +11:00
|
|
|
enum class Capability : u32 {
|
|
|
|
|
None = 0,
|
2021-03-27 02:03:18 +11:00
|
|
|
Application = 1 << 0,
|
|
|
|
|
SnsPost = 1 << 1,
|
|
|
|
|
Recovery = 1 << 6,
|
|
|
|
|
Status = 1 << 8,
|
2021-03-30 20:27:27 +11:00
|
|
|
StereoVision = 1 << 9,
|
2021-03-27 02:03:18 +11:00
|
|
|
System = 1 << 15,
|
|
|
|
|
};
|
|
|
|
|
DECLARE_ENUM_FLAG_OPERATORS(Capability);
|
|
|
|
|
|
2018-04-24 18:08:23 +03:00
|
|
|
class Module final {
|
|
|
|
|
public:
|
|
|
|
|
class Interface : public ServiceFramework<Interface> {
|
|
|
|
|
public:
|
2021-03-27 02:03:18 +11:00
|
|
|
explicit Interface(Core::System& system_, std::shared_ptr<Module> module_, const char* name,
|
|
|
|
|
Capability capability);
|
2018-09-10 21:20:52 -04:00
|
|
|
~Interface() override;
|
2018-04-24 18:08:23 +03:00
|
|
|
|
|
|
|
|
void CreateService(Kernel::HLERequestContext& ctx);
|
|
|
|
|
void CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
std::shared_ptr<Module> module;
|
2021-03-27 02:03:18 +11:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Capability capability{};
|
2018-04-24 18:08:23 +03:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/// Registers all PCTL services with the specified service manager.
|
2020-11-26 15:19:08 -05:00
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system);
|
2018-04-24 18:08:23 +03:00
|
|
|
|
|
|
|
|
} // namespace Service::PCTL
|