mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-05 00:49:48 -03:00
Reorganized and cleaned up the solution.
This commit is contained in:
16
Include/Network/Event/NotifyClientDiscovered.hpp
Normal file
16
Include/Network/Event/NotifyClientDiscovered.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class NotifyClientDiscovered : public GenericMessage {
|
||||
private:
|
||||
std::string m_clientIp;
|
||||
int32_t m_clientPort;
|
||||
|
||||
public:
|
||||
NotifyClientDiscovered( sptr_user user );
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
17
Include/Network/Event/NotifyClientDiscovered_RTA.hpp
Normal file
17
Include/Network/Event/NotifyClientDiscovered_RTA.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
#include "Common/Constant.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class NotifyClientDiscovered_RTA : public GenericMessage {
|
||||
private:
|
||||
std::string m_clientIp;
|
||||
int32_t m_clientPort;
|
||||
|
||||
public:
|
||||
NotifyClientDiscovered_RTA( sptr_user user );
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
16
Include/Network/Event/NotifyClientReqConnect.h
Normal file
16
Include/Network/Event/NotifyClientReqConnect.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.h"
|
||||
|
||||
class NotifyClientRequestConnect : public GenericMessage
|
||||
{
|
||||
private:
|
||||
std::string m_clientIp;
|
||||
int32_t m_clientPort;
|
||||
|
||||
public:
|
||||
NotifyClientRequestConnect( std::string clientIp, int32_t clientPort );
|
||||
ByteBuffer &Serialize() override;
|
||||
};
|
||||
16
Include/Network/Event/NotifyClientRequestConnect.hpp
Normal file
16
Include/Network/Event/NotifyClientRequestConnect.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class NotifyClientRequestConnect : public GenericMessage {
|
||||
private:
|
||||
std::string m_clientIp;
|
||||
int32_t m_clientPort;
|
||||
|
||||
public:
|
||||
NotifyClientRequestConnect( sptr_user user );
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
19
Include/Network/Event/NotifyClientRequestConnect_RTA.hpp
Normal file
19
Include/Network/Event/NotifyClientRequestConnect_RTA.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class NotifyClientRequestConnect_RTA : public GenericMessage {
|
||||
private:
|
||||
std::string m_localAddr;
|
||||
std::string m_remoteAddr;
|
||||
int32_t m_localPort;
|
||||
int32_t m_remotePort;
|
||||
|
||||
public:
|
||||
NotifyClientRequestConnect_RTA( sptr_user user );
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
11
Include/Network/Event/NotifyForcedLogout.hpp
Normal file
11
Include/Network/Event/NotifyForcedLogout.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
|
||||
class NotifyForcedLogout : public GenericMessage {
|
||||
private:
|
||||
|
||||
public:
|
||||
NotifyForcedLogout();
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
13
Include/Network/Event/NotifyFriendStatus.hpp
Normal file
13
Include/Network/Event/NotifyFriendStatus.hpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
|
||||
class NotifyFriendStatus : public GenericMessage {
|
||||
private:
|
||||
std::wstring m_handle;
|
||||
bool m_status;
|
||||
|
||||
public:
|
||||
NotifyFriendStatus( std::wstring handle, bool status );
|
||||
void Serialize( ByteBuffer &out ) const override;
|
||||
};
|
||||
19
Include/Network/Event/NotifyGameDiscovered.hpp
Normal file
19
Include/Network/Event/NotifyGameDiscovered.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
#include "Common/Constant.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class NotifyGameDiscovered : public GenericMessage {
|
||||
private:
|
||||
std::string m_clientIp;
|
||||
int32_t m_clientPort;
|
||||
RealmGameType m_clientType;
|
||||
|
||||
public:
|
||||
NotifyGameDiscovered( sptr_user user );
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
13
Include/Network/Event/NotifyInstantMessage.hpp
Normal file
13
Include/Network/Event/NotifyInstantMessage.hpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
|
||||
class NotifyInstantMessage : public GenericMessage {
|
||||
private:
|
||||
std::wstring m_message;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
public:
|
||||
NotifyInstantMessage( std::wstring chatHandle, std::wstring message );
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
14
Include/Network/Event/NotifyReserveUserSlot_RTA.h
Normal file
14
Include/Network/Event/NotifyReserveUserSlot_RTA.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.h"
|
||||
|
||||
class NotifyReserveUserSlot_RTA : public GenericMessage {
|
||||
private:
|
||||
std::string m_discoveryAddr;
|
||||
int32_t m_port;
|
||||
int32_t m_memberId;
|
||||
|
||||
public:
|
||||
NotifyReserveUserSlot_RTA( int32_t memberId, std::string discoveryAddr, int32_t discoveryPort );
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
14
Include/Network/Event/NotifyRoomMessage.hpp
Normal file
14
Include/Network/Event/NotifyRoomMessage.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.hpp"
|
||||
|
||||
class NotifyRoomMessage : public GenericMessage {
|
||||
private:
|
||||
std::wstring m_message;
|
||||
std::wstring m_chatHandle;
|
||||
std::wstring m_roomName;
|
||||
|
||||
public:
|
||||
NotifyRoomMessage( std::wstring roomName, std::wstring chatHandle, std::wstring message );
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
11
Include/Network/Event/Notify_4C.h
Normal file
11
Include/Network/Event/Notify_4C.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.h"
|
||||
|
||||
class Notify_4C : public GenericMessage {
|
||||
private:
|
||||
|
||||
public:
|
||||
Notify_4C();
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
14
Include/Network/Event/Notify_65.h
Normal file
14
Include/Network/Event/Notify_65.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetMessage.h"
|
||||
|
||||
class NotifyClientRequestsConnect2 : public GenericMessage {
|
||||
private:
|
||||
std::string m_discoveryAddr;
|
||||
std::string m_localAddr;
|
||||
int32_t m_port;
|
||||
|
||||
public:
|
||||
NotifyClientRequestsConnect2( std::string discoveryAddr, std::string localAddr, int32_t port );
|
||||
ByteBuffer &Serialize() override;
|
||||
};
|
||||
40
Include/Network/Event/RequestAddFriend.hpp
Normal file
40
Include/Network/Event/RequestAddFriend.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestAddFriend : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
DATABASE_ERROR = 2,
|
||||
FRIEND_IGNORING = 19,
|
||||
FRIEND_INVALID = 20,
|
||||
FRIEND_DUPLICATE = 21,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< RequestAddFriend > Create()
|
||||
{
|
||||
return std::make_unique< RequestAddFriend >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultAddFriend : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultAddFriend( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
41
Include/Network/Event/RequestAddIgnore.hpp
Normal file
41
Include/Network/Event/RequestAddIgnore.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestAddIgnore : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
DATABASE_ERROR = 2,
|
||||
IGNORE_INVALID = 20,
|
||||
IGNORE_FRIEND = 24,
|
||||
IGNORE_DUPLICATE = 25,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestAddIgnore > Create()
|
||||
{
|
||||
return std::make_unique< RequestAddIgnore >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultAddIgnore : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultAddIgnore( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
37
Include/Network/Event/RequestAppendCharacterData.hpp
Normal file
37
Include/Network/Event/RequestAppendCharacterData.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestAppendCharacterData : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::vector< uint8_t > m_data;
|
||||
int32_t m_endOfData;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< RequestAppendCharacterData > Create()
|
||||
{
|
||||
return std::make_unique< RequestAppendCharacterData >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultAppendCharacterData : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultAppendCharacterData( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
28
Include/Network/Event/RequestCancelGame.hpp
Normal file
28
Include/Network/Event/RequestCancelGame.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCancelGame : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCancelGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestCancelGame >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCancelGame : public GenericResponse {
|
||||
public:
|
||||
ResultCancelGame( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
28
Include/Network/Event/RequestCancelGame_RTA.hpp
Normal file
28
Include/Network/Event/RequestCancelGame_RTA.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCancelGame_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCancelGame_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestCancelGame_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCancelGame_RTA : public GenericResponse {
|
||||
public:
|
||||
ResultCancelGame_RTA( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
46
Include/Network/Event/RequestCreateAccount.hpp
Normal file
46
Include/Network/Event/RequestCreateAccount.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreateAccount : public GenericRequest
|
||||
{
|
||||
private:
|
||||
enum CREATE_ACCOUNT_REPLY {
|
||||
SUCCESS = 0,
|
||||
ERROR_FATAL,
|
||||
ERROR_NOT_EXIST
|
||||
};
|
||||
|
||||
std::wstring m_username;
|
||||
std::wstring m_password;
|
||||
std::wstring m_emailAddress;
|
||||
std::wstring m_dateOfBirth;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
bool VerifyUserData();
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreateAccount > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreateAccount >();
|
||||
}
|
||||
|
||||
CREATE_ACCOUNT_REPLY m_reply;
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCreateAccount : public GenericResponse {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultCreateAccount( GenericRequest *request, int32_t reply, std::wstring sessionId );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
38
Include/Network/Event/RequestCreateNewCharacter_RTA.hpp
Normal file
38
Include/Network/Event/RequestCreateNewCharacter_RTA.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/RealmCharacter.hpp"
|
||||
|
||||
class RequestCreateNewCharacter_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
CharacterSlotData m_metaData;
|
||||
std::vector< uint8_t > m_characterData;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreateNewCharacter_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreateNewCharacter_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCreateNewCharacter_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultCreateNewCharacter_RTA( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
42
Include/Network/Event/RequestCreatePrivateGame.hpp
Normal file
42
Include/Network/Event/RequestCreatePrivateGame.hpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreatePrivateGame : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameName;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
GAME_NAME_IN_USE = 38,
|
||||
GAME_PENDING = 40,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreatePrivateGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreatePrivateGame >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCreatePrivateGame : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultCreatePrivateGame( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
45
Include/Network/Event/RequestCreatePrivateGame_RTA.hpp
Normal file
45
Include/Network/Event/RequestCreatePrivateGame_RTA.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <array>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreatePrivateGame_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameName;
|
||||
std::string m_localAddr;
|
||||
int32_t m_localPort;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
GAME_NAME_IN_USE = 38,
|
||||
GAME_PENDING = 40,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreatePrivateGame_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreatePrivateGame_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCreatePrivateGame_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultCreatePrivateGame_RTA( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
29
Include/Network/Event/RequestCreatePrivateRoom.hpp
Normal file
29
Include/Network/Event/RequestCreatePrivateRoom.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreatePrivateRoom : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_roomName;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreatePrivateRoom > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreatePrivateRoom >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultCreatePrivateRoom : public GenericResponse {
|
||||
public:
|
||||
ResultCreatePrivateRoom( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
48
Include/Network/Event/RequestCreatePublicGame.hpp
Normal file
48
Include/Network/Event/RequestCreatePublicGame.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreatePublicGame : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameInfo;
|
||||
std::wstring m_gameName;
|
||||
std::wstring m_stageName;
|
||||
|
||||
int32_t m_minimumLevel;
|
||||
int32_t m_maximumLevel;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
GAME_NAME_IN_USE = 38,
|
||||
GAME_PENDING = 40,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreatePublicGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreatePublicGame >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
|
||||
std::tuple< std::wstring, std::wstring > ParseNameAndStage( const std::wstring &gameInfo );
|
||||
};
|
||||
|
||||
class ResultCreatePublicGame : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultCreatePublicGame( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
48
Include/Network/Event/RequestCreatePublicGame_RTA.hpp
Normal file
48
Include/Network/Event/RequestCreatePublicGame_RTA.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <array>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestCreatePublicGame_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameInfo;
|
||||
std::wstring m_gameName;
|
||||
std::string m_localAddr;
|
||||
int32_t m_localPort;
|
||||
|
||||
std::array< int8_t, 5 > m_attributes;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
GAME_NAME_IN_USE = 38,
|
||||
GAME_PENDING = 40,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestCreatePublicGame_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestCreatePublicGame_RTA >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
bool ParseGameInfo();
|
||||
};
|
||||
|
||||
class ResultCreatePublicGame_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultCreatePublicGame_RTA( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
40
Include/Network/Event/RequestDoClientDiscovery.hpp
Normal file
40
Include/Network/Event/RequestDoClientDiscovery.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestDoClientDiscovery : public GenericRequest
|
||||
{
|
||||
private:
|
||||
enum DISCOVERY_REPLY {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR = 1,
|
||||
GAME_FULL = 2,
|
||||
};
|
||||
|
||||
std::wstring m_sessionId;
|
||||
int32_t m_gameId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestDoClientDiscovery > Create()
|
||||
{
|
||||
return std::make_unique< RequestDoClientDiscovery >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultDoClientDiscovery : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIP;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultDoClientDiscovery( GenericRequest *request, int32_t reply, std::string ip = "", int32_t port = 0);
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
41
Include/Network/Event/RequestDoClientDiscovery_RTA.hpp
Normal file
41
Include/Network/Event/RequestDoClientDiscovery_RTA.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestDoClientDiscovery_RTA : public GenericRequest {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_localAddr;
|
||||
int32_t m_localPort;
|
||||
|
||||
uint32_t m_gameId;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
TIMEOUT,
|
||||
NOT_FOUND
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestDoClientDiscovery_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestDoClientDiscovery_RTA >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultDoClientDiscovery_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::string m_discoveryIp;
|
||||
int32_t m_discoveryPort;
|
||||
|
||||
public:
|
||||
ResultDoClientDiscovery_RTA( GenericRequest *request, int32_t reply, std::string discoveryIp = "", int32_t discoveryPort = 0);
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
39
Include/Network/Event/RequestEnterRoom.hpp
Normal file
39
Include/Network/Event/RequestEnterRoom.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/ChatRoomSession.hpp"
|
||||
|
||||
class RequestEnterRoom : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_roomName;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
GENERAL_ERROR
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestEnterRoom > Create()
|
||||
{
|
||||
return std::make_unique< RequestEnterRoom >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultEnterRoom : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
sptr_chat_room_session m_room;
|
||||
|
||||
public:
|
||||
ResultEnterRoom( GenericRequest *request, int32_t reply, sptr_chat_room_session room );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
46
Include/Network/Event/RequestGetCharacterData_RTA.hpp
Normal file
46
Include/Network/Event/RequestGetCharacterData_RTA.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/RealmCharacter.hpp"
|
||||
|
||||
class RequestGetNetCharacterData_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
int32_t m_characterId;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetNetCharacterData_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetNetCharacterData_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
|
||||
sptr_generic_response SendCharacterData(sptr_socket socket, sptr_realm_character data);
|
||||
};
|
||||
|
||||
class ResultGetNetCharacterData_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
int32_t m_endOfData;
|
||||
std::vector< uint8_t > m_chunk;
|
||||
|
||||
public:
|
||||
ResultGetNetCharacterData_RTA( GenericRequest *request, int32_t reply,
|
||||
std::optional< std::vector< uint8_t > > data = std::nullopt,
|
||||
std::optional < int32_t > endOfData = std::nullopt );
|
||||
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
27
Include/Network/Event/RequestGetEncryptionKey.hpp
Normal file
27
Include/Network/Event/RequestGetEncryptionKey.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestGetEncryptionKey : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetEncryptionKey > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetEncryptionKey >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetEncryptionKey : public GenericResponse {
|
||||
public:
|
||||
std::vector< uint8_t > m_symKey;
|
||||
|
||||
ResultGetEncryptionKey( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
25
Include/Network/Event/RequestGetFriendList.h
Normal file
25
Include/Network/Event/RequestGetFriendList.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.h"
|
||||
#include "../GenericNetResponse.h"
|
||||
|
||||
class RequestGetFriendList : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetFriendList > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetFriendList >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetFriendList : public GenericResponse {
|
||||
public:
|
||||
ResultGetFriendList( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
37
Include/Network/Event/RequestGetGame.hpp
Normal file
37
Include/Network/Event/RequestGetGame.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestGetGame : public GenericRequest {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameName;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
TIMEOUT,
|
||||
NOT_FOUND
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetGame >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetGame : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
int32_t m_gameId;
|
||||
|
||||
public:
|
||||
ResultGetGame( GenericRequest *request, int32_t reply, int32_t gameId = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
41
Include/Network/Event/RequestGetGame_RTA.hpp
Normal file
41
Include/Network/Event/RequestGetGame_RTA.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestGetGame_RTA : public GenericRequest {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_gameName;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
TIMEOUT,
|
||||
NOT_FOUND
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetGame_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetGame_RTA >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetGame_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
int32_t m_gameId;
|
||||
|
||||
std::wstring m_discoveryAddr;
|
||||
std::wstring m_localAddr;
|
||||
int32_t m_port;
|
||||
|
||||
public:
|
||||
ResultGetGame_RTA( GenericRequest *request, int32_t reply, int32_t gameId = -1, std::string discoveryAddr = "", std::string localAddr = "", int32_t discoveryPort = 0 );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
39
Include/Network/Event/RequestGetNetCharacterList_RTA.hpp
Normal file
39
Include/Network/Event/RequestGetNetCharacterList_RTA.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
#include "Game/RealmCharacterMetaKV.hpp"
|
||||
|
||||
class RequestGetNetCharacterList_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetNetCharacterList_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetNetCharacterList_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetNetCharacterList_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
std::map< uint32_t, CharacterSlotData > m_characterList;
|
||||
|
||||
public:
|
||||
ResultGetNetCharacterList_RTA( GenericRequest *request, int32_t reply, std::optional< std::map< uint32_t, CharacterSlotData > > list );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
30
Include/Network/Event/RequestGetPublicRooms.hpp
Normal file
30
Include/Network/Event/RequestGetPublicRooms.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/ChatRoomSession.hpp"
|
||||
|
||||
class RequestGetPublicRooms : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetPublicRooms > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetPublicRooms >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetPublicRooms : public GenericResponse {
|
||||
private:
|
||||
std::vector< sptr_chat_room_session > m_rooms;
|
||||
|
||||
public:
|
||||
ResultGetPublicRooms( GenericRequest *request, std::vector< sptr_chat_room_session > rooms );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
24
Include/Network/Event/RequestGetRealmStats.hpp
Normal file
24
Include/Network/Event/RequestGetRealmStats.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestGetRealmStats : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetRealmStats > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetRealmStats >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetRealmStats : public GenericResponse {
|
||||
public:
|
||||
ResultGetRealmStats( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
39
Include/Network/Event/RequestGetRoom.hpp
Normal file
39
Include/Network/Event/RequestGetRoom.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/ChatRoomSession.hpp"
|
||||
|
||||
class RequestGetRoom : public GenericRequest {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_roomName;
|
||||
|
||||
enum CREATE_ACCOUNT_REPLY {
|
||||
SUCCESS = 0,
|
||||
GENERAL_ERROR = 1,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetRoom > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetRoom >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetRoom : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
sptr_chat_room_session m_room;
|
||||
|
||||
public:
|
||||
ResultGetRoom( GenericRequest *request, int32_t reply, sptr_chat_room_session room = nullptr );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
31
Include/Network/Event/RequestGetRules.hpp
Normal file
31
Include/Network/Event/RequestGetRules.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestGetRules : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::string m_language;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestGetRules > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetRules >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetRules : public GenericResponse {
|
||||
private:
|
||||
std::wstring m_rules;
|
||||
|
||||
public:
|
||||
ResultGetRules( GenericRequest *request, std::wstring rules );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
29
Include/Network/Event/RequestGetServerAddress.hpp
Normal file
29
Include/Network/Event/RequestGetServerAddress.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
#include "Common/Constant.hpp"
|
||||
|
||||
class RequestGetServerAddress : public GenericRequest {
|
||||
public:
|
||||
static std::unique_ptr< RequestGetServerAddress > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetServerAddress >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetServerAddress : public GenericResponse {
|
||||
public:
|
||||
std::string m_ip;
|
||||
int32_t m_port;
|
||||
RealmGameType m_gameType;
|
||||
|
||||
ResultGetServerAddress( GenericRequest *request, std::string ip, int32_t port, RealmGameType clientType );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
30
Include/Network/Event/RequestGetSocialListInitial.hpp
Normal file
30
Include/Network/Event/RequestGetSocialListInitial.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class RequestGetSocialListInitial : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetSocialListInitial > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetSocialListInitial >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetSocialListInitial : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
sptr_user m_user;
|
||||
|
||||
public:
|
||||
ResultGetSocialListInitial( GenericRequest *request, sptr_user user = nullptr );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
30
Include/Network/Event/RequestGetSocialListUpdate.hpp
Normal file
30
Include/Network/Event/RequestGetSocialListUpdate.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
#include "Common/ForwardDecl.hpp"
|
||||
|
||||
class RequestGetSocialListUpdate : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestGetSocialListUpdate > Create()
|
||||
{
|
||||
return std::make_unique< RequestGetSocialListUpdate >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultGetSocialListUpdate : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
sptr_user m_user;
|
||||
|
||||
public:
|
||||
ResultGetSocialListUpdate( GenericRequest *request, sptr_user user = nullptr );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
36
Include/Network/Event/RequestLeaveRoom.hpp
Normal file
36
Include/Network/Event/RequestLeaveRoom.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestLeaveRoom : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_roomName;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
GENERAL_ERROR
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestLeaveRoom > Create()
|
||||
{
|
||||
return std::make_unique< RequestLeaveRoom >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultLeaveRoom : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultLeaveRoom( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
43
Include/Network/Event/RequestLogin.hpp
Normal file
43
Include/Network/Event/RequestLogin.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestLogin : public GenericRequest
|
||||
{
|
||||
private:
|
||||
enum LOGIN_REPLY {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
ACCOUNT_INVALID = 4,
|
||||
};
|
||||
|
||||
std::wstring m_username;
|
||||
std::wstring m_password;
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestLogin > Create()
|
||||
{
|
||||
return std::make_unique< RequestLogin >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
|
||||
sptr_generic_response ProcessLoginCON( sptr_user user );
|
||||
sptr_generic_response ProcessLoginRTA( sptr_user user );
|
||||
};
|
||||
|
||||
class ResultLogin : public GenericResponse {
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultLogin( GenericRequest *request, int32_t reply, std::wstring sessionId );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
29
Include/Network/Event/RequestLogout.hpp
Normal file
29
Include/Network/Event/RequestLogout.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestLogout : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestLogout > Create()
|
||||
{
|
||||
return std::make_unique< RequestLogout >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultLogout : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
public:
|
||||
ResultLogout( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
28
Include/Network/Event/RequestMatchGame.hpp
Normal file
28
Include/Network/Event/RequestMatchGame.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestMatchGame : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestMatchGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestMatchGame >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultMatchGame : public GenericResponse {
|
||||
private:
|
||||
std::string m_userIp;
|
||||
|
||||
public:
|
||||
ResultMatchGame( GenericRequest *request, std::string userIp );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
28
Include/Network/Event/RequestMatchGame_RTA.hpp
Normal file
28
Include/Network/Event/RequestMatchGame_RTA.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestMatchGame_RTA : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< RequestMatchGame_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestMatchGame_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultMatchGame_RTA : public GenericResponse {
|
||||
private:
|
||||
std::string m_userIp;
|
||||
|
||||
public:
|
||||
ResultMatchGame_RTA( GenericRequest *request, std::string userIp );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
40
Include/Network/Event/RequestRemoveFriend.hpp
Normal file
40
Include/Network/Event/RequestRemoveFriend.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestRemoveFriend : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
DATABASE_ERROR = 2,
|
||||
FRIEND_IGNORING = 19,
|
||||
FRIEND_INVALID = 20,
|
||||
FRIEND_DUPLICATE = 21,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< RequestRemoveFriend > Create()
|
||||
{
|
||||
return std::make_unique< RequestRemoveFriend >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultRemoveFriend : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultRemoveFriend( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
41
Include/Network/Event/RequestRemoveIgnore.hpp
Normal file
41
Include/Network/Event/RequestRemoveIgnore.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestRemoveIgnore : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_chatHandle;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
DATABASE_ERROR = 2,
|
||||
IGNORE_INVALID = 20,
|
||||
IGNORE_FRIEND = 24,
|
||||
IGNORE_DUPLICATE = 25,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestRemoveIgnore > Create()
|
||||
{
|
||||
return std::make_unique< RequestRemoveIgnore >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultRemoveIgnore : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultRemoveIgnore( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
41
Include/Network/Event/RequestSaveCharacter_RTA.hpp
Normal file
41
Include/Network/Event/RequestSaveCharacter_RTA.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/RealmCharacter.hpp"
|
||||
|
||||
class RequestSaveCharacter_RTA : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_memberSessionId;
|
||||
uint32_t m_targetCharacterId;
|
||||
|
||||
CharacterSlotData m_metaData;
|
||||
std::vector< uint8_t > m_characterData;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestSaveCharacter_RTA > Create()
|
||||
{
|
||||
return std::make_unique< RequestSaveCharacter_RTA >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultSaveCharacter_RTA : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultSaveCharacter_RTA( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
38
Include/Network/Event/RequestSendInstantMessage.hpp
Normal file
38
Include/Network/Event/RequestSendInstantMessage.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestSendInstantMessage : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_chatHandle;
|
||||
std::wstring m_message;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
GENERAL_ERROR,
|
||||
USER_IGNORED = 19,
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestSendInstantMessage > Create()
|
||||
{
|
||||
return std::make_unique< RequestSendInstantMessage >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultSendInstantMessage : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultSendInstantMessage( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
37
Include/Network/Event/RequestSendRoomMessage.hpp
Normal file
37
Include/Network/Event/RequestSendRoomMessage.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestSendRoomMessage : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_roomName;
|
||||
std::wstring m_message;
|
||||
|
||||
enum REPLY {
|
||||
SUCCESS = 0,
|
||||
GENERAL_ERROR
|
||||
};
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestSendRoomMessage > Create()
|
||||
{
|
||||
return std::make_unique< RequestSendRoomMessage >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultSendRoomMessage : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultSendRoomMessage( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
36
Include/Network/Event/RequestStartGame.hpp
Normal file
36
Include/Network/Event/RequestStartGame.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestStartGame : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::vector< uint8_t > m_data;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< RequestStartGame > Create()
|
||||
{
|
||||
return std::make_unique< RequestStartGame >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultStartGame : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultStartGame( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
27
Include/Network/Event/RequestTouchSession.hpp
Normal file
27
Include/Network/Event/RequestTouchSession.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestTouchSession : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestTouchSession > Create()
|
||||
{
|
||||
return std::make_unique< RequestTouchSession >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultTouchSession : public GenericResponse {
|
||||
public:
|
||||
ResultTouchSession( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
31
Include/Network/Event/RequestUpdateGameData.hpp
Normal file
31
Include/Network/Event/RequestUpdateGameData.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
#include "Game/GameSession.hpp"
|
||||
|
||||
class RequestUpdateGameData : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::string m_gameData;
|
||||
|
||||
public:
|
||||
static std::unique_ptr< RequestUpdateGameData > Create()
|
||||
{
|
||||
return std::make_unique< RequestUpdateGameData >();
|
||||
}
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
bool ParseGameData( sptr_game_session session );
|
||||
};
|
||||
|
||||
class ResultUpdateGameData : public GenericResponse {
|
||||
public:
|
||||
ResultUpdateGameData( GenericRequest *request );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
37
Include/Network/Event/RequestUserJoinSuccess.hpp
Normal file
37
Include/Network/Event/RequestUserJoinSuccess.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.hpp"
|
||||
#include "../GenericNetResponse.hpp"
|
||||
|
||||
class RequestUserJoinSuccess : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_ownerSessionId;
|
||||
|
||||
enum ERROR_CODE {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< RequestUserJoinSuccess > Create()
|
||||
{
|
||||
return std::make_unique< RequestUserJoinSuccess >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class ResultUserJoinSuccess : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
ResultUserJoinSuccess( GenericRequest *request, int32_t reply );
|
||||
void Serialize( ByteBuffer &out ) const;
|
||||
};
|
||||
37
Include/Network/Event/Request_5F.h
Normal file
37
Include/Network/Event/Request_5F.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.h"
|
||||
#include "../GenericNetResponse.h"
|
||||
|
||||
class Request_5F : public GenericRequest
|
||||
{
|
||||
private:
|
||||
std::wstring m_sessionId;
|
||||
std::wstring m_memberSessionId;
|
||||
|
||||
enum CREATE_REPLY {
|
||||
SUCCESS = 0,
|
||||
FATAL_ERROR,
|
||||
GENERAL_ERROR,
|
||||
};
|
||||
public:
|
||||
static std::unique_ptr< Request_5F > Create()
|
||||
{
|
||||
return std::make_unique< Request_5F >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class Result_5F : public GenericResponse {
|
||||
private:
|
||||
int32_t m_reply;
|
||||
|
||||
public:
|
||||
Result_5F( GenericRequest *request, int32_t reply );
|
||||
ByteBuffer &Serialize();
|
||||
};
|
||||
25
Include/Network/Event/Request_61.h
Normal file
25
Include/Network/Event/Request_61.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "../GenericNetRequest.h"
|
||||
#include "../GenericNetResponse.h"
|
||||
|
||||
class Request_61 : public GenericRequest
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr< Request_61 > Create()
|
||||
{
|
||||
return std::make_unique< Request_61 >();
|
||||
}
|
||||
|
||||
sptr_generic_response ProcessRequest( sptr_socket socket, sptr_byte_stream stream ) override;
|
||||
void Deserialize( sptr_byte_stream stream ) override;
|
||||
};
|
||||
|
||||
class Result_61 : public GenericResponse {
|
||||
public:
|
||||
Result_61( GenericRequest *request );
|
||||
ByteBuffer &Serialize();
|
||||
};
|
||||
Reference in New Issue
Block a user