diff options
author | FearlessTobi <thm.frey@gmail.com> | 2022-07-22 16:31:13 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-07-25 21:59:31 +0200 |
commit | 7d82e57b91dee30e0fe6fed36550ea7cc9eb778e (patch) | |
tree | 4a58f4874083783026dabc0de6a7fb09195cf95b /src/network/network.h | |
parent | common: multiplayer: Use GameInfo type (diff) | |
download | yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar.gz yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar.bz2 yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar.lz yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar.xz yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.tar.zst yuzu-7d82e57b91dee30e0fe6fed36550ea7cc9eb778e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/network/network.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/network/network.h b/src/network/network.h index 6d002d693..74eb42bf5 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -10,16 +10,25 @@ namespace Network { -/// Initializes and registers the network device, the room, and the room member. -bool Init(); +class RoomNetwork { +public: + RoomNetwork(); -/// Returns a pointer to the room handle -std::weak_ptr<Room> GetRoom(); + /// Initializes and registers the network device, the room, and the room member. + bool Init(); -/// Returns a pointer to the room member handle -std::weak_ptr<RoomMember> GetRoomMember(); + /// Returns a pointer to the room handle + std::weak_ptr<Room> GetRoom(); -/// Unregisters the network device, the room, and the room member and shut them down. -void Shutdown(); + /// Returns a pointer to the room member handle + std::weak_ptr<RoomMember> GetRoomMember(); + + /// Unregisters the network device, the room, and the room member and shut them down. + void Shutdown(); + +private: + std::shared_ptr<RoomMember> g_room_member; ///< RoomMember (Client) for network games + std::shared_ptr<Room> g_room; ///< Room (Server) for network games +}; } // namespace Network |