~chasedouglas/rinput/trunk

« back to all changes in this revision

Viewing changes to rinput-test/Client.h

  • Committer: Chase
  • Date: 2010-02-24 22:16:45 UTC
  • Revision ID: cndougla@cndougla-ubuntu-20100224221645-1wssa2p4577d85ao
Massive cleanup, including removing all packaging and rinput-test
materials.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2009 Chase Douglas
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License version 2 as published
6
 
 * by the Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful,
9
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 * GNU General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU General Public License along
14
 
 * with this program; if not, write to the Free Software Foundation, Inc.,
15
 
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
 
 *
17
 
 * In addition, as a special exception, the copyright holders give
18
 
 * permission to link the code of portions of this program with the
19
 
 * OpenSSL library under certain conditions as described in each
20
 
 * individual source file, and distribute linked combinations
21
 
 * including the two.
22
 
 * You must obey the GNU General Public License in all respects
23
 
 * for all of the code used other than OpenSSL.  If you modify
24
 
 * file(s) with this exception, you may extend this exception to your
25
 
 * version of the file(s), but you are not obligated to do so.  If you
26
 
 * do not wish to do so, delete this exception statement from your
27
 
 * version.
28
 
 */
29
 
 
30
 
#ifndef CLIENT_H
31
 
#define CLIENT_H
32
 
 
33
 
#include <QObject>
34
 
 
35
 
#include "Connection.h"
36
 
 
37
 
class Client : public QObject {
38
 
    Q_OBJECT
39
 
 
40
 
public:
41
 
    Client(QString &hostname, quint16 port);
42
 
    bool write(QByteArray message);
43
 
 
44
 
signals:
45
 
    void ready();
46
 
    void quit();
47
 
 
48
 
private:
49
 
    Connection connection;
50
 
 
51
 
private slots:
52
 
    void connected();
53
 
    void encrypted();
54
 
    void authenticated();
55
 
    void readyRead();
56
 
    void disconnected();
57
 
};
58
 
 
59
 
#endif // CLIENT_H