session.h 923 B

123456789101112131415161718192021222324252627
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "core/hle/kernel/object.h"
  6. namespace Kernel {
  7. class ClientSession;
  8. class ClientPort;
  9. class ServerSession;
  10. /**
  11. * Parent structure to link the client and server endpoints of a session with their associated
  12. * client port. The client port need not exist, as is the case for portless sessions like the
  13. * FS File and Directory sessions. When one of the endpoints of a session is destroyed, its
  14. * corresponding field in this structure will be set to nullptr.
  15. */
  16. class Session final {
  17. public:
  18. ClientSession* client = nullptr; ///< The client endpoint of the session.
  19. ServerSession* server = nullptr; ///< The server endpoint of the session.
  20. SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional).
  21. };
  22. } // namespace Kernel