From 2e37ce01c9dcdc5932cf5fe47a1ade0e0d2b7cf8 Mon Sep 17 00:00:00 2001 From: B3n30 Date: Fri, 7 Jul 2017 21:34:15 +0200 Subject: Implement basic virtual Room support based on enet (#2803) * Added support for network with ENet lib, connecting is possible, but data can't be sent, yet. * fixup! Added support for network with ENet lib, * fixup! CLang * fixup! Added support for network with ENet lib, * fixup! Added support for network with ENet lib, * fixup! Clang format * More fixups! * Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Clang again * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes * fixup! Moved ENetHost* and ENetPeer* into pimpl classes --- src/network/network.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/network/network.h (limited to 'src/network/network.h') diff --git a/src/network/network.h b/src/network/network.h new file mode 100644 index 000000000..6d002d693 --- /dev/null +++ b/src/network/network.h @@ -0,0 +1,25 @@ +// Copyright 2017 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include "network/room.h" +#include "network/room_member.h" + +namespace Network { + +/// Initializes and registers the network device, the room, and the room member. +bool Init(); + +/// Returns a pointer to the room handle +std::weak_ptr GetRoom(); + +/// Returns a pointer to the room member handle +std::weak_ptr GetRoomMember(); + +/// Unregisters the network device, the room, and the room member and shut them down. +void Shutdown(); + +} // namespace Network -- cgit v1.2.3