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:
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;
|
||||
};
|
||||
Reference in New Issue
Block a user