def set_property(port, key, value, jackPropertyType=""): """empty jackPropertyType leads to UTF-8 string for convenience we see if value is a python int and send the right jack_property_t::type jackio.c checks if the port exists, even though metadata allows keys for non-existent uuids. """ if type(value) is int: jackPropertyType = "http://www.w3.org/2001/XMLSchema#int" value = str(value) elif not type(value) is str: return TypeError("value {} must be int or str but was {}".format( value, type(value))) do_cmd("/io/set_property", None, [port, key, value, jackPropertyType])
def client_set_property(key, value, jackPropertyType=""): """empty jackPropertyType leads to UTF-8 string for convenience we see if value is a python int and send the right jack_property_t::type This is directly for our client, which we do not need to provide here. """ if type(value) is int: jackPropertyType = "http://www.w3.org/2001/XMLSchema#int" value = str(value) elif not type(value) is str: return TypeError("value {} must be int or str but was {}".format( value, type(value))) do_cmd("/io/client_set_property", None, [key, value, jackPropertyType])
def remove_all_properties(): """Remove all metadata from jack server""" do_cmd("/io/remove_all_properties", None, [])
def remove_properties(port): """port is the portname as string System:out_1""" do_cmd("/io/remove_properties", None, [port])
def remove_property(port, key): """port is the portname as string System:out_1""" do_cmd("/io/remove_property", None, [port, key])
def client_remove_property(key): """ This is directly for our client, which we do not need to provide here. """ do_cmd("/io/client_remove_property", None, [key])