+int
+JACKAudioBackend::get_port_property (PortHandle port, const std::string& key, std::string& value, std::string& type) const
+{
+#ifdef HAVE_JACK_METADATA // really everyone ought to have this by now.
+ int rv = -1;
+ char *cvalue = NULL;
+ char *ctype = NULL;
+
+ jack_uuid_t uuid = jack_port_uuid((jack_port_t*) port);
+ rv = jack_get_property(uuid, key.c_str(), &cvalue, &ctype);
+
+ if (0 == rv && cvalue) {
+ value = cvalue;
+ if (ctype) {
+ type = ctype;
+ }
+ } else {
+ rv = -1;
+ }
+
+ jack_free(cvalue);
+ jack_free(ctype);
+ return rv;
+#else
+ return -1;
+#endif
+}
+
+int
+JACKAudioBackend::set_port_property (PortHandle port, const std::string& key, const std::string& value, const std::string& type)
+{
+#ifdef HAVE_JACK_METADATA // really everyone ought to have this by now.
+ int rv = -1;
+ jack_client_t* client = _jack_connection->jack();
+ jack_uuid_t uuid = jack_port_uuid((jack_port_t*) port);
+ return jack_set_property(client, uuid, key.c_str(), value.c_str(), type.c_str());
+ return rv;
+#else
+ return -1;
+#endif
+}
+
+PortEngine::PortHandle