2016-06-14 23:03:30 +00: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 18:39:26 +00:00
|
|
|
#include <memory>
|
2016-12-14 17:33:49 +00:00
|
|
|
#include <string>
|
2018-08-02 02:40:00 +00:00
|
|
|
#include "core/hle/kernel/object.h"
|
2018-12-31 23:09:41 +00:00
|
|
|
|
|
|
|
union ResultCode;
|
2016-06-14 23:03:30 +00:00
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
2018-08-28 16:30:33 +00:00
|
|
|
class KernelCore;
|
2017-01-05 04:23:17 +00:00
|
|
|
class Session;
|
2018-08-28 16:30:33 +00:00
|
|
|
class ServerSession;
|
2017-06-29 17:30:34 +00:00
|
|
|
class Thread;
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2018-01-23 21:13:19 +00:00
|
|
|
class ClientSession final : public Object {
|
2016-06-14 23:03:30 +00:00
|
|
|
public:
|
2019-11-25 01:15:51 +00:00
|
|
|
explicit ClientSession(KernelCore& kernel);
|
|
|
|
~ClientSession() override;
|
|
|
|
|
2016-12-05 16:02:08 +00:00
|
|
|
friend class ServerSession;
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2016-12-01 04:28:31 +00:00
|
|
|
std::string GetTypeName() const override {
|
|
|
|
return "ClientSession";
|
|
|
|
}
|
2016-12-05 16:02:08 +00:00
|
|
|
|
2016-12-01 04:28:31 +00:00
|
|
|
std::string GetName() const override {
|
|
|
|
return name;
|
|
|
|
}
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2019-04-11 20:30:52 +00:00
|
|
|
static constexpr HandleType HANDLE_TYPE = HandleType::ClientSession;
|
2016-12-01 04:28:31 +00:00
|
|
|
HandleType GetHandleType() const override {
|
|
|
|
return HANDLE_TYPE;
|
|
|
|
}
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2019-11-25 01:15:51 +00:00
|
|
|
ResultCode SendSyncRequest(Thread* thread);
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2019-03-05 23:24:00 +00:00
|
|
|
private:
|
2017-01-05 04:23:17 +00:00
|
|
|
/// The parent session, which links to the server endpoint.
|
|
|
|
std::shared_ptr<Session> parent;
|
2016-06-14 23:03:30 +00:00
|
|
|
|
2019-03-05 23:24:00 +00:00
|
|
|
/// Name of the client session (optional)
|
|
|
|
std::string name;
|
2016-06-14 23:03:30 +00:00
|
|
|
};
|
|
|
|
|
2018-01-20 07:48:02 +00:00
|
|
|
} // namespace Kernel
|