From 0dfafdbe593581e013e0515cc329a48e6aca0a42 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 18 Jun 2017 16:05:12 -0700 Subject: Kernel/IPC: Make HLERequestContext usable from outside kernel --- src/core/hle/kernel/hle_ipc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel/hle_ipc.h') diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index cbb109d8f..35795fc1d 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -84,6 +84,7 @@ protected: */ class HLERequestContext { public: + HLERequestContext(SharedPtr session); ~HLERequestContext(); /// Returns a pointer to the IPC command buffer for this request. @@ -118,14 +119,14 @@ public: */ void ClearIncomingObjects(); -private: - friend class Service::ServiceFrameworkBase; - + /// Populates this context with data from the requesting process/thread. ResultCode PopulateFromIncomingCommandBuffer(const u32_le* src_cmdbuf, Process& src_process, HandleTable& src_table); + /// Writes data from this context back to the requesting process/thread. ResultCode WriteToOutgoingCommandBuffer(u32_le* dst_cmdbuf, Process& dst_process, HandleTable& dst_table) const; +private: std::array cmd_buf; SharedPtr session; // TODO(yuriks): Check common usage of this and optimize size accordingly -- cgit v1.2.3