From aaf9850c8350e3d7d20a91d3fe4e026576a7a032 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 2 Nov 2008 20:45:59 +0000 Subject: [FIX] Defined the *_IMPORT defines for libraries [FIX] Added more packet types [FIX] Sectioned off packet types [FIX] ConnectionHandler is now ClientHandler [ADD] Added a ProgressMeter class for allowing display of progress of packets git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@296 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- signet/Table.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'signet/Table.cpp') diff --git a/signet/Table.cpp b/signet/Table.cpp index 1296e825..5cd6373d 100644 --- a/signet/Table.cpp +++ b/signet/Table.cpp @@ -18,18 +18,25 @@ // Header include #include "Table.h" +// Protocol includes +#include "protocol/PacketMaker.h" + +// Qt includes +#include + Signet::Table::Table(const QString& name, QObject* parent) : - ConnectionHandler(parent), + ClientHandler(parent), m_name(name) { } -QString Signet::Table::type() const -{ - return "table"; -} - -QString Signet::Table::name() const +void Signet::Table::packetReceived(QTcpSocket* client, Protocol::Packet* packet) { - return m_name; + QString receiver = packet->received(); + if (receiver.isEmpty()) + { + // TODO: Handle the packet + } + else + Protocol::PacketMaker::unknownReceiver(client); } -- cgit