normalize includes: loginserver

This commit is contained in:
brainiac 2025-12-18 00:25:57 -08:00 committed by Alex
parent 360e01d824
commit b7fcee632e
20 changed files with 112 additions and 145 deletions

View File

@ -33,6 +33,7 @@ add_executable(loginserver ${eqlogin_sources} ${eqlogin_headers})
install(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
target_link_libraries(loginserver common)
target_include_directories(loginserver PRIVATE ..)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set_property(TARGET loginserver PROPERTY FOLDER executables/servers)

View File

@ -1,7 +1,8 @@
#include "account_management.h"
#include "login_server.h"
#include "../common/event/task_scheduler.h"
#include "../common/repositories/login_accounts_repository.h"
#include "common/event/task_scheduler.h"
#include "common/repositories/login_accounts_repository.h"
#include "loginserver/login_server.h"
EQ::Event::TaskScheduler task_runner;

View File

@ -1,11 +1,9 @@
#ifndef EQEMU_ACCOUNT_MANAGEMENT_H
#define EQEMU_ACCOUNT_MANAGEMENT_H
#pragma once
#include "iostream"
#include "../common/types.h"
#include "login_types.h"
#include "encryption.h"
#include "login_server.h"
#include "common/types.h"
#include "loginserver/login_types.h"
#include "loginserver/encryption.h"
#include "loginserver/login_server.h"
extern LoginServer server;
extern Database database;
@ -28,6 +26,3 @@ public:
const std::string &ip_address = ""
);
};
#endif //EQEMU_ACCOUNT_MANAGEMENT_H

View File

@ -1,7 +1,6 @@
#ifndef EQEMU_CLIENT_H
#define EQEMU_CLIENT_H
#include "../common/global_define.h"
#include "../common/opcodemgr.h"
#include "../common/random.h"
#include "../common/eq_stream_intf.h"

View File

@ -1,13 +1,13 @@
#include "client_manager.h"
#include "login_server.h"
#include "common/file.h"
#include "common/misc.h"
#include "common/path_manager.h"
#include "loginserver/login_server.h"
extern LoginServer server;
extern bool run_server;
#include "../common/misc.h"
#include "../common/path_manager.h"
#include "../common/file.h"
void CheckTitaniumOpcodeFile(const std::string &path)
{
if (File::Exists(path)) {

View File

@ -1,10 +1,9 @@
#ifndef EQEMU_CLIENTMANAGER_H
#define EQEMU_CLIENTMANAGER_H
#pragma once
#include "common/net/eqstream.h"
#include "common/opcodemgr.h"
#include "loginserver/client.h"
#include "../common/global_define.h"
#include "../common/opcodemgr.h"
#include "../common/net/eqstream.h"
#include "client.h"
#include <list>
class ClientManager {
@ -25,6 +24,3 @@ private:
OpcodeManager *m_larion_ops;
EQ::Net::EQStreamManager *m_larion_stream;
};
#endif

View File

@ -1,10 +1,11 @@
#pragma once
#include "common/eqemu_logsys.h"
#include "common/strings.h"
#include "common/types.h"
#include "loginserver/login_types.h"
#include <string>
#include "../common/types.h"
#include "login_types.h"
#include "../common/eqemu_logsys.h"
#include "../common/strings.h"
enum EncryptionMode {
EncryptionModeMD5 = 1,

View File

@ -1,9 +1,5 @@
#ifndef EQEMUCAPI__H
#define EQEMUCAPI__H
#pragma once
char* DecryptUsernamePassword(const char* encryptedBuffer, unsigned int bufferSize, int mode);
char* Encrypt(const char* buffer, unsigned int bufferSize, unsigned int &outSize);
void _HeapDeleteCharBuffer(char *buffer);
#endif

View File

@ -1,13 +1,13 @@
#ifndef EQEMU_LOGINSERVER_H
#define EQEMU_LOGINSERVER_H
#pragma once
#include "common/json_config.h"
#include "loginserver/client_manager.h"
#include "loginserver/encryption.h"
#include "loginserver/loginserver_webserver.h"
#include "loginserver/options.h"
#include "loginserver/world_server_manager.h"
#include <utility>
#include "../common/json_config.h"
#include "encryption.h"
#include "options.h"
#include "world_server_manager.h"
#include "client_manager.h"
#include "loginserver_webserver.h"
struct LoginServer {
public:
@ -23,6 +23,3 @@ public:
WorldServerManager *server_manager;
ClientManager *client_manager{};
};
#endif

View File

@ -1,6 +1,10 @@
#ifndef EQEMU_LOGINSTRUCTURES_H
#define EQEMU_LOGINSTRUCTURES_H
#pragma once
#include "common/types.h"
#include <string>
#pragma pack(push)
#pragma pack(1)
// unencrypted base message header in all packets
@ -161,5 +165,4 @@ namespace LS {
};
}
#endif
#pragma pack(pop)

View File

@ -1,11 +1,10 @@
#include <iostream>
#include <random>
#include "loginserver_command_handler.h"
#include "../common/util/uuid.h"
#include "login_server.h"
#include "loginserver_webserver.h"
#include "account_management.h"
#include "../common/repositories/login_api_tokens_repository.h"
#include "common/repositories/login_api_tokens_repository.h"
#include "common/util/uuid.h"
#include "loginserver/account_management.h"
#include "loginserver/login_server.h"
#include "loginserver/loginserver_webserver.h"
extern LoginServer server;

View File

@ -1,8 +1,6 @@
#include "iostream"
#include "../common/cli/eqemu_command_handler.h"
#pragma once
#ifndef EQEMU_LOGINSERVER_COMMAND_HANDLER_H
#define EQEMU_LOGINSERVER_COMMAND_HANDLER_H
#include "common/cli/eqemu_command_handler.h"
namespace LoginserverCommandHandler {
void CommandHandler(int argc, char **argv);
@ -16,6 +14,3 @@ namespace LoginserverCommandHandler {
void UpdateLoginserverWorldAdminAccountPassword(int argc, char **argv, argh::parser &cmd, std::string &description);
void HealthCheckLogin(int argc, char **argv, argh::parser &cmd, std::string &description);
};
#endif //EQEMU_LOGINSERVER_COMMAND_HANDLER_H

View File

@ -1,10 +1,11 @@
#include "loginserver_webserver.h"
#include "world_server_manager.h"
#include "login_server.h"
#include "../common/json/json.h"
#include "../common/strings.h"
#include "account_management.h"
#include "../common/repositories/login_api_tokens_repository.h"
#include "common/json/json.h"
#include "common/repositories/login_api_tokens_repository.h"
#include "common/strings.h"
#include "loginserver/account_management.h"
#include "loginserver/login_server.h"
#include "loginserver/world_server_manager.h"
extern LoginServer server;

View File

@ -1,9 +1,8 @@
#ifndef EQEMU_LOGINSERVER_WEBSERVER_H
#define EQEMU_LOGINSERVER_WEBSERVER_H
#pragma once
#include "../common/http/httplib.h"
#include "../common/json/json.h"
#include "../common/types.h"
#include "common/http/httplib.h"
#include "common/json/json.h"
#include "common/types.h"
namespace LoginserverWebserver {
@ -35,5 +34,3 @@ namespace LoginserverWebserver {
void SendResponse(const Json::Value &payload, httplib::Response &res);
static Json::Value ParseRequestBody(const httplib::Request &request);
};
#endif //EQEMU_LOGINSERVER_WEBSERVER_H

View File

@ -1,34 +1,30 @@
#include "../common/global_define.h"
#include "../common/types.h"
#include "../common/opcodemgr.h"
#include "../common/event/event_loop.h"
#include "../common/timer.h"
#include "../common/platform.h"
#include "../common/crash.h"
#include "../common/eqemu_logsys.h"
#include "../common/http/httplib.h"
#include "login_server.h"
#include "loginserver_webserver.h"
#include "loginserver_command_handler.h"
#include "../common/strings.h"
#include "../common/path_manager.h"
#include "../common/database.h"
#include "../common/events/player_event_logs.h"
#include "../common/zone_store.h"
#include <time.h>
#include "common/crash.h"
#include "common/database.h"
#include "common/eqemu_logsys.h"
#include "common/event/event_loop.h"
#include "common/events/player_event_logs.h"
#include "common/http/httplib.h"
#include "common/opcodemgr.h"
#include "common/path_manager.h"
#include "common/platform.h"
#include "common/strings.h"
#include "common/timer.h"
#include "common/types.h"
#include "common/zone_store.h"
#include "loginserver/login_server.h"
#include "loginserver/loginserver_command_handler.h"
#include "loginserver/loginserver_webserver.h"
#include <sstream>
#include <stdlib.h>
#include <string>
#include <sstream>
#include <thread>
#include <time.h>
LoginServer server;
bool run_server = true;
Database database;
void CatchSignal(int sig_num)
{
}
void LoadDatabaseConnection()
{
LogInfo("MySQL Database Init");

View File

@ -1,5 +1,6 @@
#ifndef EQEMU_OPTIONS_H
#define EQEMU_OPTIONS_H
#pragma once
#include <string>
class Options {
public:
@ -51,7 +52,3 @@ private:
std::string m_eqemu_loginserver_address;
std::string m_default_loginserver_name;
};
#endif

View File

@ -1,10 +1,11 @@
#include "world_server.h"
#include "login_server.h"
#include "login_types.h"
#include "../common/ip_util.h"
#include "../common/strings.h"
#include "../common/repositories/login_world_servers_repository.h"
#include "../common/repositories/login_server_admins_repository.h"
#include "common/ip_util.h"
#include "common/repositories/login_server_admins_repository.h"
#include "common/repositories/login_world_servers_repository.h"
#include "common/strings.h"
#include "loginserver/login_server.h"
#include "loginserver/login_types.h"
extern LoginServer server;
extern Database database;

View File

@ -1,16 +1,15 @@
#ifndef EQEMU_WORLDSERVER_H
#define EQEMU_WORLDSERVER_H
#pragma once
#include "common/event/timer.h"
#include "common/net/servertalk_server_connection.h"
#include "common/packet_dump.h"
#include "common/repositories/login_server_admins_repository.h"
#include "common/servertalk.h"
#include "loginserver/client.h"
#include "loginserver/login_types.h"
#include "../common/global_define.h"
#include "../common/net/servertalk_server_connection.h"
#include "../common/servertalk.h"
#include "../common/packet_dump.h"
#include "../common/event/timer.h"
#include "login_types.h"
#include "client.h"
#include "../common/repositories/login_server_admins_repository.h"
#include <string>
#include <memory>
#include <string>
/**
* World server class, controls the connected server processing.
@ -84,6 +83,3 @@ private:
static void FormatWorldServerName(char *name, int8 server_list_type);
};
#endif

View File

@ -1,10 +1,11 @@
#include "world_server_manager.h"
#include "login_server.h"
#include "login_types.h"
#include <stdlib.h>
#include "../common/eqemu_logsys.h"
#include "../common/ip_util.h"
#include "common/eqemu_logsys.h"
#include "common/ip_util.h"
#include "loginserver/login_server.h"
#include "loginserver/login_types.h"
#include <cstdlib>
extern LoginServer server;
extern bool run_server;

View File

@ -1,12 +1,11 @@
#ifndef EQEMU_SERVERMANAGER_H
#define EQEMU_SERVERMANAGER_H
#pragma once
#include "common/net/servertalk_server.h"
#include "common/packet_dump.h"
#include "common/servertalk.h"
#include "loginserver/client.h"
#include "loginserver/world_server.h"
#include "../common/global_define.h"
#include "../common/servertalk.h"
#include "../common/packet_dump.h"
#include "../common/net/servertalk_server.h"
#include "world_server.h"
#include "client.h"
#include <list>
class WorldServerManager {
@ -26,8 +25,4 @@ public:
private:
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
std::list<std::unique_ptr<WorldServer>> m_world_servers;
};
#endif