mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-07 08:28:28 +01:00
Stub some required calls
Co-authored-by: PabloG02 <tioo23000@gmail.com>
This commit is contained in:
parent
54041ceba1
commit
688dea647d
@ -376,6 +376,7 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/account/IAccountServiceForApplication.cpp
|
||||
${source_DIR}/skyline/services/account/IManagerForApplication.cpp
|
||||
${source_DIR}/skyline/services/account/IProfile.cpp
|
||||
${source_DIR}/skyline/services/account/IAsyncContext.cpp
|
||||
${source_DIR}/skyline/services/friends/IServiceCreator.cpp
|
||||
${source_DIR}/skyline/services/friends/IFriendService.cpp
|
||||
${source_DIR}/skyline/services/friends/INotificationService.cpp
|
||||
@ -400,6 +401,7 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/mii/IStaticService.cpp
|
||||
${source_DIR}/skyline/services/mii/IDatabaseService.cpp
|
||||
${source_DIR}/skyline/services/olsc/IOlscServiceForApplication.cpp
|
||||
${source_DIR}/skyline/services/ntc/IEnsureNetworkClockAvailabilityService.cpp
|
||||
)
|
||||
target_include_directories(skyline PRIVATE ${source_DIR}/skyline)
|
||||
# target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense
|
||||
|
31
app/src/main/cpp/skyline/services/account/IAsyncContext.cpp
Normal file
31
app/src/main/cpp/skyline/services/account/IAsyncContext.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IAsyncContext.h"
|
||||
|
||||
namespace skyline::service::account {
|
||||
IAsyncContext::IAsyncContext(const DeviceState &state, ServiceManager &manager) : BaseService{state, manager},
|
||||
systemEvent{std::make_shared<kernel::type::KEvent>(state, true)} {}
|
||||
|
||||
Result IAsyncContext::GetSystemEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
auto handle{state.process->InsertItem(systemEvent)};
|
||||
Logger::Debug("System Event Handle: 0x{:X}", handle);
|
||||
|
||||
response.copyHandles.push_back(handle);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IAsyncContext::Cancel(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
systemEvent->Signal();
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IAsyncContext::HasDone(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<u8>(1);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IAsyncContext::GetResult(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
}
|
34
app/src/main/cpp/skyline/services/account/IAsyncContext.h
Normal file
34
app/src/main/cpp/skyline/services/account/IAsyncContext.h
Normal file
@ -0,0 +1,34 @@
|
||||
// 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::account {
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/Account_services#IAsyncContext
|
||||
*/
|
||||
class IAsyncContext : public BaseService {
|
||||
private:
|
||||
std::shared_ptr<kernel::type::KEvent> systemEvent;
|
||||
|
||||
public:
|
||||
IAsyncContext(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
Result GetSystemEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result Cancel(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result HasDone(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result GetResult(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x0, IAsyncContext, GetSystemEvent),
|
||||
SFUNC(0x1, IAsyncContext, Cancel),
|
||||
SFUNC(0x2, IAsyncContext, HasDone),
|
||||
SFUNC(0x3, IAsyncContext, GetResult)
|
||||
)
|
||||
};
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "IManagerForApplication.h"
|
||||
#include "IAccountServiceForApplication.h"
|
||||
#include "IAsyncContext.h"
|
||||
|
||||
namespace skyline::service::account {
|
||||
IManagerForApplication::IManagerForApplication(const DeviceState &state, ServiceManager &manager, std::vector<UserId> &openedUsers) : BaseService(state, manager) {
|
||||
@ -19,6 +20,15 @@ namespace skyline::service::account {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IManagerForApplication::EnsureIdTokenCacheAsync(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IAsyncContext), session, response);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IManagerForApplication::LoadIdTokenCache(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IManagerForApplication::StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
openedUsers->clear();
|
||||
openedUsers->push_back(constant::DefaultUserId);
|
||||
|
@ -28,11 +28,17 @@ namespace skyline::service::account {
|
||||
*/
|
||||
Result GetAccountId(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result EnsureIdTokenCacheAsync(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result LoadIdTokenCache(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x0, IManagerForApplication, CheckAvailability),
|
||||
SFUNC(0x1, IManagerForApplication, GetAccountId),
|
||||
SFUNC(0x2, IManagerForApplication, EnsureIdTokenCacheAsync),
|
||||
SFUNC(0x3, IManagerForApplication, LoadIdTokenCache),
|
||||
SFUNC(0xA0, IManagerForApplication, StoreOpenContext)
|
||||
)
|
||||
};
|
||||
|
@ -11,7 +11,10 @@ namespace skyline::service::pctl {
|
||||
}
|
||||
|
||||
Result IParentalControlService::CheckFreeCommunicationPermission(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<u8>(0);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IParentalControlService::EndFreeCommunication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,14 @@ namespace skyline::service::pctl {
|
||||
|
||||
Result CheckFreeCommunicationPermission(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result EndFreeCommunication(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result IsFreeCommunicationAvailable(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x1, IParentalControlService, Initialize),
|
||||
SFUNC(0x3E9, IParentalControlService, CheckFreeCommunicationPermission),
|
||||
SFUNC(0x3F9, IParentalControlService, EndFreeCommunication),
|
||||
SFUNC(0x3FA, IParentalControlService, IsFreeCommunicationAvailable)
|
||||
)
|
||||
};
|
||||
|
@ -5,4 +5,8 @@
|
||||
|
||||
namespace skyline::service::socket {
|
||||
IManager::IManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result IManager::ResolveEx(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
@ -12,5 +12,11 @@ namespace skyline::service::socket {
|
||||
class IManager : public BaseService {
|
||||
public:
|
||||
IManager(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
Result ResolveEx(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x15, IManager, ResolveEx),
|
||||
)
|
||||
};
|
||||
}
|
||||
|
@ -17,4 +17,8 @@ namespace skyline::service::ssl {
|
||||
response.Push<u64>(0);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISslContext::RegisterInternalPki(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,14 @@ namespace skyline::service::ssl {
|
||||
*/
|
||||
Result ImportServerPki(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/SSL_services#RegisterInternalPki
|
||||
*/
|
||||
Result RegisterInternalPki(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x4, ISslContext, ImportServerPki)
|
||||
SFUNC(0x4, ISslContext, ImportServerPki),
|
||||
SFUNC(0x8, ISslContext, RegisterInternalPki)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user