drumstick  1.0.1
ossinput_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 OSSINPUT_P_H
21 #define OSSINPUT_P_H
22 
23 #include <QObject>
24 #include <QIODevice>
25 #include <QSocketNotifier>
26 #include <QStringList>
27 #include <QByteArray>
28 #include "midiparser.h"
29 
30 namespace drumstick {
31 namespace rt {
32 
33 class MIDIOutput;
34 class OSSInput;
35 
36 class OSSInputPrivate : public QObject
37 {
38  Q_OBJECT
39 public:
40  OSSInput *m_inp;
41  MIDIOutput *m_out;
42  QIODevice *m_device;
43  QSocketNotifier *m_notifier;
44  MIDIParser *m_parser;
45  bool m_thruEnabled;
46  bool m_advanced;
47  QString m_publicName;
48  QString m_currentInput;
49  QStringList m_inputDevices;
50  QStringList m_excludedNames;
51  QByteArray m_buffer;
52 
53  OSSInputPrivate(QObject *parent = 0);
54  void reloadDeviceList(bool advanced = false);
55  void open(QString portName);
56  void close();
57  //void parse();
58  void setMIDIThruDevice(MIDIOutput* device);
59 
60 public slots:
61  void processIncomingMessages(int);
62 };
63 
64 }}
65 #endif // OSSINPUT_P_H
The QObject class is the base class of all Qt objects.