Add an empty aoc:u implementation

This is required by Puyo Puyo Tetris, it will be extended in the future
to allow using real DLC with the emulator.
This commit is contained in:
Billy Laws 2020-07-04 20:58:16 +01:00 committed by ◱ PixelyIon
parent 4a88adafb6
commit 23d6b596b2
5 changed files with 33 additions and 0 deletions

View File

@ -104,6 +104,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/visrv/IManagerRootService.cpp ${source_DIR}/skyline/services/visrv/IManagerRootService.cpp
${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/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

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

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::aocsrv {
/**
* @brief IAddOnContentManager or aoc:u is used by applications to access add-on content information (https://switchbrew.org/wiki/NS_Services#aoc:u)
*/
class IAddOnContentManager : public BaseService {
public:
IAddOnContentManager(const DeviceState &state, ServiceManager &manager);
};
}

View File

@ -61,6 +61,7 @@ namespace skyline::service {
visrv_IManagerDisplayService, visrv_IManagerDisplayService,
hosbinder_IHOSBinderDriver, hosbinder_IHOSBinderDriver,
pl_IPlatformServiceManager pl_IPlatformServiceManager
aocsrv_IAddOnContentManager,
}; };
/** /**
@ -86,6 +87,7 @@ namespace skyline::service {
{"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}
}; };
class ServiceManager; class ServiceManager;

View File

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