Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession

This allows attaching a HLE handle to a ServerPort at any point after it
is created, allowing port/session creation to be generic between HLE and
regular services.
This commit is contained in:
Yuri Kunde Schlesner
2017-06-05 22:39:26 -07:00
parent 7e5dd46cf4
commit 6354d08359
11 changed files with 73 additions and 62 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <memory>
#include <vector>
#include "core/hle/kernel/kernel.h"
@ -16,7 +17,7 @@ class ServerSession;
* This can be provided to a ServerSession in order to hook into several relevant events
* (such as a new connection or a SyncRequest) so they can be implemented in the emulator.
*/
class SessionRequestHandler {
class SessionRequestHandler : public std::enable_shared_from_this<SessionRequestHandler> {
public:
/**
* Handles a sync request from the emulated application.