mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Convert structure to open-std Document P1204R0: Canonical Project Structure
Took 2 hours 50 minutes
This commit is contained in:
parent
3e0cf97dff
commit
3fb9689bbb
585 changed files with 1548 additions and 1584 deletions
|
|
@ -107,17 +107,12 @@ add_executable(servatrice MACOSX_BUNDLE ${servatrice_MOC_SRCS} ${servatrice_RESO
|
|||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
|
||||
target_link_libraries(
|
||||
servatrice
|
||||
cockatrice_common
|
||||
cockatrice_deck_list
|
||||
cockatrice_server
|
||||
Threads::Threads
|
||||
${SERVATRICE_QT_MODULES}
|
||||
servatrice libcockatrice_deck_list libcockatrice_server Threads::Threads ${SERVATRICE_QT_MODULES}
|
||||
${LIBEXECINFO_LIBRARY}
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
servatrice cockatrice_common cockatrice_deck_list cockatrice_server Threads::Threads ${SERVATRICE_QT_MODULES}
|
||||
servatrice libcockatrice_deck_list libcockatrice_server Threads::Threads ${SERVATRICE_QT_MODULES}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
#include "isl_interface.h"
|
||||
|
||||
#include "../../libs/server/include/server/debug_pb_message.h"
|
||||
#include "../../libs/server/include/server/get_pb_extension.h"
|
||||
#include "main.h"
|
||||
#include "pb/event_game_joined.pb.h"
|
||||
#include "pb/event_join_room.pb.h"
|
||||
#include "pb/event_leave_room.pb.h"
|
||||
#include "pb/event_list_games.pb.h"
|
||||
#include "pb/event_remove_messages.pb.h"
|
||||
#include "pb/event_room_say.pb.h"
|
||||
#include "pb/event_server_complete_list.pb.h"
|
||||
#include "pb/event_user_joined.pb.h"
|
||||
#include "pb/event_user_left.pb.h"
|
||||
#include "pb/event_user_message.pb.h"
|
||||
#include "pb/isl_message.pb.h"
|
||||
#include "server/server_protocolhandler.h"
|
||||
#include "server/server_room.h"
|
||||
#include "server_logger.h"
|
||||
|
||||
#include <QSslSocket>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_join_room.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_leave_room.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_list_games.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_remove_messages.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_room_say.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_complete_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_user_joined.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_user_left.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_user_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/isl_message.pb.h>
|
||||
#include <libcockatrice/server/debug_pb_message.h>
|
||||
#include <libcockatrice/server/get_pb_extension.h>
|
||||
#include <libcockatrice/server/server_protocolhandler.h>
|
||||
#include <libcockatrice/server/server_room.h>
|
||||
|
||||
void IslInterface::sharedCtor(const QSslCertificate &cert, const QSslKey &privateKey)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
#ifndef ISL_INTERFACE_H
|
||||
#define ISL_INTERFACE_H
|
||||
|
||||
#include "pb/serverinfo_game.pb.h"
|
||||
#include "pb/serverinfo_room.pb.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "servatrice.h"
|
||||
|
||||
#include <QSslCertificate>
|
||||
#include <QWaitCondition>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_game.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_room.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
|
||||
class Servatrice;
|
||||
class QSslSocket;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "../../libs/rng/include/rng/rng_sfmt.h"
|
||||
#include "../../libs/utility/include/utility/passwordhasher.h"
|
||||
#include "servatrice.h"
|
||||
#include "server_logger.h"
|
||||
#include "settingscache.h"
|
||||
|
|
@ -34,6 +32,8 @@
|
|||
#include <QMetaType>
|
||||
#include <QtGlobal>
|
||||
#include <iostream>
|
||||
#include <libcockatrice/rng/rng_sfmt.h>
|
||||
#include <libcockatrice/utility/passwordhasher.h>
|
||||
|
||||
RNG_Abstract *rng;
|
||||
ServerLogger *logger;
|
||||
|
|
|
|||
|
|
@ -19,17 +19,11 @@
|
|||
***************************************************************************/
|
||||
#include "servatrice.h"
|
||||
|
||||
#include "../../libs/utility/include/utility/featureset.h"
|
||||
#include "deck_list/deck_list.h"
|
||||
#include "email_parser.h"
|
||||
#include "isl_interface.h"
|
||||
#include "main.h"
|
||||
#include "pb/event_connection_closed.pb.h"
|
||||
#include "pb/event_server_message.pb.h"
|
||||
#include "pb/event_server_shutdown.pb.h"
|
||||
#include "servatrice_connection_pool.h"
|
||||
#include "servatrice_database_interface.h"
|
||||
#include "server/server_room.h"
|
||||
#include "server_logger.h"
|
||||
#include "serversocketinterface.h"
|
||||
#include "settingscache.h"
|
||||
|
|
@ -45,6 +39,12 @@
|
|||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
#include <iostream>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/protocol/pb/event_connection_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_shutdown.pb.h>
|
||||
#include <libcockatrice/server/server_room.h>
|
||||
#include <libcockatrice/utility/featureset.h>
|
||||
|
||||
Servatrice_GameServer::Servatrice_GameServer(Servatrice *_server,
|
||||
int _numberPools,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@
|
|||
#ifndef SERVATRICE_H
|
||||
#define SERVATRICE_H
|
||||
|
||||
#include "server/server.h"
|
||||
|
||||
#include <QHostAddress>
|
||||
#include <QMetaType>
|
||||
#include <QMutex>
|
||||
|
|
@ -31,6 +29,7 @@
|
|||
#include <QSslKey>
|
||||
#include <QTcpServer>
|
||||
#include <QWebSocketServer>
|
||||
#include <libcockatrice/server/server.h>
|
||||
#include <utility>
|
||||
|
||||
Q_DECLARE_METATYPE(QSqlDatabase)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
#include "servatrice_database_interface.h"
|
||||
|
||||
#include "deck_list/deck_list.h"
|
||||
#include "pb/game_replay.pb.h"
|
||||
#include "servatrice.h"
|
||||
#include "serversocketinterface.h"
|
||||
#include "settingscache.h"
|
||||
#include "utility/passwordhasher.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/protocol/pb/game_replay.pb.h>
|
||||
#include <libcockatrice/utility/passwordhasher.h>
|
||||
|
||||
Servatrice_DatabaseInterface::Servatrice_DatabaseInterface(int _instanceId, Servatrice *_server)
|
||||
: instanceId(_instanceId), sqlDatabase(QSqlDatabase()), server(_server)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
#ifndef SERVATRICE_DATABASE_INTERFACE_H
|
||||
#define SERVATRICE_DATABASE_INTERFACE_H
|
||||
|
||||
#include "server/server.h"
|
||||
#include "server/server_database_interface.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QSqlDatabase>
|
||||
#include <libcockatrice/server/server.h>
|
||||
#include <libcockatrice/server/server_database_interface.h>
|
||||
|
||||
#define DATABASE_SCHEMA_VERSION 34
|
||||
|
||||
|
|
|
|||
|
|
@ -20,55 +20,10 @@
|
|||
|
||||
#include "serversocketinterface.h"
|
||||
|
||||
#include "../../libs/utility/include/utility/trice_limits.h"
|
||||
#include "deck_list/deck_list.h"
|
||||
#include "email_parser.h"
|
||||
#include "main.h"
|
||||
#include "pb/command_deck_del.pb.h"
|
||||
#include "pb/command_deck_del_dir.pb.h"
|
||||
#include "pb/command_deck_download.pb.h"
|
||||
#include "pb/command_deck_list.pb.h"
|
||||
#include "pb/command_deck_new_dir.pb.h"
|
||||
#include "pb/command_deck_upload.pb.h"
|
||||
#include "pb/command_replay_delete_match.pb.h"
|
||||
#include "pb/command_replay_download.pb.h"
|
||||
#include "pb/command_replay_get_code.pb.h"
|
||||
#include "pb/command_replay_list.pb.h"
|
||||
#include "pb/command_replay_modify_match.pb.h"
|
||||
#include "pb/command_replay_submit_code.pb.h"
|
||||
#include "pb/commands.pb.h"
|
||||
#include "pb/event_add_to_list.pb.h"
|
||||
#include "pb/event_connection_closed.pb.h"
|
||||
#include "pb/event_notify_user.pb.h"
|
||||
#include "pb/event_remove_from_list.pb.h"
|
||||
#include "pb/event_replay_added.pb.h"
|
||||
#include "pb/event_server_identification.pb.h"
|
||||
#include "pb/event_server_message.pb.h"
|
||||
#include "pb/event_user_message.pb.h"
|
||||
#include "pb/response_ban_history.pb.h"
|
||||
#include "pb/response_deck_download.pb.h"
|
||||
#include "pb/response_deck_list.pb.h"
|
||||
#include "pb/response_deck_upload.pb.h"
|
||||
#include "pb/response_forgotpasswordrequest.pb.h"
|
||||
#include "pb/response_get_admin_notes.pb.h"
|
||||
#include "pb/response_password_salt.pb.h"
|
||||
#include "pb/response_register.pb.h"
|
||||
#include "pb/response_replay_download.pb.h"
|
||||
#include "pb/response_replay_get_code.pb.h"
|
||||
#include "pb/response_replay_list.pb.h"
|
||||
#include "pb/response_viewlog_history.pb.h"
|
||||
#include "pb/response_warn_history.pb.h"
|
||||
#include "pb/response_warn_list.pb.h"
|
||||
#include "pb/serverinfo_ban.pb.h"
|
||||
#include "pb/serverinfo_chat_message.pb.h"
|
||||
#include "pb/serverinfo_deckstorage.pb.h"
|
||||
#include "pb/serverinfo_replay.pb.h"
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "servatrice.h"
|
||||
#include "servatrice_database_interface.h"
|
||||
#include "server/game/server_player.h"
|
||||
#include "server/server_response_containers.h"
|
||||
#include "server/server_room.h"
|
||||
#include "server_logger.h"
|
||||
#include "settingscache.h"
|
||||
#include "version_string.h"
|
||||
|
|
@ -81,6 +36,51 @@
|
|||
#include <QSqlQuery>
|
||||
#include <QString>
|
||||
#include <iostream>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_del.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_del_dir.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_new_dir.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_deck_upload.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_delete_match.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_get_code.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_modify_match.pb.h>
|
||||
#include <libcockatrice/protocol/pb/command_replay_submit_code.pb.h>
|
||||
#include <libcockatrice/protocol/pb/commands.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_add_to_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_connection_closed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_notify_user.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_remove_from_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_replay_added.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_identification.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_server_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_user_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_ban_history.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_upload.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_forgotpasswordrequest.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_get_admin_notes.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_password_salt.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_register.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_replay_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_replay_get_code.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_replay_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_viewlog_history.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_warn_history.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_warn_list.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_ban.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_chat_message.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_deckstorage.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_replay.pb.h>
|
||||
#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
|
||||
#include <libcockatrice/server/game/server_player.h>
|
||||
#include <libcockatrice/server/server_response_containers.h>
|
||||
#include <libcockatrice/server/server_room.h>
|
||||
#include <libcockatrice/utility/trice_limits.h>
|
||||
#include <string>
|
||||
|
||||
static const int protocolVersion = 14;
|
||||
|
|
|
|||
|
|
@ -20,12 +20,11 @@
|
|||
#ifndef SERVERSOCKETINTERFACE_H
|
||||
#define SERVERSOCKETINTERFACE_H
|
||||
|
||||
#include "server/server_protocolhandler.h"
|
||||
|
||||
#include <QHostAddress>
|
||||
#include <QMutex>
|
||||
#include <QTcpSocket>
|
||||
#include <QWebSocket>
|
||||
#include <libcockatrice/server/server_protocolhandler.h>
|
||||
|
||||
class Servatrice;
|
||||
class Servatrice_DatabaseInterface;
|
||||
|
|
@ -147,7 +146,7 @@ public:
|
|||
AbstractServerSocketInterface(Servatrice *_server,
|
||||
Servatrice_DatabaseInterface *_databaseInterface,
|
||||
QObject *parent = 0);
|
||||
~AbstractServerSocketInterface(){};
|
||||
~AbstractServerSocketInterface() {};
|
||||
bool initSession();
|
||||
|
||||
virtual QHostAddress getPeerAddress() const = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue