summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/port_engine.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-03-08 17:23:38 +0100
committerRobin Gareus <robin@gareus.org>2015-03-08 19:02:30 +0100
commit0f736feee0f98ab7564c206e991fdab0e98af66d (patch)
treebc5d0aeea3a72a48e6b01da93b266a7a13828c8b /libs/ardour/ardour/port_engine.h
parent2657992ebb090857515de00ef46feba32fabdf75 (diff)
add port-engine API to query port-properties
Diffstat (limited to 'libs/ardour/ardour/port_engine.h')
-rw-r--r--libs/ardour/ardour/port_engine.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h
index aaf72d812a..26e52b9dfd 100644
--- a/libs/ardour/ardour/port_engine.h
+++ b/libs/ardour/ardour/port_engine.h
@@ -119,6 +119,25 @@ class LIBARDOUR_API PortEngine {
*/
virtual std::string get_port_name (PortHandle) const = 0;
+ /** Return the port-property value and type for a given key.
+ * (eg query a human readable port name)
+ *
+ * The API follows jack_get_property():
+ *
+ * @param key The key of the property to retrieve
+ * @param value Set to the value of the property if found
+ * @param type The type of the property if set (
+ * Type of data, either a MIME type or URI.
+ * If type is empty, the data is assumed to be a UTF-8 encoded string.
+ *
+ * @return 0 on success, -1 if the @p subject has no @p key property.
+ *
+ * for available keys, see
+ * https://github.com/jackaudio/headers/blob/master/metadata.h
+ * https://github.com/drobilla/jackey/blob/master/jackey.h
+ */
+ virtual int get_port_property (PortHandle, const std::string& key, std::string& value, std::string& type) const { return -1; }
+
/** Return a reference to a port with the fullname @param name. Return
* an "empty" PortHandle (analogous to a null pointer) if no such port exists.
*/