Subversion Repositories Projects

Rev

Rev 391 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 KeyOz 1
 
2
/***************************************************************************
3
 *   Copyright (C) 2008-2009 by Manuel Schrape                             *
4
 *   manuel.schrape@gmx.de                                                 *
5
 *                                                                         *
6
 *   This program is free software; you can redistribute it and/or modify  *
7
 *   it under the terms of the GNU General Public License as published by  *
8
 *   the Free Software Foundation; either version 2 of the License.        *
9
 *                                                                         *
10
 *   This program is distributed in the hope that it will be useful,       *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 *   GNU General Public License for more details.                          *
14
 *                                                                         *
15
 *   You should have received a copy of the GNU General Public License     *
16
 *   along with this program; if not, write to the                         *
17
 *   Free Software Foundation, Inc.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
20
#ifndef CQMK_SERVER_H
21
#define CQMK_SERVER_H
22
 
23
#include <QString>
24
#include <QTcpSocket>
25
#include <QStringList>
26
 
27
#include "../global.h"
28
 
29
class cQMK_Server : public QObject
30
{
31
    Q_OBJECT
32
 
33
    public:
34
        cQMK_Server();
35
        void Connect(QString IP, int Port, QString User, QString Pass);
36
        void Disconnect();
440 Brean 37
        void NewPosition(sNaviData Pos);
272 KeyOz 38
        void send_RawData(QString Data);
227 KeyOz 39
 
40
    private:
41
        //TCP-Socket
42
        QTcpSocket *TcpSocket;
43
        QString Username;
44
        QString Password;
45
        void SendData(int CMD, QString Data);
46
 
47
    private slots:
48
        void slot_Connected();
49
        void slot_Disconnect();
50
        void slot_ReadLine();
51
        void slot_Error(QAbstractSocket::SocketError Error);
52
 
53
    signals:
54
        void sig_Connected();
55
        void sig_Disconnected(int Error);
56
};
57
 
58
#endif // CQMK_SERVER_H