restructured protocol code

This commit is contained in:
Max-Wilhelm Bruker 2009-11-29 03:07:28 +01:00
parent 122f8ea916
commit 694070724c
32 changed files with 1202 additions and 2081 deletions

View file

@ -28,6 +28,7 @@ class Servatrice;
class QXmlStreamReader;
class QXmlStreamWriter;
class DeckList;
class TopLevelProtocolItem;
class ServerSocketInterface : public Server_ProtocolHandler
{
@ -35,12 +36,13 @@ class ServerSocketInterface : public Server_ProtocolHandler
private slots:
void readClient();
void catchSocketError(QAbstractSocket::SocketError socketError);
void processProtocolItem(ProtocolItem *item);
private:
Servatrice *servatrice;
QTcpSocket *socket;
QXmlStreamWriter *xmlWriter;
QXmlStreamReader *xmlReader;
ProtocolItem *currentItem;
TopLevelProtocolItem *topLevelItem;
int getDeckPathId(int basePathId, QStringList path);
int getDeckPathId(const QString &path);
@ -53,8 +55,6 @@ private:
ResponseCode cmdDeckUpload(Command_DeckUpload *cmd);
DeckList *getDeckFromDatabase(int deckId);
ResponseCode cmdDeckDownload(Command_DeckDownload *cmd);
void itemFinishedReading();
public:
ServerSocketInterface(Servatrice *_server, QTcpSocket *_socket, QObject *parent = 0);
~ServerSocketInterface();