From ebf9a784a9f7f4148a669dbb39e7cd50df779a14 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 11 Jan 2018 19:21:20 -0700 Subject: Massive removal of unused modules --- src/network/room.h | 101 ----------------------------------------------------- 1 file changed, 101 deletions(-) delete mode 100644 src/network/room.h (limited to 'src/network/room.h') diff --git a/src/network/room.h b/src/network/room.h deleted file mode 100644 index 8285a4d0c..000000000 --- a/src/network/room.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2017 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include -#include -#include -#include -#include "common/common_types.h" - -namespace Network { - -constexpr u32 network_version = 1; ///< The version of this Room and RoomMember - -constexpr u16 DefaultRoomPort = 1234; -constexpr size_t NumChannels = 1; // Number of channels used for the connection - -struct RoomInformation { - std::string name; ///< Name of the server - u32 member_slots; ///< Maximum number of members in this room -}; - -struct GameInfo { - std::string name{""}; - u64 id{0}; -}; - -using MacAddress = std::array; -/// A special MAC address that tells the room we're joining to assign us a MAC address -/// automatically. -constexpr MacAddress NoPreferredMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - -// 802.11 broadcast MAC address -constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - -// The different types of messages that can be sent. The first byte of each packet defines the type -enum RoomMessageTypes : u8 { - IdJoinRequest = 1, - IdJoinSuccess, - IdRoomInformation, - IdSetGameInfo, - IdWifiPacket, - IdChatMessage, - IdNameCollision, - IdMacCollision, - IdVersionMismatch, - IdCloseRoom -}; - -/// This is what a server [person creating a server] would use. -class Room final { -public: - enum class State : u8 { - Open, ///< The room is open and ready to accept connections. - Closed, ///< The room is not opened and can not accept connections. - }; - - struct Member { - std::string nickname; ///< The nickname of the member. - GameInfo game_info; ///< The current game of the member - MacAddress mac_address; ///< The assigned mac address of the member. - }; - - Room(); - ~Room(); - - /** - * Gets the current state of the room. - */ - State GetState() const; - - /** - * Gets the room information of the room. - */ - const RoomInformation& GetRoomInformation() const; - - /** - * Gets a list of the mbmers connected to the room. - */ - std::vector GetRoomMemberList() const; - - /** - * Creates the socket for this room. Will bind to default address if - * server is empty string. - */ - void Create(const std::string& name, const std::string& server = "", - u16 server_port = DefaultRoomPort); - - /** - * Destroys the socket - */ - void Destroy(); - -private: - class RoomImpl; - std::unique_ptr room_impl; -}; - -} // namespace Network -- cgit v1.2.3