summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_server_session.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_server_session.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/core/hle/kernel/k_server_session.h b/src/core/hle/kernel/k_server_session.h
index 27b757ad2..d44bc9d4f 100644
--- a/src/core/hle/kernel/k_server_session.h
+++ b/src/core/hle/kernel/k_server_session.h
@@ -32,6 +32,7 @@ class HLERequestContext;
class KernelCore;
class KSession;
class SessionRequestHandler;
+class SessionRequestManager;
class KThread;
class KServerSession final : public KSynchronizationObject,
@@ -46,7 +47,8 @@ public:
void Destroy() override;
- void Initialize(KSession* parent_, std::string&& name_);
+ void Initialize(KSession* parent_session_, std::string&& name_,
+ std::shared_ptr<SessionRequestManager> manager_);
KSession* GetParent() {
return parent;
@@ -60,15 +62,14 @@ public:
void OnClientClosed();
- /**
- * Sets the HLE handler for the session. This handler will be called to service IPC requests
- * instead of the regular IPC machinery. (The regular IPC machinery is currently not
- * implemented.)
- */
- void SetSessionHandler(SessionRequestHandlerPtr handler) {
+ void ClientConnected(SessionRequestHandlerPtr handler) {
manager->SetSessionHandler(std::move(handler));
}
+ void ClientDisconnected() {
+ manager = nullptr;
+ }
+
/**
* Handle a sync request from the emulated application.
*
@@ -104,16 +105,6 @@ public:
return manager;
}
- /// Gets the session request manager, which forwards requests to the underlying service
- const std::shared_ptr<SessionRequestManager>& GetSessionRequestManager() const {
- return manager;
- }
-
- /// Sets the session request manager, which forwards requests to the underlying service
- void SetSessionRequestManager(std::shared_ptr<SessionRequestManager> manager_) {
- manager = std::move(manager_);
- }
-
private:
/// Queues a sync request from the emulated application.
ResultCode QueueSyncRequest(KThread* thread, Core::Memory::Memory& memory);
@@ -131,9 +122,6 @@ private:
/// When set to True, converts the session to a domain at the end of the command
bool convert_to_domain{};
- /// Thread to dispatch service requests
- std::weak_ptr<ServiceThread> service_thread;
-
/// KSession that owns this KServerSession
KSession* parent{};
};