drumstick  2.3.1
backendmanager.h
Go to the documentation of this file.
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 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 
33 namespace drumstick {
38 namespace rt {
39 
49  class DRUMSTICK_EXPORT BackendManager
50  {
51  public:
55  explicit BackendManager();
56 
60  virtual ~BackendManager();
61 
66  void refresh(QSettings* settings = nullptr);
67 
72  void refresh(const QVariantMap& map);
73 
78  QList<MIDIInput*> availableInputs();
79 
84  QList<MIDIOutput*> availableOutputs();
85 
90  QStringList defaultPaths();
91 
97  MIDIInput* inputBackendByName(const QString name);
98 
104  MIDIOutput* outputBackendByName(const QString name);
105 
112  MIDIInput* findInput(QString name);
113 
120  MIDIOutput* findOutput(QString name);
121 
122  static const QString QSTR_DRUMSTICK;
123  static const QString QSTR_DRUMSTICK_VERSION;
124  static const QString QSTR_DRUMSTICKRT;
125  static const QString QSTR_DRUMSTICKRT_GROUP;
126  static const QString QSTR_DRUMSTICKRT_PUBLICNAMEIN;
127  static const QString QSTR_DRUMSTICKRT_PUBLICNAMEOUT;
128  static const QString QSTR_DRUMSTICKRT_EXCLUDED;
129  static const QString QSTR_DRUMSTICKRT_PATH;
130 
131  private:
132  class BackendManagerPrivate;
133  QScopedPointer<BackendManagerPrivate> d;
134  };
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
Drumstick visibility macros.
Drumstick common.
Definition: alsaclient.cpp:68
Realtime MIDI input interface.
Realtime MIDI output interface.