mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-05 16:38:15 +01:00
Stub IAuthorizationRequest
This commit is contained in:
parent
688dea647d
commit
2097dbf9d9
@ -377,6 +377,7 @@ add_library(skyline SHARED
|
||||
${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/account/IAuthorizationRequest.cpp
|
||||
${source_DIR}/skyline/services/friends/IServiceCreator.cpp
|
||||
${source_DIR}/skyline/services/friends/IFriendService.cpp
|
||||
${source_DIR}/skyline/services/friends/INotificationService.cpp
|
||||
|
@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IAuthorizationRequest.h"
|
||||
#include "IAsyncContext.h"
|
||||
|
||||
namespace skyline::service::account {
|
||||
IAuthorizationRequest::IAuthorizationRequest(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result IAuthorizationRequest::InvokeWithoutInteractionAsync(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IAsyncContext), session, response);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IAuthorizationRequest::IsAuthorized(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<u8>(0);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IAuthorizationRequest::GetAuthorizationCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
// 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#IAuthorizationRequest
|
||||
*/
|
||||
class IAuthorizationRequest : public BaseService {
|
||||
public:
|
||||
IAuthorizationRequest(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
Result InvokeWithoutInteractionAsync(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result IsAuthorized(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result GetAuthorizationCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0xA, IAuthorizationRequest, InvokeWithoutInteractionAsync),
|
||||
SFUNC(0x13, IAuthorizationRequest, IsAuthorized),
|
||||
SFUNC(0x15, IAuthorizationRequest, GetAuthorizationCode)
|
||||
)
|
||||
};
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
#include "IManagerForApplication.h"
|
||||
#include "IAccountServiceForApplication.h"
|
||||
#include "IAsyncContext.h"
|
||||
#include "IAuthorizationRequest.h"
|
||||
|
||||
namespace skyline::service::account {
|
||||
IManagerForApplication::IManagerForApplication(const DeviceState &state, ServiceManager &manager, std::vector<UserId> &openedUsers) : BaseService(state, manager) {
|
||||
@ -29,6 +30,11 @@ namespace skyline::service::account {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IManagerForApplication::CreateAuthorizationRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IAuthorizationRequest), session, response);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IManagerForApplication::StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
openedUsers->clear();
|
||||
openedUsers->push_back(constant::DefaultUserId);
|
||||
|
@ -32,6 +32,8 @@ namespace skyline::service::account {
|
||||
|
||||
Result LoadIdTokenCache(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result CreateAuthorizationRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result StoreOpenContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
@ -39,6 +41,7 @@ namespace skyline::service::account {
|
||||
SFUNC(0x1, IManagerForApplication, GetAccountId),
|
||||
SFUNC(0x2, IManagerForApplication, EnsureIdTokenCacheAsync),
|
||||
SFUNC(0x3, IManagerForApplication, LoadIdTokenCache),
|
||||
SFUNC(0x96, IManagerForApplication, CreateAuthorizationRequest),
|
||||
SFUNC(0xA0, IManagerForApplication, StoreOpenContext)
|
||||
)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user