2016-06-15 01:03:30 +02:00
|
|
|
// Copyright 2016 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-06-18 20:39:26 +02:00
|
|
|
#include <memory>
|
2016-12-14 18:33:49 +01:00
|
|
|
#include <string>
|
2018-08-02 04:40:00 +02:00
|
|
|
#include "core/hle/kernel/object.h"
|
2019-01-01 00:09:41 +01:00
|
|
|
|
|
|
|
union ResultCode;
|
2016-06-15 01:03:30 +02:00
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
2018-08-28 18:30:33 +02:00
|
|
|
class KernelCore;
|
2017-01-05 05:23:17 +01:00
|
|
|
class Session;
|
2018-08-28 18:30:33 +02:00
|
|
|
class ServerSession;
|
2017-06-29 19:30:34 +02:00
|
|
|
class Thread;
|
2016-06-15 01:03:30 +02:00
|
|
|
|
2018-01-23 22:13:19 +01:00
|
|
|
class ClientSession final : public Object {
|
2016-06-15 01:03:30 +02:00
|
|
|
public:
|
2016-12-05 17:02:08 +01:00
|
|
|
friend class ServerSession;
|
2016-06-15 01:03:30 +02:00
|
|
|
|
2016-12-01 05:28:31 +01:00
|
|
|
std::string GetTypeName() const override {
|
|
|
|
return "ClientSession";
|
|
|
|
}
|
2016-12-05 17:02:08 +01:00
|
|
|
|
2016-12-01 05:28:31 +01:00
|
|
|
std::string GetName() const override {
|
|
|
|
return name;
|
|
|
|
}
|
2016-06-15 01:03:30 +02:00
|
|
|
|
|
|
|
static const HandleType HANDLE_TYPE = HandleType::ClientSession;
|
2016-12-01 05:28:31 +01:00
|
|
|
HandleType GetHandleType() const override {
|
|
|
|
return HANDLE_TYPE;
|
|
|
|
}
|
2016-06-15 01:03:30 +02:00
|
|
|
|
2018-01-24 00:03:09 +01:00
|
|
|
ResultCode SendSyncRequest(SharedPtr<Thread> thread);
|
2016-06-15 01:03:30 +02:00
|
|
|
|
2019-03-06 00:24:00 +01:00
|
|
|
private:
|
|
|
|
explicit ClientSession(KernelCore& kernel);
|
|
|
|
~ClientSession() override;
|
2017-01-05 05:23:17 +01:00
|
|
|
|
|
|
|
/// The parent session, which links to the server endpoint.
|
|
|
|
std::shared_ptr<Session> parent;
|
2016-06-15 01:03:30 +02:00
|
|
|
|
2019-03-06 00:24:00 +01:00
|
|
|
/// Name of the client session (optional)
|
|
|
|
std::string name;
|
2016-06-15 01:03:30 +02:00
|
|
|
};
|
|
|
|
|
2018-01-20 08:48:02 +01:00
|
|
|
} // namespace Kernel
|