drumstick 2.7.2
backendmanager.h
Go to the documentation of this file.
1/*
2 Drumstick RT (realtime MIDI In/Out)
3 Copyright (C) 2009-2022 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 BACKENDMANAGER_H
20#define BACKENDMANAGER_H
21
22#include <QObject>
23#include <QScopedPointer>
24#include "macros.h"
25#include "rtmidiinput.h"
26#include "rtmidioutput.h"
27
33namespace drumstick {
38namespace rt {
39
49 class DRUMSTICK_EXPORT BackendManager
50 {
51 public:
55 explicit BackendManager();
56
60 virtual ~BackendManager();
61
65 void refresh(QSettings* settings = nullptr);
66
70 void refresh(const QVariantMap& map);
71
76 QList<MIDIInput*> availableInputs();
77
82 QList<MIDIOutput*> availableOutputs();
83
88 QStringList defaultPaths();
89
95 MIDIInput* inputBackendByName(const QString name);
96
102 MIDIOutput* outputBackendByName(const QString name);
103
110 MIDIInput* findInput(QString name);
111
118 MIDIOutput* findOutput(QString name);
119
120 static const QString QSTR_DRUMSTICK;
121 static const QString QSTR_DRUMSTICK_VERSION;
122 static const QString QSTR_DRUMSTICKRT;
123 static const QString QSTR_DRUMSTICKRT_GROUP;
124 static const QString QSTR_DRUMSTICKRT_PUBLICNAMEIN;
125 static const QString QSTR_DRUMSTICKRT_PUBLICNAMEOUT;
126 static const QString QSTR_DRUMSTICKRT_EXCLUDED;
127 static const QString QSTR_DRUMSTICKRT_PATH;
128
129 private:
130 class BackendManagerPrivate;
131 QScopedPointer<BackendManagerPrivate> d;
132 };
133
134 QString DRUMSTICK_EXPORT drumstickLibraryVersion();
135
138}} // namespace drumstick::rt
139
140#endif // BACKENDMANAGER_H
The QSettings class provides persistent platform-independent application settings.
The BackendManager class manages lists of dynamic and static backends for applications based on drums...
MIDI IN interface.
Definition: rtmidiinput.h:46
MIDI OUT interface.
Definition: rtmidioutput.h:112
QString DRUMSTICK_EXPORT drumstickLibraryVersion()
drumstickLibraryVersion provides the Drumstick version as an edited QString
Drumstick visibility macros.
Drumstick common.
Definition: alsaclient.cpp:68
Realtime MIDI input interface.
Realtime MIDI output interface.