mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 04:07:57 -05:00
KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.
This commit is contained in:
@ -29,20 +29,8 @@ class ClientSession;
|
||||
* the request, the response is marshalled back to the caller's TLS buffer and control is
|
||||
* transferred back to it.
|
||||
*/
|
||||
class ServerSession : public WaitObject {
|
||||
class ServerSession final : public WaitObject {
|
||||
public:
|
||||
ServerSession();
|
||||
~ServerSession() override;
|
||||
|
||||
/**
|
||||
* Creates a server session. The server session can have an optional HLE handler,
|
||||
* which will be invoked to handle the IPC requests that this session receives.
|
||||
* @param name Optional name of the server session.
|
||||
* @param hle_handler Optional HLE handler for this server session.
|
||||
* @return The created server session
|
||||
*/
|
||||
static ResultVal<SharedPtr<ServerSession>> Create(std::string name = "Unknown", std::shared_ptr<Service::SessionRequestHandler> hle_handler = nullptr);
|
||||
|
||||
std::string GetTypeName() const override {
|
||||
return "ServerSession";
|
||||
}
|
||||
@ -61,10 +49,9 @@ public:
|
||||
|
||||
/**
|
||||
* Handle a sync request from the emulated application.
|
||||
* Only HLE services should override this function.
|
||||
* @returns ResultCode from the operation.
|
||||
*/
|
||||
virtual ResultCode HandleSyncRequest();
|
||||
ResultCode HandleSyncRequest();
|
||||
|
||||
bool ShouldWait() override;
|
||||
|
||||
@ -73,5 +60,18 @@ public:
|
||||
std::string name; ///< The name of this session (optional)
|
||||
bool signaled; ///< Whether there's new data available to this ServerSession
|
||||
std::shared_ptr<Service::SessionRequestHandler> hle_handler; ///< This session's HLE request handler (optional)
|
||||
|
||||
private:
|
||||
ServerSession();
|
||||
~ServerSession() override;
|
||||
|
||||
/**
|
||||
* Creates a server session. The server session can have an optional HLE handler,
|
||||
* which will be invoked to handle the IPC requests that this session receives.
|
||||
* @param name Optional name of the server session.
|
||||
* @param hle_handler Optional HLE handler for this server session.
|
||||
* @return The created server session
|
||||
*/
|
||||
static ResultVal<SharedPtr<ServerSession>> Create(std::string name = "Unknown", std::shared_ptr<Service::SessionRequestHandler> hle_handler = nullptr);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user