drumstick  1.0.2
backendmanager.h
Go to the documentation of this file.
00001 /*
00002     Drumstick RT (realtime MIDI In/Out)
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 BACKENDMANAGER_H
00021 #define BACKENDMANAGER_H
00022 
00023 #include <QObject>
00024 #include "macros.h"
00025 #include "rtmidiinput.h"
00026 #include "rtmidioutput.h"
00027 
00035 namespace drumstick {
00036 namespace rt {
00037 
00038     const QString QSTR_DRUMSTICK(QLatin1Literal("drumstick"));
00039     const QString QSTR_DRUMSTICKRT(QLatin1Literal("DRUMSTICKRT"));
00040     const QString QSTR_DRUMSTICKRT_GROUP(QLatin1Literal("DrumstickRT"));
00041     const QString QSTR_DRUMSTICKRT_PUBLICNAMEIN(QLatin1Literal("PublicNameIN"));
00042     const QString QSTR_DRUMSTICKRT_PUBLICNAMEOUT(QLatin1Literal("PublicNameOUT"));
00043     const QString QSTR_DRUMSTICKRT_EXCLUDED(QLatin1Literal("ExcludedNames"));
00044     const QString QSTR_DRUMSTICKRT_PATH(QLatin1Literal("BackendsPath"));
00045 
00050     class DRUMSTICK_EXPORT BackendManager
00051     {
00052     public:
00056         explicit BackendManager();
00057 
00061         virtual ~BackendManager();
00062 
00067         void refresh(QSettings* settings = 0);
00068 
00073         QList<MIDIInput*> availableInputs();
00074 
00079         QList<MIDIOutput*> availableOutputs();
00080 
00085         QStringList defaultPaths();
00086 
00087     private:
00088         class BackendManagerPrivate;
00089         BackendManagerPrivate *d;
00090     };
00091 
00092 }}
00093 
00096 #endif // BACKENDMANAGER_H