2018-01-13 16:22:39 -05:00
|
|
|
// Copyright 2018 yuzu emulator team
|
2017-01-04 23:23:17 -05:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-08-01 22:40:00 -04:00
|
|
|
#include "core/hle/kernel/object.h"
|
2017-01-04 23:23:17 -05:00
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
class ClientSession;
|
|
|
|
class ClientPort;
|
|
|
|
class ServerSession;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parent structure to link the client and server endpoints of a session with their associated
|
|
|
|
* client port. The client port need not exist, as is the case for portless sessions like the
|
|
|
|
* FS File and Directory sessions. When one of the endpoints of a session is destroyed, its
|
|
|
|
* corresponding field in this structure will be set to nullptr.
|
|
|
|
*/
|
|
|
|
class Session final {
|
|
|
|
public:
|
2019-11-25 18:17:08 -05:00
|
|
|
std::weak_ptr<ClientSession> client; ///< The client endpoint of the session.
|
|
|
|
std::weak_ptr<ServerSession> server; ///< The server endpoint of the session.
|
2019-11-24 20:15:51 -05:00
|
|
|
std::shared_ptr<ClientPort> port; ///< The port that this session is associated with (optional).
|
2017-01-04 23:23:17 -05:00
|
|
|
};
|
2018-01-20 02:48:02 -05:00
|
|
|
} // namespace Kernel
|