Skip to content
Snippets Groups Projects
Commit 05fee702 authored by Yuri Kunde Schlesner's avatar Yuri Kunde Schlesner
Browse files

Kernel: Add methods in HLERequestContext abstracting handle creation

parent 20e5abb3
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#include <boost/range/algorithm_ext/erase.hpp>
#include "common/assert.h"
#include "common/common_types.h"
#include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/server_session.h"
......@@ -23,4 +24,12 @@ void SessionRequestHandler::ClientDisconnected(SharedPtr<ServerSession> server_s
HLERequestContext::~HLERequestContext() = default;
SharedPtr<Object> HLERequestContext::GetIncomingHandle(Handle id_from_cmdbuf) const {
return Kernel::g_handle_table.GetGeneric(id_from_cmdbuf);
}
Handle HLERequestContext::AddOutgoingHandle(SharedPtr<Object> object) {
return Kernel::g_handle_table.Create(object).Unwrap();
}
} // namespace Kernel
......@@ -80,6 +80,9 @@ public:
return session;
}
SharedPtr<Object> GetIncomingHandle(Handle id_from_cmdbuf) const;
Handle AddOutgoingHandle(SharedPtr<Object> object);
private:
friend class Service::ServiceFrameworkBase;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment