Move abstract client.

Took 2 minutes
This commit is contained in:
Lukas Brübach 2025-10-08 13:17:56 +02:00
parent 4e7c98829a
commit 5414e3e3b5
33 changed files with 64 additions and 33 deletions

View file

@ -205,7 +205,7 @@ set(cockatrice_SOURCES
src/interface/widgets/visual_deck_storage/visual_deck_storage_widget.cpp src/interface/widgets/visual_deck_storage/visual_deck_storage_widget.cpp
src/interface/window_main.cpp src/interface/window_main.cpp
src/main.cpp src/main.cpp
../libcockatrice_network/libcockatrice/client/abstract_client.cpp ../libcockatrice_network/libcockatrice/client/abstract/abstract_client.cpp
src/server/chat_view/chat_view.cpp src/server/chat_view/chat_view.cpp
src/server/game_selector.cpp src/server/game_selector.cpp
src/server/games_model.cpp src/server/games_model.cpp

View file

@ -1,6 +1,6 @@
#include "game_event_handler.h" #include "game_event_handler.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"
#include "../tabs/tab_game.h" #include "../tabs/tab_game.h"
#include "abstract_game.h" #include "abstract_game.h"

View file

@ -7,7 +7,7 @@
#ifndef COCKATRICE_GAME_STATE_H #ifndef COCKATRICE_GAME_STATE_H
#define COCKATRICE_GAME_STATE_H #define COCKATRICE_GAME_STATE_H
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include <QObject> #include <QObject>
#include <QTimer> #include <QTimer>

View file

@ -1,6 +1,6 @@
#include "player_list_widget.h" #include "player_list_widget.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../interface/pixel_map_generator.h" #include "../../interface/pixel_map_generator.h"
#include "../../server/user/user_context_menu.h" #include "../../server/user/user_context_menu.h"
#include "../../server/user/user_list_manager.h" #include "../../server/user/user_list_manager.h"

View file

@ -7,7 +7,7 @@
#ifndef HOME_WIDGET_H #ifndef HOME_WIDGET_H
#define HOME_WIDGET_H #define HOME_WIDGET_H
#include "../../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../../tabs/tab_supervisor.h" #include "../../../tabs/tab_supervisor.h"
#include "../cards/card_info_picture_art_crop_widget.h" #include "../cards/card_info_picture_art_crop_widget.h"
#include "home_styled_button.h" #include "home_styled_button.h"

View file

@ -25,7 +25,7 @@
#ifndef WINDOW_H #ifndef WINDOW_H
#define WINDOW_H #define WINDOW_H
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include <QList> #include <QList>
#include <QLoggingCategory> #include <QLoggingCategory>

View file

@ -1,6 +1,6 @@
#include "game_selector.h" #include "game_selector.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/get_text_with_max.h" #include "../client/get_text_with_max.h"
#include "../dialogs/dlg_create_game.h" #include "../dialogs/dlg_create_game.h"
#include "../dialogs/dlg_filter_games.h" #include "../dialogs/dlg_filter_games.h"

View file

@ -1,6 +1,6 @@
#include "remote_decklist_tree_widget.h" #include "remote_decklist_tree_widget.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../pending_command.h" #include "../pending_command.h"
#include <QFileIconProvider> #include <QFileIconProvider>

View file

@ -1,6 +1,6 @@
#include "remote_replay_list_tree_widget.h" #include "remote_replay_list_tree_widget.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../pending_command.h" #include "../pending_command.h"
#include <QFileIconProvider> #include <QFileIconProvider>

View file

@ -1,6 +1,6 @@
#include "user_context_menu.h" #include "user_context_menu.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../tabs/tab_account.h" #include "../../tabs/tab_account.h"
#include "../../tabs/tab_game.h" #include "../../tabs/tab_game.h"
#include "../../tabs/tab_supervisor.h" #include "../../tabs/tab_supervisor.h"

View file

@ -1,6 +1,6 @@
#include "user_info_box.h" #include "user_info_box.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../client/get_text_with_max.h" #include "../../client/get_text_with_max.h"
#include "../../dialogs/dlg_edit_avatar.h" #include "../../dialogs/dlg_edit_avatar.h"
#include "../../dialogs/dlg_edit_password.h" #include "../../dialogs/dlg_edit_password.h"

View file

@ -1,6 +1,6 @@
#include "user_list_manager.h" #include "user_list_manager.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../client/sound_engine.h" #include "../../client/sound_engine.h"
#include "../pending_command.h" #include "../pending_command.h"
#include "user_info_box.h" #include "user_info_box.h"

View file

@ -1,6 +1,6 @@
#include "user_list_widget.h" #include "user_list_widget.h"
#include "../../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../../interface/pixel_map_generator.h" #include "../../interface/pixel_map_generator.h"
#include "../../tabs/tab_account.h" #include "../../tabs/tab_account.h"
#include "../../tabs/tab_supervisor.h" #include "../../tabs/tab_supervisor.h"

View file

@ -1,6 +1,6 @@
#include "abstract_tab_deck_editor.h" #include "abstract_tab_deck_editor.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/tapped_out_interface.h" #include "../client/tapped_out_interface.h"
#include "../deck/deck_stats_interface.h" #include "../deck/deck_stats_interface.h"
#include "../dialogs/dlg_load_deck.h" #include "../dialogs/dlg_load_deck.h"

View file

@ -1,6 +1,6 @@
#include "tab_account.h" #include "tab_account.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/sound_engine.h" #include "../client/sound_engine.h"
#include "../deck/custom_line_edit.h" #include "../deck/custom_line_edit.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"

View file

@ -1,6 +1,6 @@
#include "tab_admin.h" #include "tab_admin.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"
#include <QDialogButtonBox> #include <QDialogButtonBox>

View file

@ -1,6 +1,6 @@
#include "tab_deck_editor.h" #include "tab_deck_editor.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/deck_editor_menu.h" #include "../client/deck_editor_menu.h"
#include "../client/tapped_out_interface.h" #include "../client/tapped_out_interface.h"
#include "../dialogs/dlg_load_deck.h" #include "../dialogs/dlg_load_deck.h"

View file

@ -8,7 +8,7 @@
#ifndef TAB_DECK_STORAGE_H #ifndef TAB_DECK_STORAGE_H
#define TAB_DECK_STORAGE_H #define TAB_DECK_STORAGE_H
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../server/remote/remote_decklist_tree_widget.h" #include "../server/remote/remote_decklist_tree_widget.h"
#include "tab.h" #include "tab.h"

View file

@ -1,6 +1,6 @@
#include "tab_game.h" #include "tab_game.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/network/replay_timeline_widget.h" #include "../client/network/replay_timeline_widget.h"
#include "../dialogs/dlg_create_game.h" #include "../dialogs/dlg_create_game.h"
#include "../game/board/arrow_item.h" #include "../game/board/arrow_item.h"

View file

@ -7,7 +7,7 @@
#ifndef TAB_HOME_H #ifndef TAB_HOME_H
#define TAB_HOME_H #define TAB_HOME_H
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../interface/widgets/general/home_widget.h" #include "../interface/widgets/general/home_widget.h"
#include "tab.h" #include "tab.h"

View file

@ -1,6 +1,6 @@
#include "tab_logs.h" #include "tab_logs.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../deck/custom_line_edit.h" #include "../deck/custom_line_edit.h"
#include "../dialogs/dlg_manage_sets.h" #include "../dialogs/dlg_manage_sets.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"

View file

@ -1,6 +1,6 @@
#include "tab_message.h" #include "tab_message.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../client/sound_engine.h" #include "../client/sound_engine.h"
#include "../deck/custom_line_edit.h" #include "../deck/custom_line_edit.h"
#include "../main.h" #include "../main.h"

View file

@ -1,6 +1,6 @@
#include "tab_replays.h" #include "tab_replays.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"
#include "../server/remote/remote_replay_list_tree_widget.h" #include "../server/remote/remote_replay_list_tree_widget.h"
#include "tab_game.h" #include "tab_game.h"

View file

@ -8,7 +8,7 @@
#ifndef TAB_REPLAYS_H #ifndef TAB_REPLAYS_H
#define TAB_REPLAYS_H #define TAB_REPLAYS_H
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "tab.h" #include "tab.h"
class ServerInfo_User; class ServerInfo_User;

View file

@ -1,6 +1,6 @@
#include "tab_room.h" #include "tab_room.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../dialogs/dlg_settings.h" #include "../dialogs/dlg_settings.h"
#include "../main.h" #include "../main.h"
#include "../server/chat_view/chat_view.h" #include "../server/chat_view/chat_view.h"

View file

@ -1,6 +1,6 @@
#include "tab_server.h" #include "tab_server.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../server/pending_command.h" #include "../server/pending_command.h"
#include "../server/user/user_list_widget.h" #include "../server/user/user_list_widget.h"
#include "tab_supervisor.h" #include "tab_supervisor.h"

View file

@ -1,6 +1,6 @@
#include "tab_supervisor.h" #include "tab_supervisor.h"
#include "../../../libcockatrice_network/libcockatrice/client/abstract_client.h" #include "../../../libcockatrice_network/libcockatrice/client/abstract/abstract_client.h"
#include "../interface/pixel_map_generator.h" #include "../interface/pixel_map_generator.h"
#include "../main.h" #include "../main.h"
#include "../server/user/user_list_manager.h" #include "../server/user/user_list_manager.h"

View file

@ -3,11 +3,11 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
set(HEADERS set(HEADERS
local_client.h abstract/abstract_client.h
) )
set(SOURCES set(SOURCES
local_client.cpp abstract/abstract_client.cpp
) )
if (Qt6_FOUND) if (Qt6_FOUND)
@ -17,7 +17,7 @@ elseif (Qt5_FOUND)
endif () endif ()
add_library( add_library(
libcockatrice_network_client_local STATIC libcockatrice_network_client STATIC
${MOC_SOURCES} ${MOC_SOURCES}
${SOURCES} ${SOURCES}
) )

View file

@ -0,0 +1,31 @@
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(HEADERS
local_client.h
)
set(SOURCES
local_client.cpp
)
if (Qt6_FOUND)
qt6_wrap_cpp(MOC_SOURCES ${HEADERS})
elseif (Qt5_FOUND)
qt5_wrap_cpp(MOC_SOURCES ${HEADERS})
endif ()
add_library(
libcockatrice_network_client_local STATIC
${MOC_SOURCES}
${SOURCES}
)
# add_dependencies(libcockatrice_server libcockatrice_protocol_wrapper)
target_include_directories(libcockatrice_network_client_local PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(
libcockatrice_network_client_local PUBLIC ${COCKATRICE_QT_MODULES}
)

View file

@ -1,6 +1,6 @@
#include "../../../cockatrice/src/server/abstract_client.h" #include "../../../cockatrice/src/server/abstract_client.h"
#include "../../../cockatrice/src/server/pending_command.h" #include "../../../../cockatrice/src/server/pending_command.h"
#include <google/protobuf/descriptor.h> #include <google/protobuf/descriptor.h>
#include <libcockatrice/protocol/pb/commands.pb.h> #include <libcockatrice/protocol/pb/commands.pb.h>

View file

@ -7,7 +7,7 @@
#ifndef LOCALCLIENT_H #ifndef LOCALCLIENT_H
#define LOCALCLIENT_H #define LOCALCLIENT_H
#include "../abstract_client.h" #include "../abstract/abstract_client.h"
#include <QLoggingCategory> #include <QLoggingCategory>

View file

@ -7,7 +7,7 @@
#ifndef REMOTECLIENT_H #ifndef REMOTECLIENT_H
#define REMOTECLIENT_H #define REMOTECLIENT_H
#include "../abstract_client.h" #include "../abstract/abstract_client.h"
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QTcpSocket> #include <QTcpSocket>