client_session.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2016 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <memory>
  6. #include <string>
  7. #include "common/common_types.h"
  8. #include "core/hle/kernel/object.h"
  9. #include "core/hle/result.h"
  10. namespace Kernel {
  11. class KernelCore;
  12. class Session;
  13. class ServerSession;
  14. class Thread;
  15. class ClientSession final : public Object {
  16. public:
  17. friend class ServerSession;
  18. std::string GetTypeName() const override {
  19. return "ClientSession";
  20. }
  21. std::string GetName() const override {
  22. return name;
  23. }
  24. static const HandleType HANDLE_TYPE = HandleType::ClientSession;
  25. HandleType GetHandleType() const override {
  26. return HANDLE_TYPE;
  27. }
  28. ResultCode SendSyncRequest(SharedPtr<Thread> thread);
  29. std::string name; ///< Name of client port (optional)
  30. /// The parent session, which links to the server endpoint.
  31. std::shared_ptr<Session> parent;
  32. private:
  33. explicit ClientSession(KernelCore& kernel);
  34. ~ClientSession() override;
  35. };
  36. } // namespace Kernel