== Overview ==
The LV2 API, on its own, cannot be used to write plugin libraries where data is dynamically generated at runtime (e.g. API wrappers), since LV2 requires needed information to be provided in one or more static data (RDF) files. This API addresses this limitation by extending the LV2 API.
A host implementing support for this API should first detect that the plugin library implements a dynamic manifest generator by examining its static manifest file, then fetch data from the shared object file by accessing it as usual (dlopen() and family) and using this API.
The host is allowed to request regeneration of the dynamic manifest multiple times, and the plugin library is expected to provide updated data if/when possible. All data and references provided via this API before the last regeneration of the dynamic manifest is to be considered invalid by the host, including plugin descriptors whose URIs were discovered using this API.
This API is extensible in a similar fashion as the LV2 plugin API.
== Accessing data ==
Whenever a host wants to access data using this API, it could:
The content of the FILE * resources has to be interpreted by the host as a regular file in Turtle syntax. This also means that each FILE * resource should also contain needed prefix definitions, in case any are used.
Each call to lv2_dyn_manifest_open() automatically implies the (re)generation of the dynamic manifest on the library side.
When such calls are made, data fetched from the involved library using this API before such call is to be considered no more valid.
In case the library uses this same API to access other dynamic manifests, it MUST implement some mechanism to avoid potentially endless loops (such as A loads B, B loads A, etc.) in functions from the Dynamic manifest open class (the open-like operation MUST fail). For this purpose, use of a static boolean flag is suggested.
== Threading rules ==
This specification defines threading rule classes, similarly to the LV2 specification.
The functions defined by this API belong to:
The rules that hosts must follow are these:
Extensions to this specification which add new functions MUST declare in which of these classes the functions belong, or define new classes for them; furthermore, classes defined by such extensions MUST only allow calls after a successful call to a function from the Dynamic manifest open class and before the following successful call to a function from the Dynamic manifest close class.
Any simultaneous calls that are not explicitly forbidden by these rules are allowed.
Definition in file dyn-manifest.h.
|typedef void *||LV2_Dyn_Manifest_Handle|
|void||lv2_dyn_manifest_close (LV2_Dyn_Manifest_Handle handle)|
|int||lv2_dyn_manifest_get_data (LV2_Dyn_Manifest_Handle handle, FILE *fp, const char *uri)|
|int||lv2_dyn_manifest_get_subjects (LV2_Dyn_Manifest_Handle handle, FILE *fp)|
|int||lv2_dyn_manifest_open (LV2_Dyn_Manifest_Handle *handle, const LV2_Feature *const *features)|