Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
801 - 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#ifndef INPUT_H
20
#define INPUT_H
21
 
22
#include <QObject>
23
 
24
enum eMode {NONE, TCP, TTY};
25
 
26
struct set_Input
27
{
28
    QString Main;
29
    QString Sub;
30
};
31
 
32
struct s_Resend
33
{
34
    bool ID;
35
    QString Data;
36
};
37
 
38
static const int CLOSED       = 0;
39
static const int REFUSED      = 1;
40
static const int REMOTECLOSED = 2;
41
 
42
static const int MAX_Confirm = 11;
43
 
44
class Input : public QObject
45
{
46
    Q_OBJECT
47
 
48
    public:
49
        virtual void Init();
50
        virtual bool Open(set_Input s_Input);
51
        virtual bool IsOpen();
52
        virtual bool Close();
53
        virtual void send_Data(QString t_Data, int ID = 0);
54
        virtual void send_RawData(char *t_Data);
55
        virtual void stop_Resend(int ID);
56
        virtual eMode Mode();
57
 
58
    signals:
59
        virtual void sig_NewData(QString Data);
60
 
61
//    private:
62
 
63
};
64
 
65
#endif // INPUT_H