Launcher support added. Still missing UCS but thinking about maybe rewriting it completely

This commit is contained in:
KimLS
2017-01-05 22:25:01 -08:00
parent f6ca59fbc6
commit b7c5de144a
9 changed files with 209 additions and 298 deletions
+15 -11
View File
@@ -18,8 +18,10 @@
#ifndef LAUNCHERLINK_H_
#define LAUNCHERLINK_H_
#include "../common/emu_tcp_connection.h"
#include "../common/timer.h"
#include "../net/servertalk_server_connection.h"
#include "../event/timer.h"
#include <memory>
#include <string>
#include <vector>
#include <map>
@@ -28,21 +30,22 @@ class ServerPacket;
class LauncherLink {
public:
LauncherLink(int id, EmuTCPConnection *tcpc);
LauncherLink(int id, std::shared_ptr<EQ::Net::ServertalkServerConnection> tcpc);
~LauncherLink();
bool Process();
bool SendPacket(ServerPacket* pack) { return tcpc->SendPacket(pack); }
// bool SendPacket(TCPConnection::TCPNetPacket_Struct* tnps) { return tcpc->SendPacket(tnps); }
void Process(EQ::Timer *t);
void ProcessMessage(uint16 opcode, EQ::Net::Packet &p);
void SendPacket(ServerPacket* pack) { tcpc->SendPacket(pack); }
int GetID() const { return(ID); }
void Disconnect() { tcpc->Disconnect(); }
void Disconnect() { if (tcpc->Handle()) { tcpc->Handle()->Disconnect(); } }
inline bool HasName() const { return(m_name.length() > 0); }
inline uint32 GetIP() const { return tcpc->GetrIP(); }
inline uint16 GetPort() const { return tcpc->GetrPort(); }
inline bool HasName() const { return(m_name.length() > 0); }
inline std::string GetIP() const { return tcpc->Handle() ? tcpc->Handle()->RemoteIP() : 0; }
inline uint16 GetPort() const { return tcpc->Handle() ? tcpc->Handle()->RemotePort() : 0; }
inline std::string GetUUID() const { return tcpc->GetUUID(); }
inline const char * GetName() const { return(m_name.c_str()); }
inline int CountZones() const { return(m_states.size()); }
inline int CountZones() const { return(m_states.size()); }
bool ContainsZone(const char *short_name) const;
@@ -60,7 +63,8 @@ public:
protected:
const int ID;
EmuTCPConnection*const tcpc;
std::shared_ptr<EQ::Net::ServertalkServerConnection> tcpc;
std::unique_ptr<EQ::Timer> m_process_timer;
bool authenticated;
std::string m_name;
Timer m_bootTimer;