Add an empty pctl implementation

This is required by Puyo Puyo Tetris. It may be stubbed further if
needed in the future.
This commit is contained in:
Billy Laws 2020-07-04 21:06:58 +01:00
parent 23d6b596b2
commit 162df93870
5 changed files with 39 additions and 3 deletions

View File

@ -105,6 +105,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/visrv/ISystemDisplayService.cpp ${source_DIR}/skyline/services/visrv/ISystemDisplayService.cpp
${source_DIR}/skyline/services/pl/IPlatformServiceManager.cpp ${source_DIR}/skyline/services/pl/IPlatformServiceManager.cpp
${source_DIR}/skyline/services/aocsrv/IAddOnContentManager.cpp ${source_DIR}/skyline/services/aocsrv/IAddOnContentManager.cpp
${source_DIR}/skyline/services/pctl/IParentalControlServiceFactory.cpp
${source_DIR}/skyline/vfs/partition_filesystem.cpp ${source_DIR}/skyline/vfs/partition_filesystem.cpp
${source_DIR}/skyline/vfs/rom_filesystem.cpp ${source_DIR}/skyline/vfs/rom_filesystem.cpp
${source_DIR}/skyline/vfs/os_backing.cpp ${source_DIR}/skyline/vfs/os_backing.cpp

View File

@ -60,8 +60,9 @@ namespace skyline::service {
visrv_ISystemDisplayService, visrv_ISystemDisplayService,
visrv_IManagerDisplayService, visrv_IManagerDisplayService,
hosbinder_IHOSBinderDriver, hosbinder_IHOSBinderDriver,
pl_IPlatformServiceManager pl_IPlatformServiceManager,
aocsrv_IAddOnContentManager, aocsrv_IAddOnContentManager,
pctl_IParentalControlServiceFactory,
}; };
/** /**
@ -86,8 +87,12 @@ namespace skyline::service {
{"nvdrv:s", Service::nvdrv_INvDrvServices}, {"nvdrv:s", Service::nvdrv_INvDrvServices},
{"nvdrv:t", Service::nvdrv_INvDrvServices}, {"nvdrv:t", Service::nvdrv_INvDrvServices},
{"vi:m", Service::visrv_IManagerRootService}, {"vi:m", Service::visrv_IManagerRootService},
{"pl:u", Service::pl_IPlatformServiceManager} {"pl:u", Service::pl_IPlatformServiceManager},
{"aoc:u", Service::aocsrv_IAddOnContentManager} {"aoc:u", Service::aocsrv_IAddOnContentManager},
{"pctl", Service::pctl_IParentalControlServiceFactory},
{"pctl:a", Service::pctl_IParentalControlServiceFactory},
{"pctl:s", Service::pctl_IParentalControlServiceFactory},
{"pctl:r", Service::pctl_IParentalControlServiceFactory}
}; };
class ServiceManager; class ServiceManager;

View File

@ -0,0 +1,9 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include "IParentalControlServiceFactory.h"
namespace skyline::service::pctl {
IParentalControlServiceFactory::IParentalControlServiceFactory(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::pctl_IParentalControlServiceFactory, "pctl:IParentalControlServiceFactory", {
}) {}
}

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/base_service.h>
#include <services/serviceman.h>
namespace skyline::service::pctl {
/**
* @brief IParentalControlServiceFactory is used to open a parental controls instance (https://switchbrew.org/wiki/Parental_Control_services#pctl:s.2C_pctl:r.2C_pctl:a.2C_pctl)
*/
class IParentalControlServiceFactory : public BaseService {
public:
IParentalControlServiceFactory(const DeviceState &state, ServiceManager &manager);
};
}

View File

@ -18,6 +18,7 @@
#include "visrv/IManagerRootService.h" #include "visrv/IManagerRootService.h"
#include "pl/IPlatformServiceManager.h" #include "pl/IPlatformServiceManager.h"
#include "aocsrv/IAddOnContentManager.h" #include "aocsrv/IAddOnContentManager.h"
#include "pctl/IParentalControlServiceFactory.h"
#include "serviceman.h" #include "serviceman.h"
namespace skyline::service { namespace skyline::service {
@ -78,6 +79,9 @@ namespace skyline::service {
case Service::aocsrv_IAddOnContentManager: case Service::aocsrv_IAddOnContentManager:
serviceObj = std::make_shared<aocsrv::IAddOnContentManager>(state, *this); serviceObj = std::make_shared<aocsrv::IAddOnContentManager>(state, *this);
break; break;
case Service::pctl_IParentalControlServiceFactory:
serviceObj = std::make_shared<pctl::IParentalControlServiceFactory>(state, *this);
break;
default: default:
throw exception("CreateService called on missing object, type: {}", serviceType); throw exception("CreateService called on missing object, type: {}", serviceType);
} }