diff options
| author | bunnei <bunneidev@gmail.com> | 2018-01-23 18:03:09 -0500 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2018-01-24 22:18:56 -0500 |
| commit | 27bad0598a3ddce0417388c3945368200150d413 (patch) | |
| tree | 8afc27be2a01d80cc592a698632b2fbcae71d8a5 /src/core/hle/kernel/server_session.h | |
| parent | 67758857e4203cebc9a5815c6b0293c0aad0e598 (diff) | |
hle: Integrate Domain handling into ServerSession.
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{}; }; /** |
