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