mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-27 16:15:30 +03:00
Add an empty account services implementation
This implements the base account service and stubs InitializeApplicationInfoV0 which is used by Puyo Puyo Tetris. Support for the entirety of account services will be added in the future.
This commit is contained in:
parent
3a343d3a48
commit
ff1c0e254f
@ -110,6 +110,7 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/pctl/IParentalControlServiceFactory.cpp
|
||||
${source_DIR}/skyline/services/lm/ILogService.cpp
|
||||
${source_DIR}/skyline/services/lm/ILogger.cpp
|
||||
${source_DIR}/skyline/services/account/IAccountServiceForApplication.cpp
|
||||
${source_DIR}/skyline/vfs/partition_filesystem.cpp
|
||||
${source_DIR}/skyline/vfs/rom_filesystem.cpp
|
||||
${source_DIR}/skyline/vfs/os_backing.cpp
|
||||
|
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IAccountServiceForApplication.h"
|
||||
|
||||
namespace skyline::service::account {
|
||||
IAccountServiceForApplication::IAccountServiceForApplication(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::account_IAccountServiceForApplication, "account:IAccountServiceForApplication", {
|
||||
{0x64, SFUNC(IAccountServiceForApplication::InitializeApplicationInfoV0)}
|
||||
}) {}
|
||||
|
||||
void IAccountServiceForApplication::InitializeApplicationInfoV0(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
// 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::account {
|
||||
/**
|
||||
* @brief IAccountServiceForApplication or acc:u0 provides functions for reading user information (https://switchbrew.org/wiki/Account_services#acc:u0)
|
||||
*/
|
||||
class IAccountServiceForApplication : public BaseService {
|
||||
public:
|
||||
IAccountServiceForApplication(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
/**
|
||||
* @brief This provides information about the running application for account services to use (https://switchbrew.org/wiki/Account_services#InitializeApplicationInfoV0)
|
||||
*/
|
||||
void InitializeApplicationInfoV0(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
};
|
||||
}
|
@ -66,7 +66,8 @@ namespace skyline::service {
|
||||
aocsrv_IAddOnContentManager,
|
||||
pctl_IParentalControlServiceFactory,
|
||||
lm_ILogService,
|
||||
lm_ILogger
|
||||
lm_ILogger,
|
||||
account_IAccountServiceForApplication,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -97,7 +98,8 @@ namespace skyline::service {
|
||||
{"pctl:a", Service::pctl_IParentalControlServiceFactory},
|
||||
{"pctl:s", Service::pctl_IParentalControlServiceFactory},
|
||||
{"pctl:r", Service::pctl_IParentalControlServiceFactory},
|
||||
{"lm", Service::lm_ILogService}
|
||||
{"lm", Service::lm_ILogService},
|
||||
{"acc:u0", Service::account_IAccountServiceForApplication},
|
||||
};
|
||||
|
||||
class ServiceManager;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "aocsrv/IAddOnContentManager.h"
|
||||
#include "pctl/IParentalControlServiceFactory.h"
|
||||
#include "lm/ILogService.h"
|
||||
#include "account/IAccountServiceForApplication.h"
|
||||
#include "serviceman.h"
|
||||
|
||||
namespace skyline::service {
|
||||
@ -86,6 +87,9 @@ namespace skyline::service {
|
||||
case Service::lm_ILogService:
|
||||
serviceObj = std::make_shared<lm::ILogService>(state, *this);
|
||||
break;
|
||||
case Service::account_IAccountServiceForApplication:
|
||||
serviceObj = std::make_shared<account::IAccountServiceForApplication>(state, *this);
|
||||
break;
|
||||
default:
|
||||
throw exception("CreateService called on missing object, type: {}", serviceType);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user