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