Stub some services

This commit is contained in:
Dima 2023-03-22 10:46:38 +03:00 committed by Billy Laws
parent 5c83dec85f
commit 6aef7fdd1e
12 changed files with 103 additions and 2 deletions

View File

@ -344,6 +344,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/fssrv/IFile.cpp ${source_DIR}/skyline/services/fssrv/IFile.cpp
${source_DIR}/skyline/services/fssrv/IStorage.cpp ${source_DIR}/skyline/services/fssrv/IStorage.cpp
${source_DIR}/skyline/services/fssrv/IDirectory.cpp ${source_DIR}/skyline/services/fssrv/IDirectory.cpp
${source_DIR}/skyline/services/fssrv/IMultiCommitManager.cpp
${source_DIR}/skyline/services/nvdrv/INvDrvServices.cpp ${source_DIR}/skyline/services/nvdrv/INvDrvServices.cpp
${source_DIR}/skyline/services/nvdrv/driver.cpp ${source_DIR}/skyline/services/nvdrv/driver.cpp
${source_DIR}/skyline/services/nvdrv/core/nvmap.cpp ${source_DIR}/skyline/services/nvdrv/core/nvmap.cpp
@ -398,6 +399,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/mmnv/IRequest.cpp ${source_DIR}/skyline/services/mmnv/IRequest.cpp
${source_DIR}/skyline/services/mii/IStaticService.cpp ${source_DIR}/skyline/services/mii/IStaticService.cpp
${source_DIR}/skyline/services/mii/IDatabaseService.cpp ${source_DIR}/skyline/services/mii/IDatabaseService.cpp
${source_DIR}/skyline/services/olsc/IOlscServiceForApplication.cpp
) )
target_include_directories(skyline PRIVATE ${source_DIR}/skyline) target_include_directories(skyline PRIVATE ${source_DIR}/skyline)
# target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense # target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense

View File

@ -20,4 +20,8 @@ namespace skyline::service::aocsrv {
response.copyHandles.push_back(handle); response.copyHandles.push_back(handle);
return {}; return {};
} }
Result IPurchaseEventManager::PopPurchasedProductInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
} }

View File

@ -21,9 +21,12 @@ namespace skyline::service::aocsrv {
Result GetPurchasedEventReadableHandle(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result GetPurchasedEventReadableHandle(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result PopPurchasedProductInfo(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL( SERVICE_DECL(
SFUNC(0x0, IPurchaseEventManager, SetDefaultDeliveryTarget), SFUNC(0x0, IPurchaseEventManager, SetDefaultDeliveryTarget),
SFUNC(0x2, IPurchaseEventManager, GetPurchasedEventReadableHandle) SFUNC(0x2, IPurchaseEventManager, GetPurchasedEventReadableHandle),
SFUNC(0x3, IPurchaseEventManager, PopPurchasedProductInfo)
) )
}; };
} }

View File

@ -6,6 +6,7 @@
#include <loader/loader.h> #include <loader/loader.h>
#include "results.h" #include "results.h"
#include "IStorage.h" #include "IStorage.h"
#include "IMultiCommitManager.h"
#include "IFileSystemProxy.h" #include "IFileSystemProxy.h"
namespace skyline::service::fssrv { namespace skyline::service::fssrv {
@ -100,4 +101,9 @@ namespace skyline::service::fssrv {
response.Push<u32>(0); response.Push<u32>(0);
return {}; return {};
} }
Result IFileSystemProxy::OpenMultiCommitManager(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
manager.RegisterService(SRVREG(IMultiCommitManager), session, response);
return {};
}
} }

View File

@ -109,6 +109,11 @@ namespace skyline::service::fssrv {
*/ */
Result GetGlobalAccessLogMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result GetGlobalAccessLogMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @url https://switchbrew.org/wiki/Filesystem_services#OpenMultiCommitManager
*/
Result OpenMultiCommitManager(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL( SERVICE_DECL(
SFUNC(0x1, IFileSystemProxy, SetCurrentProcess), SFUNC(0x1, IFileSystemProxy, SetCurrentProcess),
SFUNC(0x12, IFileSystemProxy, OpenSdCardFileSystem), SFUNC(0x12, IFileSystemProxy, OpenSdCardFileSystem),
@ -118,7 +123,8 @@ namespace skyline::service::fssrv {
SFUNC(0xC8, IFileSystemProxy, OpenDataStorageByCurrentProcess), SFUNC(0xC8, IFileSystemProxy, OpenDataStorageByCurrentProcess),
SFUNC(0xCA, IFileSystemProxy, OpenDataStorageByDataId), SFUNC(0xCA, IFileSystemProxy, OpenDataStorageByDataId),
SFUNC(0xCB, IFileSystemProxy, OpenPatchDataStorageByCurrentProcess), SFUNC(0xCB, IFileSystemProxy, OpenPatchDataStorageByCurrentProcess),
SFUNC(0x3ED, IFileSystemProxy, GetGlobalAccessLogMode) SFUNC(0x3ED, IFileSystemProxy, GetGlobalAccessLogMode),
SFUNC(0x4B0, IFileSystemProxy, OpenMultiCommitManager)
) )
}; };
} }

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include "IMultiCommitManager.h"
namespace skyline::service::fssrv {
IMultiCommitManager::IMultiCommitManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
Result IMultiCommitManager::Add(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
Result IMultiCommitManager::Commit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
}

View File

@ -0,0 +1,31 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/serviceman.h>
namespace skyline::service::fssrv {
/**
* @url https://switchbrew.org/wiki/Filesystem_services#IMultiCommitManager
*/
class IMultiCommitManager : public BaseService {
public:
IMultiCommitManager(const DeviceState &state, ServiceManager &manager);
/**
* @url https://switchbrew.org/wiki/Filesystem_services#Add
*/
Result Add(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @url https://switchbrew.org/wiki/Filesystem_services#Commit
*/
Result Commit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x1, IMultiCommitManager, Add),
SFUNC(0x2, IMultiCommitManager, Commit)
)
};
}

View File

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

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/serviceman.h>
namespace skyline::service::olsc {
/**
* @url https://switchbrew.org/wiki/OLSC_services#olsc:u
*/
class IOlscServiceForApplication : public BaseService {
public:
IOlscServiceForApplication(const DeviceState &state, ServiceManager &manager);
};
}

View File

@ -14,6 +14,10 @@ namespace skyline::service::prepo {
return {}; return {};
} }
Result IPrepoService::SaveReport (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {};
}
Result IPrepoService::SaveReportWithUser(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { Result IPrepoService::SaveReportWithUser(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
return {}; return {};
} }

View File

@ -21,6 +21,8 @@ namespace skyline::service::prepo {
Result SaveReportWithUserOld2 (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result SaveReportWithUserOld2 (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result SaveReport (type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result SaveReportWithUser(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result SaveReportWithUser(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result RequestImmediateTransmission(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result RequestImmediateTransmission(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
@ -28,6 +30,7 @@ namespace skyline::service::prepo {
SERVICE_DECL( SERVICE_DECL(
SFUNC(0x2775, IPrepoService, SaveReportWithUserOld), SFUNC(0x2775, IPrepoService, SaveReportWithUserOld),
SFUNC(0x2777, IPrepoService, SaveReportWithUserOld2), SFUNC(0x2777, IPrepoService, SaveReportWithUserOld2),
SFUNC(0x2778, IPrepoService, SaveReport),
SFUNC(0x2779, IPrepoService, SaveReportWithUser), SFUNC(0x2779, IPrepoService, SaveReportWithUser),
SFUNC(0x27D8, IPrepoService, RequestImmediateTransmission) SFUNC(0x27D8, IPrepoService, RequestImmediateTransmission)
) )

View File

@ -56,6 +56,7 @@
#include "capsrv/IScreenShotApplicationService.h" #include "capsrv/IScreenShotApplicationService.h"
#include "ro/IRoInterface.h" #include "ro/IRoInterface.h"
#include "mii/IStaticService.h" #include "mii/IStaticService.h"
#include "olsc/IOlscServiceForApplication.h"
#include "serviceman.h" #include "serviceman.h"
#define SERVICE_CASE(class, name, ...) \ #define SERVICE_CASE(class, name, ...) \
@ -142,6 +143,7 @@ namespace skyline::service {
SERVICE_CASE(ro::IRoInterface, "ldr:ro") SERVICE_CASE(ro::IRoInterface, "ldr:ro")
SERVICE_CASE(mii::IStaticService, "mii:e") SERVICE_CASE(mii::IStaticService, "mii:e")
SERVICE_CASE(mii::IStaticService, "mii:u") SERVICE_CASE(mii::IStaticService, "mii:u")
SERVICE_CASE(olsc::IOlscServiceForApplication, "olsc:u")
default: default:
std::string_view nameString(span(reinterpret_cast<char *>(&name), sizeof(name)).as_string(true)); std::string_view nameString(span(reinterpret_cast<char *>(&name), sizeof(name)).as_string(true));
throw std::out_of_range(fmt::format("CreateService called with an unknown service name: {}", nameString)); throw std::out_of_range(fmt::format("CreateService called with an unknown service name: {}", nameString));