summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ClientID.hpp8
-rw-r--r--src/ClientType.hpp27
-rw-r--r--src/PortID.hpp8
3 files changed, 33 insertions, 10 deletions
diff --git a/src/ClientID.hpp b/src/ClientID.hpp
index d58c5ee..43b56ec 100644
--- a/src/ClientID.hpp
+++ b/src/ClientID.hpp
@@ -17,6 +17,8 @@
#ifndef PATCHAGE_CLIENTID_HPP
#define PATCHAGE_CLIENTID_HPP
+#include "ClientType.hpp"
+
#include <cassert>
#include <cstdint>
#include <ostream>
@@ -26,11 +28,7 @@
/// An ID for some client (program) that has ports
struct ClientID
{
- enum class Type
- {
- jack,
- alsa,
- };
+ using Type = ClientType;
ClientID(const ClientID& copy) = default;
ClientID& operator=(const ClientID& copy) = default;
diff --git a/src/ClientType.hpp b/src/ClientType.hpp
new file mode 100644
index 0000000..622b3d8
--- /dev/null
+++ b/src/ClientType.hpp
@@ -0,0 +1,27 @@
+/* This file is part of Patchage.
+ * Copyright 2020 David Robillard <d@drobilla.net>
+ *
+ * Patchage is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Patchage. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PATCHAGE_CLIENTTYPE_HPP
+#define PATCHAGE_CLIENTTYPE_HPP
+
+/// A type of client (program) with supported ports
+enum class ClientType
+{
+ jack,
+ alsa,
+};
+
+#endif // PATCHAGE_CLIENTTYPE_HPP
diff --git a/src/PortID.hpp b/src/PortID.hpp
index a0f1bb9..4887a27 100644
--- a/src/PortID.hpp
+++ b/src/PortID.hpp
@@ -17,6 +17,8 @@
#ifndef PATCHAGE_PORTID_HPP
#define PATCHAGE_PORTID_HPP
+#include "ClientType.hpp"
+
#include <cassert>
#include <iostream>
#include <string>
@@ -26,11 +28,7 @@
/// An ID for some port on a client (program)
struct PortID
{
- enum class Type
- {
- jack,
- alsa,
- };
+ using Type = ClientType;
PortID(const PortID& copy) = default;
PortID& operator=(const PortID& copy) = default;