blob: 74eb42bf5c1150410186f84c3a848a98d776c477 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2017 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include "network/room.h"
#include "network/room_member.h"
namespace Network {
class RoomNetwork {
public:
RoomNetwork();
/// Initializes and registers the network device, the room, and the room member.
bool Init();
/// Returns a pointer to the room handle
std::weak_ptr<Room> GetRoom();
/// 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
|