mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-27 05:34:22 +01:00
service: Fix all incorrect IPC response headers.
This commit is contained in:
parent
f0035420d7
commit
f9dae99006
@ -54,7 +54,7 @@ void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
|
void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IProfile>();
|
rb.PushIpcInterface<IProfile>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
@ -67,7 +67,7 @@ void ACC_U0::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ACC_U0::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
|
void ACC_U0::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IManagerForApplication>();
|
rb.PushIpcInterface<IManagerForApplication>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
|
@ -291,7 +291,7 @@ private:
|
|||||||
std::vector<u8> buffer;
|
std::vector<u8> buffer;
|
||||||
|
|
||||||
void Open(Kernel::HLERequestContext& ctx) {
|
void Open(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<AM::IStorageAccessor>(buffer);
|
rb.PushIpcInterface<AM::IStorageAccessor>(buffer);
|
||||||
@ -328,7 +328,7 @@ private:
|
|||||||
|
|
||||||
std::vector<u8> buffer(data, data + sizeof(data));
|
std::vector<u8> buffer(data, data + sizeof(data));
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<AM::IStorage>(buffer);
|
rb.PushIpcInterface<AM::IStorage>(buffer);
|
||||||
@ -402,56 +402,56 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void GetAudioController(Kernel::HLERequestContext& ctx) {
|
void GetAudioController(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IAudioController>();
|
rb.PushIpcInterface<IAudioController>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDisplayController(Kernel::HLERequestContext& ctx) {
|
void GetDisplayController(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IDisplayController>();
|
rb.PushIpcInterface<IDisplayController>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
|
void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IDebugFunctions>();
|
rb.PushIpcInterface<IDebugFunctions>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowController(Kernel::HLERequestContext& ctx) {
|
void GetWindowController(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IWindowController>();
|
rb.PushIpcInterface<IWindowController>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetSelfController(Kernel::HLERequestContext& ctx) {
|
void GetSelfController(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ISelfController>(nvflinger);
|
rb.PushIpcInterface<ISelfController>(nvflinger);
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
|
void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ICommonStateGetter>();
|
rb.PushIpcInterface<ICommonStateGetter>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
|
void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ILibraryAppletCreator>();
|
rb.PushIpcInterface<ILibraryAppletCreator>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
|
void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IApplicationFunctions>();
|
rb.PushIpcInterface<IApplicationFunctions>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
@ -461,7 +461,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
|
void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IApplicationProxy>(nvflinger);
|
rb.PushIpcInterface<IApplicationProxy>(nvflinger);
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
|
@ -58,7 +58,7 @@ APM::APM() : ServiceFramework("apm") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
void APM::OpenSession(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ISession>();
|
rb.PushIpcInterface<ISession>();
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
|
|||||||
|
|
||||||
Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size());
|
Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size());
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0, 0, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(3, 0, 0);
|
||||||
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
// TODO(st4rk): we're currently returning only one audio interface
|
// TODO(st4rk): we're currently returning only one audio interface
|
||||||
|
@ -98,7 +98,7 @@ void FSP_SRV::Initalize(Kernel::HLERequestContext& ctx) {
|
|||||||
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_FS, "(STUBBED) called");
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 4};
|
IPC::RequestBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.Push<u32>(5);
|
rb.Push<u32>(5);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IStorage>(std::move(storage.Unwrap()));
|
rb.PushIpcInterface<IStorage>(std::move(storage.Unwrap()));
|
||||||
}
|
}
|
||||||
|
@ -169,19 +169,10 @@ private:
|
|||||||
applet_resource = std::make_shared<IAppletResource>();
|
applet_resource = std::make_shared<IAppletResource>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(Subv): Verify if this should return the interface as a domain object when called
|
|
||||||
// from within a domain.
|
|
||||||
|
|
||||||
auto sessions = Kernel::ServerSession::CreateSessionPair(applet_resource->GetServiceName());
|
|
||||||
auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
|
||||||
auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
|
||||||
applet_resource->ClientConnected(server);
|
|
||||||
|
|
||||||
LOG_DEBUG(Service, "called, initialized IAppletResource -> session=%u",
|
|
||||||
client->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMoveObjects(std::move(client));
|
rb.PushIpcInterface<IAppletResource>(applet_resource);
|
||||||
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
void Log(Kernel::HLERequestContext& ctx) {
|
void Log(Kernel::HLERequestContext& ctx) {
|
||||||
// This function only succeeds - Get that out of the way
|
// This function only succeeds - Get that out of the way
|
||||||
IPC::RequestBuilder rb{ctx, 1};
|
IPC::RequestBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
|
||||||
// Read MessageHeader, despite not doing anything with it right now
|
// Read MessageHeader, despite not doing anything with it right now
|
||||||
@ -130,7 +130,7 @@ private:
|
|||||||
}
|
}
|
||||||
output += message;
|
output += message;
|
||||||
|
|
||||||
LOG_DEBUG(Debug_Emulated, "%s", output.c_str());
|
LOG_INFO(Debug_Emulated, "%s", output.c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,21 +146,11 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
|
|||||||
* 0: ResultCode
|
* 0: ResultCode
|
||||||
*/
|
*/
|
||||||
void LM::Initialize(Kernel::HLERequestContext& ctx) {
|
void LM::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO(Subv): Verify if this should return the interface as a domain object when called from
|
|
||||||
// within a domain.
|
|
||||||
|
|
||||||
auto logger = std::make_shared<Logger>();
|
|
||||||
auto sessions = Kernel::ServerSession::CreateSessionPair(logger->GetServiceName());
|
|
||||||
auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
|
||||||
auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
|
||||||
logger->ClientConnected(server);
|
|
||||||
|
|
||||||
LOG_DEBUG(Service_SM, "called, initialized logger -> session=%u", client->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMoveObjects(std::move(client));
|
rb.PushIpcInterface<Logger>();
|
||||||
|
|
||||||
LOG_INFO(Service_SM, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
LM::LM() : ServiceFramework("lm") {
|
LM::LM() : ServiceFramework("lm") {
|
||||||
|
@ -15,7 +15,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void PCTL_A::GetService(Kernel::HLERequestContext& ctx) {
|
void PCTL_A::GetService(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IParentalControlService>();
|
rb.PushIpcInterface<IParentalControlService>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
|
@ -132,7 +132,7 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {
|
|||||||
ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) {
|
ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) {
|
||||||
switch (context.GetCommandType()) {
|
switch (context.GetCommandType()) {
|
||||||
case IPC::CommandType::Close: {
|
case IPC::CommandType::Close: {
|
||||||
IPC::RequestBuilder rb{context, 1};
|
IPC::RequestBuilder rb{context, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
|
return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,8 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
|
void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1, true};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
// TODO(Subv): Check if this is correct
|
|
||||||
rb.PushMoveObjects(ctx.Session());
|
rb.PushMoveObjects(ctx.Session());
|
||||||
|
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
|
@ -83,7 +83,7 @@ std::shared_ptr<ServiceManager> g_service_manager;
|
|||||||
* 0: ResultCode
|
* 0: ResultCode
|
||||||
*/
|
*/
|
||||||
void SM::Initialize(Kernel::HLERequestContext& ctx) {
|
void SM::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 1};
|
IPC::RequestBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
LOG_DEBUG(Service_SM, "called");
|
LOG_DEBUG(Service_SM, "called");
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
|
|||||||
|
|
||||||
auto client_port = service_manager->GetServicePort(name);
|
auto client_port = service_manager->GetServicePort(name);
|
||||||
if (client_port.Failed()) {
|
if (client_port.Failed()) {
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0);
|
||||||
rb.Push(client_port.Code());
|
rb.Push(client_port.Code());
|
||||||
LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(),
|
LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(),
|
||||||
client_port.Code().raw);
|
client_port.Code().raw);
|
||||||
@ -112,7 +112,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
|
|||||||
if (session.Succeeded()) {
|
if (session.Succeeded()) {
|
||||||
LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(),
|
LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(),
|
||||||
(*session)->GetObjectId());
|
(*session)->GetObjectId());
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1, true);
|
||||||
rb.Push(session.Code());
|
rb.Push(session.Code());
|
||||||
rb.PushMoveObjects(std::move(session).Unwrap());
|
rb.PushMoveObjects(std::move(session).Unwrap());
|
||||||
}
|
}
|
||||||
|
@ -83,49 +83,28 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO(Subv): Verify if this should return the interface as a domain object when called from
|
|
||||||
// within a domain.
|
|
||||||
auto system_clock = std::make_shared<ISystemClock>();
|
|
||||||
auto sessions = Kernel::ServerSession::CreateSessionPair(system_clock->GetServiceName());
|
|
||||||
auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
|
||||||
auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
|
||||||
system_clock->ClientConnected(server);
|
|
||||||
LOG_DEBUG(Service, "called, initialized ISystemClock -> session=%u", client->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMoveObjects(std::move(client));
|
rb.PushIpcInterface<ISystemClock>();
|
||||||
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO(Subv): Verify if this should return the interface as a domain object when called from
|
|
||||||
// within a domain.
|
|
||||||
auto system_clock = std::make_shared<ISystemClock>();
|
|
||||||
auto sessions = Kernel::ServerSession::CreateSessionPair(system_clock->GetServiceName());
|
|
||||||
auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
|
||||||
auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
|
||||||
system_clock->ClientConnected(server);
|
|
||||||
LOG_DEBUG(Service, "called, initialized ISystemClock -> session=%u", client->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMoveObjects(std::move(client));
|
rb.PushIpcInterface<ISystemClock>();
|
||||||
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) {
|
||||||
// TODO(Subv): Verify if this should return the interface as a domain object when called from
|
|
||||||
// within a domain.
|
|
||||||
auto steady_clock = std::make_shared<ISteadyClock>();
|
|
||||||
auto sessions = Kernel::ServerSession::CreateSessionPair(steady_clock->GetServiceName());
|
|
||||||
auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
|
|
||||||
auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
|
|
||||||
steady_clock->ClientConnected(server);
|
|
||||||
LOG_DEBUG(Service, "called, initialized ISteadyClock -> session=%u", client->GetObjectId());
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushMoveObjects(std::move(client));
|
rb.PushIpcInterface<ISteadyClock>();
|
||||||
|
LOG_DEBUG(Service, "called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ITimeZoneService>();
|
rb.PushIpcInterface<ITimeZoneService>();
|
||||||
LOG_DEBUG(Service, "called");
|
LOG_DEBUG(Service, "called");
|
||||||
|
@ -597,7 +597,7 @@ private:
|
|||||||
void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx) {
|
void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
|
rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx)
|
|||||||
void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestContext& ctx) {
|
void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<ISystemDisplayService>();
|
rb.PushIpcInterface<ISystemDisplayService>();
|
||||||
}
|
}
|
||||||
@ -613,7 +613,7 @@ void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestConte
|
|||||||
void IApplicationDisplayService::GetManagerDisplayService(Kernel::HLERequestContext& ctx) {
|
void IApplicationDisplayService::GetManagerDisplayService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IManagerDisplayService>(nv_flinger);
|
rb.PushIpcInterface<IManagerDisplayService>(nv_flinger);
|
||||||
}
|
}
|
||||||
@ -622,7 +622,7 @@ void IApplicationDisplayService::GetIndirectDisplayTransactionService(
|
|||||||
Kernel::HLERequestContext& ctx) {
|
Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
|
rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,8 @@ namespace VI {
|
|||||||
void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) {
|
void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service, "(STUBBED) called");
|
LOG_WARNING(Service, "(STUBBED) called");
|
||||||
|
|
||||||
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
|
IPC::RequestBuilder rb{ctx, 2, 0, 1};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
|
rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user