drumstick  1.0.1
netmidiinput_p.h
1 /*
2  Drumstick RT (realtime MIDI In/Out)
3  Copyright (C) 2009-2015 Pedro Lopez-Cabanillas <plcl@users.sf.net>
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, or
8  (at your option) any later version.
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 along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef NETMIDIINPUT_P_H
21 #define NETMIDIINPUT_P_H
22 
23 #include <QObject>
24 #include <QUdpSocket>
25 #include <QNetworkInterface>
26 #include "midiparser.h"
27 
28 namespace drumstick {
29 namespace rt {
30 
31 class MIDIOutput;
32 class NetMIDIInput;
33 
34 class NetMIDIInputPrivate : public QObject
35 {
36  Q_OBJECT
37 public:
38  NetMIDIInput *m_inp;
39  MIDIOutput *m_out;
40  QUdpSocket *m_socket;
41  MIDIParser *m_parser;
42  int m_thruEnabled;
43  quint16 m_port;
44  QString m_publicName;
45  QHostAddress m_groupAddress;
46  QString m_currentInput;
47  QStringList m_inputDevices;
48  QStringList m_excludedNames;
49  QNetworkInterface m_iface;
50 
51  NetMIDIInputPrivate(QObject *parent = 0);
52 
53  void open(QString portName);
54  void close();
55  void initialize(QSettings* settings);
56  void setMIDIThruDevice(MIDIOutput* device);
57 
58 public slots:
59  void processIncomingMessages();
60 };
61 
62 }}
63 #endif // NETMIDIINPUT_P_H
The QObject class is the base class of all Qt objects.