Go to most recent revision | Details | 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(); |
||
37 | void NewPosition(sNaviString Pos); |
||
38 | |||
39 | private: |
||
40 | //TCP-Socket |
||
41 | QTcpSocket *TcpSocket; |
||
42 | QString Username; |
||
43 | QString Password; |
||
44 | void SendData(int CMD, QString Data); |
||
45 | |||
46 | private slots: |
||
47 | void slot_Connected(); |
||
48 | void slot_Disconnect(); |
||
49 | void slot_ReadLine(); |
||
50 | void slot_Error(QAbstractSocket::SocketError Error); |
||
51 | |||
52 | signals: |
||
53 | void sig_Connected(); |
||
54 | void sig_Disconnected(int Error); |
||
55 | }; |
||
56 | |||
57 | #endif // CQMK_SERVER_H |