MrHyde
Défi DVP 2
servernode.h
Go to the documentation of this file.
00001 #ifndef SERVERNODE_H
00002 #define SERVERNODE_H
00003 
00004 #include <QObject>
00005 #include <QTcpSocket>
00006 #include <QtGui/QImage>
00007 #include <QBuffer>
00008 #include <QStringList>
00009 #include "sql.h"
00010 
00011 
00012 QT_BEGIN_NAMESPACE
00013 //class QTcpSocket;
00014 class QTextStream;
00015 class QDataStream;
00016 QT_END_NAMESPACE
00017 
00018 class ServerNode : public QObject
00019 {
00020     Q_OBJECT
00021 public:
00022     explicit ServerNode(QObject *parent, QTcpSocket *socket, Sql *db);
00023 
00024 signals:
00025 //    void messageReceived(const QString &msg);
00026 
00027 public slots:
00028     void readString();
00029     void readMessage();
00030     void sendString(const QString &msg);
00031     void sendStringList(const QStringList &msgList);
00032     void sendImage(const QImage &img);
00033     void sendDefaultImage();
00034 
00035 
00036 private:
00037     void interpretCommandAndAnswer(const QString uniqueId, const QString &cmd, const QStringList &msgList);
00038     QTcpSocket *tcpSocket;
00039     Sql *sql;
00040 
00041 };
00042 
00043 #endif // SERVERNODE_H
 All Classes Files Functions Variables