lilv.world

class World

Types 1

classWorld

The top-level Lilv state object.

A World is used to discover, load and cache LV2 data (plugins, UIs, specifications). Normal hosts should create one World, call loadAll(), then query plugins via getAllPlugins().

Fields
private LilvWorld * _cPtr
private uint _refCount
Methods
LilvWorld * handle() @property @nogc nothrowGet C World handle
void addRef() @nogc nothrowAdd a reference to a World (should only be used internally)
void unRef() @nogc nothrowRemove a reference to a World (should only be used internally)
void setOption(string uri, Node value) nothrowSet an option for this world.
void loadAll() @nogc nothrowLoad all installed LV2 bundles on the system.
void loadBundle(Node bundleUri) @nogc nothrowLoad a specific bundle. Params: bundleUri = a fully qualified URI to the bundle directory (with trailing slash), e.g. file:///usr/lib/lv2/foo.lv2/
void loadSpecifications() @nogc nothrowLoad all specifications from currently loaded bundles. Only needed when loading specific bundles instead of loadAll().
void loadPluginClasses() @nogc nothrowLoad all plugin classes from currently loaded specifications. Must be called after loadSpecifications() when not using loadAll().
int unloadBundle(Node bundleUri) @nogc nothrowUnload a specific bundle. Params: bundleUri = URI of bundle to unload Returns: 0 on success.
int loadResource(Node resource) @nogc nothrowLoad all data associated with the given resource. Params: resource = Resource URI to load Returns: the number of files parsed, or -1 on error.
int unloadResource(Node resource) @nogc nothrowUnload data previously loaded by loadResource(). Params: resource = Resource URI to load Returns: the number of items removed, or -1 on error.
PluginClass getPluginClass()The parent of all other plugin classes (lv2:Plugin). Returns: The parent plugin class
PluginClasses getPluginClasses()All found plugin classes. Returns: Collection of all plugin classes
Plugins getAllPlugins()All found plugins. Plugin data is loaded lazily on first query. Returns: Collection of all plugins
Nodes findNodes(Node subject, Node predicate, Node obj)Find nodes matching a triple pattern. subject or object may be null (wildcard), but not both. Params: subject = A subject URI (can be null for wildcard) predicate = Predicate URI obj = Object (can ...
Node get(Node subject, Node predicate, Node obj)Find a single node matching a triple pattern. Like findNodes() but only returns the first item. Params: subject = A subject URI (can be null for wildcard) predicate = Predicate URI obj = Object (ca...
bool ask(Node subject, Node predicate, Node obj) @nogc nothrowReturn true if a statement matching the pattern exists. Any of the three arguments may be null (wildcard). Params: subject = Subject URI (null for wildcard) predicate = Predicate URI (null for wild...
Node getSymbol(Node subject)Get an LV2 symbol for some subject. Params: subject = Subject Returns: Node that is a valid LV2 symbol, or null.
Node newUri(string uri)Create a new URI node value
Node newFileUri(string host, string path)Create a new file URI node value
Node newString(string str)Create a new string node value
Node newInt(int val)Create a new integer node value
Node newFloat(float val)Create a new floating-point node value
Node newBool(bool val)Create a new boolean node value
Constructors
this()Create a new, empty world. Throws if initialization fails (lilv_world_new returned null).
Destructors