diff options
author | David Robillard <d@drobilla.net> | 2020-11-28 19:31:25 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-28 22:49:10 +0100 |
commit | 1c5decf5f85b7808a70885c820596fac013cf644 (patch) | |
tree | 34f873fc6099df1e08af0dd7898f67404622b1f0 /src/PortInfo.hpp | |
parent | 37a33e5549354b6142ce4aeacd6a7c627e772f48 (diff) | |
download | patchage-1c5decf5f85b7808a70885c820596fac013cf644.tar.gz patchage-1c5decf5f85b7808a70885c820596fac013cf644.tar.bz2 patchage-1c5decf5f85b7808a70885c820596fac013cf644.zip |
Factor out getting client and port metadata and send it with events
Diffstat (limited to 'src/PortInfo.hpp')
-rw-r--r-- | src/PortInfo.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/PortInfo.hpp b/src/PortInfo.hpp new file mode 100644 index 0000000..9b05c43 --- /dev/null +++ b/src/PortInfo.hpp @@ -0,0 +1,36 @@ +/* This file is part of Patchage. + * Copyright 2007-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_PORTINFO_HPP +#define PATCHAGE_PORTINFO_HPP + +#include "PortType.hpp" +#include "SignalDirection.hpp" + +#include <boost/optional.hpp> +#include <string> + +/// Extra information about a port not expressed in its ID +struct PortInfo +{ + std::string label; ///< Human-friendly label + PortType type; ///< Detailed port type + SignalDirection direction; ///< Signal direction + boost::optional<int> order; ///< Order key on client + bool is_terminal; ///< True if this is a system port +}; + +#endif // PATCHAGE_PORTINFO_HPP |