summaryrefslogtreecommitdiff
path: root/src/network/network.h
diff options
context:
space:
mode:
authorGravatar B3n302017-07-07 21:34:15 +0200
committerGravatar bunnei2017-07-07 15:34:15 -0400
commit2e37ce01c9dcdc5932cf5fe47a1ade0e0d2b7cf8 (patch)
treeb5298b3c528d9acc1f3fa48f19c9f9c19c97d036 /src/network/network.h
parentMerge pull request #2814 from Kloen/macro-remove (diff)
downloadyuzu-2e37ce01c9dcdc5932cf5fe47a1ade0e0d2b7cf8.tar.gz
yuzu-2e37ce01c9dcdc5932cf5fe47a1ade0e0d2b7cf8.tar.xz
yuzu-2e37ce01c9dcdc5932cf5fe47a1ade0e0d2b7cf8.zip
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
Diffstat (limited to 'src/network/network.h')
-rw-r--r--src/network/network.h25
1 files changed, 25 insertions, 0 deletions
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 @@
1// Copyright 2017 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <memory>
8#include "network/room.h"
9#include "network/room_member.h"
10
11namespace Network {
12
13/// Initializes and registers the network device, the room, and the room member.
14bool Init();
15
16/// Returns a pointer to the room handle
17std::weak_ptr<Room> GetRoom();
18
19/// Returns a pointer to the room member handle
20std::weak_ptr<RoomMember> GetRoomMember();
21
22/// Unregisters the network device, the room, and the room member and shut them down.
23void Shutdown();
24
25} // namespace Network