[][src]Crate lilv_sys

Structs

LilvInstanceImpl

@cond LILV_DOCUMENT_INSTANCE_IMPL

LilvNodeImpl
LilvPluginClassImpl
LilvPluginImpl
LilvPortImpl
LilvScalePointImpl
LilvStateImpl
LilvUIImpl
LilvWorldImpl
_IO_FILE
_IO_codecvt
_IO_marker
_IO_wide_data
__va_list_tag

Constants

LILV_NS_DOAP
LILV_NS_FOAF
LILV_NS_LILV
LILV_NS_LV2
LILV_NS_OWL
LILV_NS_RDF
LILV_NS_RDFS
LILV_NS_XSD
LILV_OPTION_DYN_MANIFEST
LILV_OPTION_FILTER_LANG
LILV_URI_ATOM_PORT
LILV_URI_AUDIO_PORT
LILV_URI_CONTROL_PORT
LILV_URI_CV_PORT
LILV_URI_EVENT_PORT
LILV_URI_INPUT_PORT
LILV_URI_MIDI_EVENT
LILV_URI_OUTPUT_PORT
LILV_URI_PORT

Functions

lilv_file_uri_parse

Convert a file URI string to a local path string. For example, "file://foo/bar%20one/baz.ttl" returns "/foo/bar one/baz.ttl". Return value must be freed by caller with lilv_free(). @param uri The file URI to parse. @param hostname If non-NULL, set to the hostname in the URI, if any. @return uri converted to a path, or NULL on failure (URI is not local).

lilv_free

Free memory allocated by Lilv.

lilv_instance_activate

Activate a plugin instance. This resets all state information in the plugin, except for port data locations (as set by lilv_instance_connect_port()). This MUST be called before calling lilv_instance_run().

lilv_instance_connect_port

Connect a port to a data location. This may be called regardless of whether the plugin is activated, activation and deactivation does not destroy port connections.

lilv_instance_deactivate

Deactivate a plugin instance. Note that to run the plugin after this you must activate it, which will reset all state information (except port connections).

lilv_instance_free

Free a plugin instance. It is safe to call this function on NULL. instance is invalid after this call.

lilv_instance_get_descriptor

Get the LV2_Descriptor of the plugin instance. Normally hosts should not need to access the LV2_Descriptor directly, use the lilv_instance_* functions.

lilv_instance_get_extension_data

Get extension data from the plugin instance. The type and semantics of the data returned is specific to the particular extension, though in all cases it is shared and must not be deleted.

lilv_instance_get_handle

Get the LV2_Handle of the plugin instance. Normally hosts should not need to access the LV2_Handle directly, use the lilv_instance_* functions.

lilv_instance_get_uri

Connect a port to a data location. This may be called regardless of whether the plugin is activated, activation and deactivation does not destroy port connections.

lilv_instance_run

Run instance for sample_count frames. If the hint lv2:hardRTCapable is set for this plugin, this function is guaranteed not to block.

lilv_new_bool

Create a new boolean value. Returned value must be freed by caller with lilv_node_free().

lilv_new_file_uri

Create a new file URI value. @param world The world. @param host Host name, or NULL. @param path Path on host. @return A new node that must be freed by caller.

lilv_new_float

Create a new floating point value. Returned value must be freed by caller with lilv_node_free().

lilv_new_int

Create a new integer value. Returned value must be freed by caller with lilv_node_free().

lilv_new_string

Create a new string value (with no language). Returned value must be freed by caller with lilv_node_free().

lilv_new_uri

Create a new URI value. Returned value must be freed by caller with lilv_node_free().

lilv_node_as_blank

Return this value as a blank node identifier, e.g. "genid03". Valid to call only if lilv_node_is_blank(value) returns true. Returned value is owned by value and must not be freed by caller.

lilv_node_as_bool

Return value as a bool. Valid to call only if lilv_node_is_bool(value) returns true.

lilv_node_as_float

Return value as a float. Valid to call only if lilv_node_is_float(value) or lilv_node_is_int(value) returns true.

lilv_node_as_int

Return value as an integer. Valid to call only if lilv_node_is_int(value) returns true.

lilv_node_as_string

Return value as a string.

lilv_node_as_uri

Return this value as a URI string, e.g. "http://example.org/foo". Valid to call only if lilv_node_is_uri(value) returns true. Returned value is owned by value and must not be freed by caller.

lilv_node_duplicate

Duplicate a LilvNode.

lilv_node_equals

Return whether two values are equivalent.

lilv_node_free

Free a LilvNode. It is safe to call this function on NULL.

lilv_node_get_path

Return the path of a file URI node. Returns NULL if value is not a file URI. Returned value must be freed by caller with lilv_free().

lilv_node_get_turtle_token

Return this value as a Turtle/SPARQL token. Returned value must be freed by caller with lilv_free().

lilv_node_is_blank

Return whether the value is a blank node (resource with no URI).

lilv_node_is_bool

Return whether this value is a boolean.

lilv_node_is_float

Return whether this value is a decimal literal.

lilv_node_is_int

Return whether this value is an integer literal.

lilv_node_is_literal

Return whether this value is a literal (i.e. not a URI). Returns true if value is a string or numeric value.

lilv_node_is_string

Return whether this value is a string literal. Returns true if value is a string value (and not numeric).

lilv_node_is_uri

Return whether the value is a URI (resource).

lilv_nodes_begin
lilv_nodes_contains

Return whether values contains value.

lilv_nodes_free
lilv_nodes_get
lilv_nodes_get_first
lilv_nodes_is_end
lilv_nodes_merge

Return a new LilvNodes that contains all nodes from both a and b.

lilv_nodes_next
lilv_nodes_size
lilv_plugin_class_get_children

Get the subclasses of this plugin class. Returned value must be freed by caller with lilv_plugin_classes_free().

lilv_plugin_class_get_label

Get the label of this plugin class, ie "Oscillators". Returned value is owned by plugin_class and must not be freed by caller.

lilv_plugin_class_get_parent_uri

Get the URI of this class' superclass. Returned value is owned by plugin_class and must not be freed by caller. Returned value may be NULL, if class has no parent.

lilv_plugin_class_get_uri

Get the URI of this plugin class. Returned value is owned by plugin_class and must not be freed by caller.

lilv_plugin_classes_begin
lilv_plugin_classes_free
lilv_plugin_classes_get
lilv_plugin_classes_get_by_uri

Get a plugin class from classes by URI. Return value is shared (stored in classes) and must not be freed or modified by the caller in any way. @return NULL if no plugin class with uri is found in classes.

lilv_plugin_classes_is_end
lilv_plugin_classes_next
lilv_plugin_classes_size
lilv_plugin_get_author_email

Get the email address of the plugin's author. Returns NULL if author email address is not present. Returned value must be freed by caller.

lilv_plugin_get_author_homepage

Get the address of the plugin author's home page. Returns NULL if author homepage is not present. Returned value must be freed by caller.

lilv_plugin_get_author_name

Get the full name of the plugin's author. Returns NULL if author name is not present. Returned value must be freed by caller.

lilv_plugin_get_bundle_uri

Get the (resolvable) URI of the plugin's "main" bundle. This returns the URI of the bundle where the plugin itself was found. Note that the data for a plugin may be spread over many bundles, that is, lilv_plugin_get_data_uris() may return URIs which are not within this bundle.

lilv_plugin_get_class

Get the class this plugin belongs to (e.g. Filters).

lilv_plugin_get_data_uris

Get the (resolvable) URIs of the RDF data files that define a plugin. Typical hosts should not need to use this function. Note this always returns fully qualified URIs. If you want local filesystem paths, use lilv_file_uri_parse(). @return a list of complete URLs eg. "file:///foo/ABundle.lv2/aplug.ttl", which is shared and must not be modified or freed.

lilv_plugin_get_extension_data

Get a sequence of all extension data provided by a plugin. This can be used to find which URIs lilv_instance_get_extension_data() will return a value for without instantiating the plugin.

lilv_plugin_get_latency_port_index

Return the index of the plugin's latency port. It is a fatal error to call this on a plugin without checking if the port exists by first calling lilv_plugin_has_latency().

lilv_plugin_get_library_uri

Get the (resolvable) URI of the shared library for plugin. Note this always returns a fully qualified URI. If you want a local filesystem path, use lilv_file_uri_parse(). @return a shared string which must not be modified or freed.

lilv_plugin_get_name

Get the name of plugin. This returns the name (doap:name) of the plugin. The name may be translated according to the current locale, this value MUST NOT be used as a plugin identifier (use the URI for that). Returned value must be freed by the caller.

lilv_plugin_get_num_ports

Get the number of ports on this plugin.

lilv_plugin_get_num_ports_of_class

Get the number of ports on this plugin that are members of some class(es). Note that this is a varargs function so ports fitting any type 'profile' desired can be found quickly. REMEMBER TO TERMINATE THE PARAMETER LIST OF THIS FUNCTION WITH NULL OR VERY NASTY THINGS WILL HAPPEN.

lilv_plugin_get_num_ports_of_class_va

Variant of lilv_plugin_get_num_ports_of_class() that takes a va_list.

lilv_plugin_get_optional_features

Get the LV2 Features optionally supported by a plugin. Hosts MAY ignore optional plugin features for whatever reasons. Plugins MUST operate (at least somewhat) if they are instantiated without being passed optional features.

lilv_plugin_get_port_by_designation

Get a port on plugin by its lv2:designation.

lilv_plugin_get_port_by_index

Get a port on plugin by index.

lilv_plugin_get_port_by_symbol

Get a port on plugin by symbol. Note this function is slower than lilv_plugin_get_port_by_index(), especially on plugins with a very large number of ports.

lilv_plugin_get_port_ranges_float

Get the port ranges (minimum, maximum and default values) for all ports. min_values, max_values and def_values must either point to an array of N floats, where N is the value returned by lilv_plugin_get_num_ports() for this plugin, or NULL. The elements of the array will be set to the the minimum, maximum and default values of the ports on this plugin, with array index corresponding to port index. If a port doesn't have a minimum, maximum or default value, or the port's type is not float, the corresponding array element will be set to NAN.

lilv_plugin_get_project

Get the project the plugin is a part of.

lilv_plugin_get_related

Get the resources related to plugin with lv2:appliesTo.

lilv_plugin_get_required_features

Get the LV2 Features required by a plugin. If a feature is required by a plugin, hosts MUST NOT use the plugin if they do not understand (or are unable to support) that feature.

lilv_plugin_get_supported_features

Get the LV2 Features supported (required or optionally) by a plugin. A feature is "supported" by a plugin if it is required OR optional.

lilv_plugin_get_uis

Get all UIs for plugin. Returned value must be freed by caller using lilv_uis_free().

lilv_plugin_get_uri

Get the URI of plugin. Any serialization that refers to plugins should refer to them by this. Hosts SHOULD NOT save any filesystem paths, plugin indexes, etc. in saved files; save only the URI.

lilv_plugin_get_value

Get a value associated with the plugin in a plugin's data files. predicate must be either a URI or a QName.

lilv_plugin_has_extension_data

Return whether or not a plugin provides a specific extension data.

lilv_plugin_has_feature

Return whether a feature is supported by a plugin. This will return true if the feature is an optional or required feature of the plugin.

lilv_plugin_has_latency

Return whether or not the plugin introduces (and reports) latency. The index of the latency port can be found with lilv_plugin_get_latency_port() ONLY if this function returns true.

lilv_plugin_instantiate

Instantiate a plugin. The returned value is a lightweight handle for an LV2 plugin instance, it does not refer to plugin, or any other Lilv state. The caller must eventually free it with lilv_instance_free(). features is a NULL-terminated array of features the host supports. NULL may be passed if the host supports no additional features. @return NULL if instantiation failed.

lilv_plugin_is_replaced

Return true iff plugin has been replaced by another plugin.

lilv_plugin_verify

Check if plugin is valid. This is not a rigorous validator, but can be used to reject some malformed plugins that could cause bugs (e.g. plugins with missing required fields).

lilv_plugin_write_description

Write the Turtle description of plugin to plugin_file.

lilv_plugin_write_manifest_entry

Write a manifest entry for plugin to manifest_file.

lilv_plugins_begin
lilv_plugins_get
lilv_plugins_get_by_uri

Get a plugin from plugins by URI. Return value is shared (stored in plugins) and must not be freed or modified by the caller in any way. @return NULL if no plugin with uri is found in plugins.

lilv_plugins_is_end
lilv_plugins_next
lilv_plugins_size
lilv_port_get

Get a single property value of a port.

lilv_port_get_classes

Get all the classes of a port. This can be used to determine if a port is an input, output, audio, control, midi, etc, etc, though it's simpler to use lilv_port_is_a(). The returned list does not include lv2:Port, which is implied. Returned value is shared and must not be destroyed by caller.

lilv_port_get_index

Get the index of a port. The index is only valid for the life of the plugin and may change between versions. For a stable identifier, use the symbol.

lilv_port_get_name

Get the name of a port. This is guaranteed to return the untranslated name (the doap:name in the data file without a language tag). Returned value must be freed by the caller.

lilv_port_get_node

Get the RDF node of port.

lilv_port_get_properties

Return the LV2 port properties of a port.

lilv_port_get_range

Get the default, minimum, and maximum values of a port.

lilv_port_get_scale_points

Get the scale points (enumeration values) of a port. This returns a collection of 'interesting' named values of a port (e.g. appropriate entries for a UI selector associated with this port). Returned value may be NULL if port has no scale points, otherwise it must be freed by caller with lilv_scale_points_free().

lilv_port_get_symbol

Get the symbol of a port. The 'symbol' is a short string, a valid C identifier. Returned value is owned by port and must not be freed.

lilv_port_get_value

Port analog of lilv_plugin_get_value().

lilv_port_has_property

Return whether a port has a certain property.

lilv_port_is_a

Determine if a port is of a given class (input, output, audio, etc). For convenience/performance/extensibility reasons, hosts are expected to create a LilvNode for each port class they "care about". Well-known type URI strings are defined (e.g. LILV_URI_INPUT_PORT) for convenience, but this function is designed so that Lilv is usable with any port types without requiring explicit support in Lilv.

lilv_port_supports_event

Return whether a port supports a certain event type.

lilv_scale_point_get_label

Get the label of this scale point (enumeration value) Returned value is owned by point and must not be freed.

lilv_scale_point_get_value

Get the value of this scale point (enumeration value) Returned value is owned by point and must not be freed.

lilv_scale_points_begin
lilv_scale_points_free
lilv_scale_points_get
lilv_scale_points_is_end
lilv_scale_points_next
lilv_scale_points_size
lilv_state_delete

Unload a state from the world and delete all associated files. @param world The world. @param state State to remove from the system.

lilv_state_emit_port_values

Enumerate the port values in a state snapshot. @param state The state to retrieve port values from. @param set_value A function to receive port values. @param user_data User data to pass to set_value.

lilv_state_equals

Return true iff a is equivalent to b.

lilv_state_free

Free state.

lilv_state_get_label

Get the label of state.

lilv_state_get_num_properties

Return the number of properties in state.

lilv_state_get_plugin_uri

Get the URI of the plugin state applies to.

lilv_state_get_uri

Get the URI of state.

lilv_state_new_from_file

Load a state snapshot from a file. @param world The world. @param map URID mapper. @param subject The subject of the state description (e.g. a preset URI). @param path The path of the file containing the state description. @return A new LilvState which must be freed with lilv_state_free().

lilv_state_new_from_instance

Create a new state snapshot from a plugin instance.

lilv_state_new_from_string

Load a state snapshot from a string made by lilv_state_to_string().

lilv_state_new_from_world

Load a state snapshot from the world RDF model. This function can be used to load the default state of a plugin by passing the plugin URI as the subject parameter. @param world The world. @param map URID mapper. @param node The subject of the state description (e.g. a preset URI). @return A new LilvState which must be freed with lilv_state_free(), or NULL.

lilv_state_restore

Restore a plugin instance from a state snapshot. @param state The state to restore, which must apply to the correct plugin. @param instance An instance of the plugin state applies to, or NULL. @param set_value A function to set a port value (may be NULL). @param user_data User data to pass to set_value. @param flags Bitwise OR of LV2_State_Flags values. @param features Features to pass LV2_State_Interface.restore().

lilv_state_save

Save state to a file. @param world The world. @param map URID mapper. @param unmap URID unmapper. @param state State to save. @param uri URI of state, may be NULL. @param dir Path of the bundle directory to save into. @param filename Path of the state file relative to dir.

lilv_state_set_label

Set the label of state.

lilv_state_set_metadata

Set a metadata property on state. @param state The state to set the metadata for. @param key The key to store value under (URID). @param value Pointer to the value to be stored. @param size The size of value in bytes. @param type The type of value (URID). @param flags LV2_State_Flags for value. @return 0 on success.

lilv_state_to_string

Save state to a string. This function does not use the filesystem.

lilv_ui_get_binary_uri

Get the URI for a Plugin UI's shared library. @param ui The Plugin UI @return a shared value which must not be modified or freed.

lilv_ui_get_bundle_uri

Get the URI for a Plugin UI's bundle. @param ui The Plugin UI @return a shared value which must not be modified or freed.

lilv_ui_get_classes

Get the types (URIs of RDF classes) of a Plugin UI. @param ui The Plugin UI @return a shared value which must not be modified or freed.

lilv_ui_get_uri

Get the URI of a Plugin UI. @param ui The Plugin UI @return a shared value which must not be modified or freed.

lilv_ui_is_a

Check whether a plugin UI has a given type. @param ui The Plugin UI @param class_uri The URI of the LV2 UI type to check this UI against

lilv_ui_is_supported

Return true iff a Plugin UI is supported as a given widget type. @param ui The Plugin UI @param supported_func User provided supported predicate. @param container_type The widget type to host the UI within. @param ui_type (Output) If non-NULL, set to the native type of the UI which is owned by ui and must not be freed by the caller. @return The embedding quality level returned by supported_func.

lilv_uis_begin
lilv_uis_free
lilv_uis_get
lilv_uis_get_by_uri

Get a UI from uis by URI. Return value is shared (stored in uis) and must not be freed or modified by the caller in any way. @return NULL if no UI with uri is found in list.

lilv_uis_is_end
lilv_uis_next
lilv_uis_size
lilv_uri_to_path

Convert a file URI string to a local path string. For example, "file://foo/bar/baz.ttl" returns "/foo/bar/baz.ttl". Return value is shared and must not be deleted by caller. This function does not handle escaping correctly and should not be used for general file URIs. Use lilv_file_uri_parse() instead. @return uri converted to a path, or NULL on failure (URI is not local).

lilv_world_ask

Return true iff a statement matching a certain pattern exists.

lilv_world_find_nodes

Find nodes matching a triple pattern. Either subject or object may be NULL (i.e. a wildcard), but not both. @return All matches for the wildcard field, or NULL.

lilv_world_free

Destroy the world, mwahaha. It is safe to call this function on NULL. Note that destroying world will destroy all the objects it contains (e.g. instances of LilvPlugin). Do not destroy the world until you are finished with all objects that came from it.

lilv_world_get

Find a single node that matches a pattern. Exactly one of subject, predicate, object must be NULL. This function is equivalent to lilv_nodes_get_first(lilv_world_find_nodes(...)) but simplifies the common case of only wanting a single value. @return the first matching node, or NULL if no matches are found.

lilv_world_get_all_plugins

Return a list of all found plugins. The returned list contains just enough references to query or instantiate plugins. The data for a particular plugin will not be loaded into memory until a call to an lilv_plugin_* function results in a query (at which time the data is cached with the LilvPlugin so future queries are very fast).

lilv_world_get_plugin_class

Get the parent of all other plugin classes, lv2:Plugin.

lilv_world_get_plugin_classes

Return a list of all found plugin classes. Returned list is owned by world and must not be freed by the caller.

lilv_world_get_symbol

Get an LV2 symbol for some subject.

lilv_world_load_all

Load all installed LV2 bundles on the system. This is the recommended way for hosts to load LV2 data. It implements the established/standard best practice for discovering all LV2 data on the system. The environment variable LV2_PATH may be used to control where this function will look for bundles.

lilv_world_load_bundle

Load a specific bundle. bundle_uri must be a fully qualified URI to the bundle directory, with the trailing slash, eg. file:///usr/lib/lv2/foo.lv2/

lilv_world_load_plugin_classes

Load all plugin classes from currently loaded specifications.

lilv_world_load_resource

Load all the data associated with the given resource. @param world The world. @param resource Must be a subject (i.e. a URI or a blank node). @return The number of files parsed, or -1 on error

lilv_world_load_specifications

Load all specifications from currently loaded bundles.

lilv_world_new

Initialize a new, empty world. If initialization fails, NULL is returned.

lilv_world_set_option

Set an option option for world.

lilv_world_unload_bundle

Unload a specific bundle.

lilv_world_unload_resource

Unload all the data associated with the given resource. @param world The world. @param resource Must be a subject (i.e. a URI or a blank node).

Type Definitions

FILE
LilvGetPortValueFunc

Function to get a port value. @param port_symbol The symbol of the port. @param user_data The user_data passed to lilv_state_new_from_instance(). @param size (Output) The size of the returned value. @param type (Output) The URID of the type of the returned value. @return A pointer to the port value.

LilvInstance
LilvIter
LilvNode
LilvNodes
LilvPlugin
LilvPluginClass
LilvPluginClasses
LilvPlugins
LilvPort
LilvScalePoint
LilvScalePoints
LilvSetPortValueFunc

Function to set a port value. @param port_symbol The symbol of the port. @param user_data The user_data passed to lilv_state_restore(). @param size The size of value. @param type The URID of the type of value. @param value A pointer to the port value.

LilvState
LilvUI
LilvUISupportedFunc

Function to determine whether a UI type is supported.

LilvUIs
LilvWorld
_IO_lock_t
__builtin_va_list
__off64_t
__off_t
__uint32_t
va_list