yuzu: Add ui files for multiplayer rooms
9
dist/license.md
vendored
|
|
@ -3,6 +3,9 @@ The icons in this folder and its subfolders have the following licenses:
|
|||
Icon Name | License | Origin/Author
|
||||
--- | --- | ---
|
||||
qt_themes/default/icons/16x16/checked.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/disconnected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/failed.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
|
|
@ -10,18 +13,24 @@ qt_themes/default/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.
|
|||
qt_themes/default/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/no_avatar.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team
|
||||
qt_themes/default/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/star.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
qt_themes/qdarkstyle/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/no_avatar.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team
|
||||
qt_themes/qdarkstyle/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/star.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
qt_themes/colorful/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
|
|
|
|||
BIN
dist/qt_themes/colorful/icons/16x16/connected.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
dist/qt_themes/colorful/icons/16x16/connected_notification.png
vendored
Normal file
|
After Width: | Height: | Size: 607 B |
BIN
dist/qt_themes/colorful/icons/16x16/disconnected.png
vendored
Normal file
|
After Width: | Height: | Size: 784 B |
3
dist/qt_themes/colorful/style.qrc
vendored
|
|
@ -1,6 +1,9 @@
|
|||
<RCC>
|
||||
<qresource prefix="icons/colorful">
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/connected.png">icons/16x16/connected.png</file>
|
||||
<file alias="16x16/connected_notification.png">icons/16x16/connected_notification.png</file>
|
||||
<file alias="16x16/disconnected.png">icons/16x16/disconnected.png</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
|
|
|
|||
4
dist/qt_themes/colorful_dark/style.qrc
vendored
|
|
@ -1,11 +1,15 @@
|
|||
<RCC>
|
||||
<qresource prefix="icons/colorful_dark">
|
||||
<file alias="16x16/connected.png">../colorful/icons/16x16/connected.png</file>
|
||||
<file alias="16x16/connected_notification.png">../colorful/icons/16x16/connected_notification.png</file>
|
||||
<file alias="16x16/disconnected.png">../colorful/icons/16x16/disconnected.png</file>
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">../colorful/icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">../colorful/icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">../colorful/icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">../qdarkstyle/icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/plus.png">../colorful/icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">../colorful/icons/48x48/sd_card.png</file>
|
||||
<file alias="256x256/plus_folder.png">../colorful/icons/256x256/plus_folder.png</file>
|
||||
|
|
|
|||
4
dist/qt_themes/default/default.qrc
vendored
|
|
@ -4,10 +4,14 @@
|
|||
<file alias="16x16/checked.png">icons/16x16/checked.png</file>
|
||||
<file alias="16x16/failed.png">icons/16x16/failed.png</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="16x16/connected.png">icons/16x16/connected.png</file>
|
||||
<file alias="16x16/disconnected.png">icons/16x16/disconnected.png</file>
|
||||
<file alias="16x16/connected_notification.png">icons/16x16/connected_notification.png</file>
|
||||
<file alias="16x16/view-refresh.png">icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
|
|
|
|||
BIN
dist/qt_themes/default/icons/16x16/connected.png
vendored
Normal file
|
After Width: | Height: | Size: 269 B |
BIN
dist/qt_themes/default/icons/16x16/connected_notification.png
vendored
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
dist/qt_themes/default/icons/16x16/disconnected.png
vendored
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
dist/qt_themes/default/icons/48x48/no_avatar.png
vendored
Normal file
|
After Width: | Height: | Size: 588 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/connected.png
vendored
Normal file
|
After Width: | Height: | Size: 397 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/connected_notification.png
vendored
Normal file
|
After Width: | Height: | Size: 526 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png
vendored
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/no_avatar.png
vendored
Normal file
|
After Width: | Height: | Size: 708 B |
4
dist/qt_themes/qdarkstyle/style.qrc
vendored
|
|
@ -1,11 +1,15 @@
|
|||
<RCC>
|
||||
<qresource prefix="icons/qdarkstyle">
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/connected.png">icons/16x16/connected.png</file>
|
||||
<file alias="16x16/disconnected.png">icons/16x16/disconnected.png</file>
|
||||
<file alias="16x16/connected_notification.png">icons/16x16/connected_notification.png</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
|
|
|
|||
1
externals/cpp-jwt
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e12ef06218596b52d9b5d6e1639484866a8e7067
|
||||
|
|
@ -41,6 +41,7 @@ add_custom_command(OUTPUT scm_rev.cpp
|
|||
add_library(common STATIC
|
||||
algorithm.h
|
||||
alignment.h
|
||||
announce_multiplayer_room.h
|
||||
assert.cpp
|
||||
assert.h
|
||||
atomic_helpers.h
|
||||
|
|
|
|||
138
src/common/announce_multiplayer_room.h
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
// Copyright 2017 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
#include "web_service/web_result.h"
|
||||
|
||||
namespace AnnounceMultiplayerRoom {
|
||||
|
||||
using MacAddress = std::array<u8, 6>;
|
||||
|
||||
struct Room {
|
||||
struct Member {
|
||||
std::string username;
|
||||
std::string nickname;
|
||||
std::string avatar_url;
|
||||
MacAddress mac_address;
|
||||
std::string game_name;
|
||||
u64 game_id;
|
||||
};
|
||||
std::string id;
|
||||
std::string verify_UID; ///< UID used for verification
|
||||
std::string name;
|
||||
std::string description;
|
||||
std::string owner;
|
||||
std::string ip;
|
||||
u16 port;
|
||||
u32 max_player;
|
||||
u32 net_version;
|
||||
bool has_password;
|
||||
std::string preferred_game;
|
||||
u64 preferred_game_id;
|
||||
|
||||
std::vector<Member> members;
|
||||
};
|
||||
using RoomList = std::vector<Room>;
|
||||
|
||||
/**
|
||||
* A AnnounceMultiplayerRoom interface class. A backend to submit/get to/from a web service should
|
||||
* implement this interface.
|
||||
*/
|
||||
class Backend {
|
||||
public:
|
||||
virtual ~Backend() = default;
|
||||
|
||||
/**
|
||||
* Sets the Information that gets used for the announce
|
||||
* @param uid The Id of the room
|
||||
* @param name The name of the room
|
||||
* @param description The room description
|
||||
* @param port The port of the room
|
||||
* @param net_version The version of the libNetwork that gets used
|
||||
* @param has_password True if the room is passowrd protected
|
||||
* @param preferred_game The preferred game of the room
|
||||
* @param preferred_game_id The title id of the preferred game
|
||||
*/
|
||||
virtual void SetRoomInformation(const std::string& name, const std::string& description,
|
||||
const u16 port, const u32 max_player, const u32 net_version,
|
||||
const bool has_password, const std::string& preferred_game,
|
||||
const u64 preferred_game_id) = 0;
|
||||
/**
|
||||
* Adds a player information to the data that gets announced
|
||||
* @param nickname The nickname of the player
|
||||
* @param mac_address The MAC Address of the player
|
||||
* @param game_id The title id of the game the player plays
|
||||
* @param game_name The name of the game the player plays
|
||||
*/
|
||||
virtual void AddPlayer(const std::string& username, const std::string& nickname,
|
||||
const std::string& avatar_url, const MacAddress& mac_address,
|
||||
const u64 game_id, const std::string& game_name) = 0;
|
||||
|
||||
/**
|
||||
* Updates the data in the announce service. Re-register the room when required.
|
||||
* @result The result of the update attempt
|
||||
*/
|
||||
virtual WebService::WebResult Update() = 0;
|
||||
|
||||
/**
|
||||
* Registers the data in the announce service
|
||||
* @result The result of the register attempt. When the result code is Success, A global Guid of
|
||||
* the room which may be used for verification will be in the result's returned_data.
|
||||
*/
|
||||
virtual WebService::WebResult Register() = 0;
|
||||
|
||||
/**
|
||||
* Empties the stored players
|
||||
*/
|
||||
virtual void ClearPlayers() = 0;
|
||||
|
||||
/**
|
||||
* Get the room information from the announce service
|
||||
* @result A list of all rooms the announce service has
|
||||
*/
|
||||
virtual RoomList GetRoomList() = 0;
|
||||
|
||||
/**
|
||||
* Sends a delete message to the announce service
|
||||
*/
|
||||
virtual void Delete() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Empty implementation of AnnounceMultiplayerRoom interface that drops all data. Used when a
|
||||
* functional backend implementation is not available.
|
||||
*/
|
||||
class NullBackend : public Backend {
|
||||
public:
|
||||
~NullBackend() = default;
|
||||
void SetRoomInformation(const std::string& /*name*/, const std::string& /*description*/,
|
||||
const u16 /*port*/, const u32 /*max_player*/, const u32 /*net_version*/,
|
||||
const bool /*has_password*/, const std::string& /*preferred_game*/,
|
||||
const u64 /*preferred_game_id*/) override {}
|
||||
void AddPlayer(const std::string& /*username*/, const std::string& /*nickname*/,
|
||||
const std::string& /*avatar_url*/, const MacAddress& /*mac_address*/,
|
||||
const u64 /*game_id*/, const std::string& /*game_name*/) override {}
|
||||
WebService::WebResult Update() override {
|
||||
return WebService::WebResult{WebService::WebResult::Code::NoWebservice,
|
||||
"WebService is missing"};
|
||||
}
|
||||
WebService::WebResult Register() override {
|
||||
return WebService::WebResult{WebService::WebResult::Code::NoWebservice,
|
||||
"WebService is missing"};
|
||||
}
|
||||
void ClearPlayers() override {}
|
||||
RoomList GetRoomList() override {
|
||||
return RoomList{};
|
||||
}
|
||||
|
||||
void Delete() override {}
|
||||
};
|
||||
|
||||
} // namespace AnnounceMultiplayerRoom
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
add_library(core STATIC
|
||||
announce_multiplayer_session.cpp
|
||||
announce_multiplayer_session.h
|
||||
arm/arm_interface.h
|
||||
arm/arm_interface.cpp
|
||||
arm/cpu_interrupt_handler.cpp
|
||||
|
|
@ -741,11 +743,11 @@ add_library(core STATIC
|
|||
memory/dmnt_cheat_vm.h
|
||||
memory.cpp
|
||||
memory.h
|
||||
network/network.cpp
|
||||
network/network.h
|
||||
network/network_interface.cpp
|
||||
network/network_interface.h
|
||||
network/sockets.h
|
||||
internal_network/network.cpp
|
||||
internal_network/network.h
|
||||
internal_network/network_interface.cpp
|
||||
internal_network/network_interface.h
|
||||
internal_network/sockets.h
|
||||
perf_stats.cpp
|
||||
perf_stats.h
|
||||
reporter.cpp
|
||||
|
|
@ -780,7 +782,7 @@ endif()
|
|||
|
||||
create_target_directory_groups(core)
|
||||
|
||||
target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
|
||||
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core)
|
||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus)
|
||||
if (MINGW)
|
||||
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
|
||||
|
|
|
|||