1 /* 2 Drumstick RT (realtime MIDI In/Out) 3 Copyright (C) 2009-2021 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 3 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 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef NETMIDIINPUT_P_H 20 #define NETMIDIINPUT_P_H 21 22 #include <QObject> 23 #include <QUdpSocket> 24 #include <QNetworkInterface> 25 #include "midiparser.h" 26 27 namespace drumstick { 28 namespace rt { 29 30 class MIDIOutput; 31 class NetMIDIInput; 32 33 class NetMIDIInputPrivate : public QObject 34 { 35 Q_OBJECT 36 public: 37 NetMIDIInput *m_inp; 38 MIDIOutput *m_out; 39 QUdpSocket *m_socket; 40 MIDIParser *m_parser; 41 int m_thruEnabled; 42 quint16 m_port; 43 QString m_publicName; 44 QHostAddress m_groupAddress; 45 MIDIConnection m_currentInput; 46 QList<MIDIConnection> m_inputDevices; 47 QStringList m_excludedNames; 48 QNetworkInterface m_iface; 49 bool m_ipv6; 50 bool m_status; 51 QStringList m_diagnostics; 52 53 explicit NetMIDIInputPrivate(QObject *parent = nullptr); 54 55 void open(const MIDIConnection& conn); 56 void close(); 57 void initialize(QSettings* settings); 58 void setMIDIThruDevice(MIDIOutput* device); 59 60 public slots: 61 void processIncomingMessages(); 62 }; 63 64 }} 65 #endif // NETMIDIINPUT_P_H 66