diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-11-02 20:45:59 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-11-02 20:45:59 +0000 |
| commit | aaf9850c8350e3d7d20a91d3fe4e026576a7a032 (patch) | |
| tree | 057886bdd08237a01cf928b5c49e111de6e13128 /signet/Table.cpp | |
| parent | bde34fad26d6510c18b1adb49b992a90879ee4d2 (diff) | |
| download | sigen-aaf9850c8350e3d7d20a91d3fe4e026576a7a032.tar.gz sigen-aaf9850c8350e3d7d20a91d3fe4e026576a7a032.tar.xz sigen-aaf9850c8350e3d7d20a91d3fe4e026576a7a032.zip | |
[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
Diffstat (limited to 'signet/Table.cpp')
| -rw-r--r-- | signet/Table.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
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 <QtNetwork/QTcpSocket> + 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); } |
