Stub ectx:w and ectx:aw Glue services

This commit is contained in:
lynxnb 2021-12-13 13:26:59 +01:00 committed by ◱ Mark
parent 2993f65a1c
commit 092dcb18c8
5 changed files with 59 additions and 0 deletions

View File

@ -220,6 +220,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/timesrv/ITimeZoneService.cpp
${source_DIR}/skyline/services/glue/IStaticService.cpp
${source_DIR}/skyline/services/glue/ITimeZoneService.cpp
${source_DIR}/skyline/services/glue/IWriterForSystem.cpp
${source_DIR}/skyline/services/fssrv/IFileSystemProxy.cpp
${source_DIR}/skyline/services/fssrv/IFileSystem.cpp
${source_DIR}/skyline/services/fssrv/IFile.cpp

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/base_service.h>
namespace skyline::service::glue {
/**
* @brief Stub implementation for IContextRegistrar
* @url https://switchbrew.org/wiki/Glue_services#IContextRegistrar
*/
class IContextRegistrar : public BaseService {
public:
IContextRegistrar(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
};
}

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include <services/serviceman.h>
#include "IWriterForSystem.h"
#include "IContextRegistrar.h"
namespace skyline::service::glue {
IWriterForSystem::IWriterForSystem(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
Result IWriterForSystem::CreateContextRegistrar(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
manager.RegisterService(std::make_shared<IContextRegistrar>(state, manager), session, response);
return {};
}
}

View File

@ -0,0 +1,23 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/base_service.h>
namespace skyline::service::glue {
/**
* @brief Stub implementation for IWriterForSystem
* @url https://switchbrew.org/wiki/Glue_services#ectx:w
*/
class IWriterForSystem : public BaseService {
public:
IWriterForSystem(const DeviceState &state, ServiceManager &manager);
Result CreateContextRegistrar(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x0, IWriterForSystem, CreateContextRegistrar),
)
};
}

View File

@ -16,6 +16,7 @@
#include "hid/IHidServer.h"
#include "timesrv/IStaticService.h"
#include "glue/IStaticService.h"
#include "glue/IWriterForSystem.h"
#include "services/timesrv/core.h"
#include "fssrv/IFileSystemProxy.h"
#include "nvdrv/INvDrvServices.h"
@ -79,6 +80,8 @@ namespace skyline::service {
SERVICE_CASE(glue::IStaticService, "time:a", globalServiceState->timesrv.managerServer.GetStaticServiceAsAdmin(state, *this), globalServiceState->timesrv, timesrv::constant::StaticServiceAdminPermissions)
SERVICE_CASE(glue::IStaticService, "time:r", globalServiceState->timesrv.managerServer.GetStaticServiceAsRepair(state, *this), globalServiceState->timesrv, timesrv::constant::StaticServiceRepairPermissions)
SERVICE_CASE(glue::IStaticService, "time:u", globalServiceState->timesrv.managerServer.GetStaticServiceAsUser(state, *this), globalServiceState->timesrv, timesrv::constant::StaticServiceUserPermissions)
SERVICE_CASE(glue::IWriterForSystem, "ectx:w")
SERVICE_CASE(glue::IWriterForSystem, "ectx:aw")
SERVICE_CASE(fssrv::IFileSystemProxy, "fsp-srv")
SERVICE_CASE(nvdrv::INvDrvServices, "nvdrv", globalServiceState->nvdrv, nvdrv::ApplicationSessionPermissions)
SERVICE_CASE(nvdrv::INvDrvServices, "nvdrv:a", globalServiceState->nvdrv, nvdrv::AppletSessionPermissions)