drumstick  1.0.2
macmidiinput.h
00001 /*
00002     Drumstick RT Backend
00003     Copyright (C) 2009-2015 Pedro Lopez-Cabanillas <plcl@users.sf.net>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License along
00016     with this program; if not, write to the Free Software Foundation, Inc.,
00017     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 */
00019 
00020 #ifndef MACMIDIOBJECT_H
00021 #define MACMIDIOBJECT_H
00022 
00023 #include "rtmidiinput.h"
00024 
00025 namespace drumstick {
00026 namespace rt {
00027 
00028     class MIDIOutput;
00029     class MacMIDIInputPrivate;
00030 
00031     class MacMIDIInput : public MIDIInput
00032     {
00033         Q_OBJECT
00034 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
00035         Q_PLUGIN_METADATA(IID "net.sourceforge.drumstick.rt.MIDIInput")
00036 #endif
00037         Q_INTERFACES(drumstick::rt::MIDIInput)
00038     public:
00039         explicit MacMIDIInput(QObject *parent = 0);
00040         ~MacMIDIInput();
00041 
00042         // MIDIInput interface
00043     public:
00044         virtual void initialize(QSettings* settings);
00045         virtual QString backendName();
00046         virtual QString publicName();
00047         virtual void setPublicName(QString name);
00048         virtual QStringList connections(bool advanced);
00049         virtual void setExcludedConnections(QStringList conns);
00050         virtual void open(QString name);
00051         virtual void close();
00052         virtual QString currentConnection();
00053 
00054         virtual void setMIDIThruDevice(MIDIOutput *device);
00055         virtual void enableMIDIThru(bool enable);
00056         virtual bool isEnabledMIDIThru();
00057 
00058     private:
00059         MacMIDIInputPrivate* const d;
00060     };
00061 
00062 }}
00063 
00064 #endif // MACMIDIOBJECT_H