diff options
| author | bunnei <bunneidev@gmail.com> | 2018-01-24 23:09:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-24 23:09:03 -0500 |
| commit | 748c0de539674dc8ca4a5a8aadd2a61b0eabe652 (patch) | |
| tree | ae56efe8654d3aa3a5e75ec04bd9dfdcc06023a9 /src/core/hle/kernel/server_session.h | |
| parent | 44eb8402322a47a52f0401f9ef7473bea719e2bf (diff) | |
| parent | de177f66926a5170c1ad0621085494d27de8e2d4 (diff) | |
Merge pull request #137 from bunnei/improve-ipc
Improve IPC, unify Domains and Sessions, and add validation
Diffstat (limited to 'src/core/hle/kernel/server_session.h')
| -rw-r--r-- | src/core/hle/kernel/server_session.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 6ff4ef8c1..144692106 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -79,7 +79,10 @@ public: std::string name; ///< The name of this session (optional) std::shared_ptr<Session> parent; ///< The parent session, which links to the client endpoint. std::shared_ptr<SessionRequestHandler> - hle_handler; ///< This session's HLE request handler (optional) + hle_handler; ///< This session's HLE request handler (applicable when not a domain) + + /// This is the list of domain request handlers (after conversion to a domain) + std::vector<std::shared_ptr<SessionRequestHandler>> domain_request_handlers; /// List of threads that are pending a response after a sync request. This list is processed in /// a LIFO manner, thus, the last request will be dispatched first. @@ -91,6 +94,16 @@ public: /// TODO(Subv): Find a better name for this. SharedPtr<Thread> currently_handling; + /// Returns true if the session has been converted to a domain, otherwise False + bool IsDomain() const { + return !domain_request_handlers.empty(); + } + + /// Converts the session to a domain at the end of the current command + void ConvertToDomain() { + convert_to_domain = true; + } + private: ServerSession(); ~ServerSession() override; @@ -102,6 +115,9 @@ private: * @return The created server session */ static ResultVal<SharedPtr<ServerSession>> Create(std::string name = "Unknown"); + + /// When set to True, converts the session to a domain at the end of the command + bool convert_to_domain{}; }; /** |
