2023-01-02 13:17:18 -06:00
|
|
|
#ifndef NET_CONNECTION_CLIENT_CONNECTION_HPP
|
|
|
|
|
#define NET_CONNECTION_CLIENT_CONNECTION_HPP
|
|
|
|
|
|
|
|
|
|
#include "net/connection/RealmConnection.hpp"
|
|
|
|
|
#include "net/Types.hpp"
|
|
|
|
|
|
|
|
|
|
class RealmResponse;
|
|
|
|
|
|
|
|
|
|
class ClientConnection : public RealmConnection {
|
|
|
|
|
public:
|
|
|
|
|
// Member variables
|
2023-02-18 16:32:27 -06:00
|
|
|
int32_t m_connected = 0;
|
2023-01-02 13:17:18 -06:00
|
|
|
int32_t m_statusComplete = 1;
|
|
|
|
|
int32_t m_statusResult = 1;
|
|
|
|
|
WOWCS_OPS m_statusCop = COP_NONE;
|
|
|
|
|
int32_t m_errorCode = 0;
|
|
|
|
|
void (*m_cleanup)() = nullptr;
|
|
|
|
|
|
|
|
|
|
// Member functions
|
|
|
|
|
ClientConnection(RealmResponse* realmResponse)
|
|
|
|
|
: RealmConnection(realmResponse)
|
|
|
|
|
{};
|
2023-04-03 23:34:31 -05:00
|
|
|
void AccountLogin_Finish(int32_t authResult);
|
|
|
|
|
void AccountLogin_Queued();
|
2023-01-02 13:17:18 -06:00
|
|
|
void Cancel(int32_t errorCode);
|
|
|
|
|
void Cleanup();
|
2023-04-03 23:34:31 -05:00
|
|
|
void Complete(int32_t result, int32_t errorCode);
|
2023-01-02 13:17:18 -06:00
|
|
|
void Connect();
|
2023-02-18 16:32:27 -06:00
|
|
|
int32_t Disconnect();
|
2023-04-03 23:34:31 -05:00
|
|
|
void Initiate(WOWCS_OPS op, int32_t errorCode, void (*cleanup)());
|
2023-02-18 16:32:27 -06:00
|
|
|
int32_t IsConnected();
|
2023-02-11 23:35:53 -06:00
|
|
|
int32_t PollStatus(WOWCS_OPS& op, const char** msg, int32_t& result, int32_t& errorCode);
|
2023-01-02 13:17:18 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|