aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/dynmanifest
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-07 18:59:32 -0400
committerDavid Robillard <d@drobilla.net>2022-07-17 18:14:00 -0400
commit1eccbe4355685b322194df72b5de2382d5290b3b (patch)
tree0677b5c2f577a5024c351a164527f4bdd91a639b /lv2/dynmanifest
parentd4a970f6962dda28133290194832b726b566ddab (diff)
downloadlv2-1eccbe4355685b322194df72b5de2382d5290b3b.tar.xz
Rearrange source tree to be directly usable by dependants
This allows the LV2 source distribution to be used as an include path for compilers and an LV2_PATH for applications, at the expense of self-contained bundles. That's a nice idea, but it made LV2 itself weird and annoying to depend on. This rearranges things so that directories in the source tree correspond more closely to installation directories. To make this possible, the "aux" directory in the documentation output has been changed to "style", to avoid the reserved name "aux" on Windows.
Diffstat (limited to 'lv2/dynmanifest')
-rw-r--r--lv2/dynmanifest/dynmanifest.h160
-rw-r--r--lv2/dynmanifest/dynmanifest.meta.ttl131
-rw-r--r--lv2/dynmanifest/dynmanifest.ttl25
-rw-r--r--lv2/dynmanifest/manifest.ttl9
-rw-r--r--lv2/dynmanifest/meson.build40
5 files changed, 0 insertions, 365 deletions
diff --git a/lv2/dynmanifest/dynmanifest.h b/lv2/dynmanifest/dynmanifest.h
deleted file mode 100644
index 674577b..0000000
--- a/lv2/dynmanifest/dynmanifest.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- Dynamic manifest specification for LV2
- Copyright 2008-2011 Stefano D'Angelo <zanga.mail@gmail.com>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#ifndef LV2_DYN_MANIFEST_H_INCLUDED
-#define LV2_DYN_MANIFEST_H_INCLUDED
-
-/**
- @defgroup dynmanifest Dynamic Manifest
- @ingroup lv2
-
- Support for dynamic data generation.
-
- See <http://lv2plug.in/ns/ext/dynmanifest> for details.
-
- @{
-*/
-
-#include "lv2/core/lv2.h"
-
-#include <stdio.h>
-
-// clang-format off
-
-#define LV2_DYN_MANIFEST_URI "http://lv2plug.in/ns/ext/dynmanifest" ///< http://lv2plug.in/ns/ext/dynmanifest
-#define LV2_DYN_MANIFEST_PREFIX LV2_DYN_MANIFEST_URI "#" ///< http://lv2plug.in/ns/ext/dynmanifest#
-
-// clang-format on
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- Dynamic manifest generator handle.
-
- This handle indicates a particular status of a dynamic manifest generator.
- The host MUST NOT attempt to interpret it and, unlikely LV2_Handle, it is
- NOT even valid to compare this to NULL. The dynamic manifest generator MAY
- use it to reference internal data.
-*/
-typedef void* LV2_Dyn_Manifest_Handle;
-
-/**
- Generate the dynamic manifest.
-
- @param handle Pointer to an uninitialized dynamic manifest generator handle.
-
- @param features NULL terminated array of LV2_Feature structs which represent
- the features the host supports. The dynamic manifest generator may refuse to
- (re)generate the dynamic manifest if required features are not found here
- (however hosts SHOULD NOT use this as a discovery mechanism, instead of
- reading the static manifest file). This array must always exist; if a host
- has no features, it MUST pass a single element array containing NULL.
-
- @return 0 on success, otherwise a non-zero error code. The host SHOULD
- evaluate the result of the operation by examining the returned value and
- MUST NOT try to interpret the value of handle.
-*/
-int
-lv2_dyn_manifest_open(LV2_Dyn_Manifest_Handle* handle,
- const LV2_Feature* const* features);
-
-/**
- Fetch a "list" of subject URIs described in the dynamic manifest.
-
- The dynamic manifest generator has to fill the resource only with the needed
- triples to make the host aware of the "objects" it wants to expose. For
- example, if the plugin library exposes a regular LV2 plugin, it should
- output only a triple like the following:
-
- <http://example.org/plugin> a lv2:Plugin .
-
- The objects that are eligible for exposure are those that would need to be
- represented by a subject node in a static manifest.
-
- @param handle Dynamic manifest generator handle.
-
- @param fp FILE * identifying the resource the host has to set up for the
- dynamic manifest generator. The host MUST pass a writable, empty resource to
- this function, and the dynamic manifest generator MUST ONLY perform write
- operations on it at the end of the stream (for example, using only
- fprintf(), fwrite() and similar).
-
- @return 0 on success, otherwise a non-zero error code.
-*/
-int
-lv2_dyn_manifest_get_subjects(LV2_Dyn_Manifest_Handle handle, FILE* fp);
-
-/**
- Function that fetches data related to a specific URI.
-
- The dynamic manifest generator has to fill the resource with data related to
- object represented by the given URI. For example, if the library exposes a
- regular LV2 plugin whose URI, as retrieved by the host using
- lv2_dyn_manifest_get_subjects() is http://example.org/plugin then it
- should output something like:
-
- <pre>
- <http://example.org/plugin>
- a lv2:Plugin ;
- doap:name "My Plugin" ;
- lv2:binary <mylib.so> ;
- etc:etc "..." .
- </pre>
-
- @param handle Dynamic manifest generator handle.
-
- @param fp FILE * identifying the resource the host has to set up for the
- dynamic manifest generator. The host MUST pass a writable resource to this
- function, and the dynamic manifest generator MUST ONLY perform write
- operations on it at the current position of the stream (for example, using
- only fprintf(), fwrite() and similar).
-
- @param uri URI to get data about (in the "plain" form, i.e., absolute URI
- without Turtle prefixes).
-
- @return 0 on success, otherwise a non-zero error code.
-*/
-int
-lv2_dyn_manifest_get_data(LV2_Dyn_Manifest_Handle handle,
- FILE* fp,
- const char* uri);
-
-/**
- Function that ends the operations on the dynamic manifest generator.
-
- This function SHOULD be used by the dynamic manifest generator to perform
- cleanup operations, etc.
-
- Once this function is called, referring to handle will cause undefined
- behavior.
-
- @param handle Dynamic manifest generator handle.
-*/
-void
-lv2_dyn_manifest_close(LV2_Dyn_Manifest_Handle handle);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-/**
- @}
-*/
-
-#endif /* LV2_DYN_MANIFEST_H_INCLUDED */
diff --git a/lv2/dynmanifest/dynmanifest.meta.ttl b/lv2/dynmanifest/dynmanifest.meta.ttl
deleted file mode 100644
index 4e66d98..0000000
--- a/lv2/dynmanifest/dynmanifest.meta.ttl
+++ /dev/null
@@ -1,131 +0,0 @@
-@prefix dcs: <http://ontologi.es/doap-changeset#> .
-@prefix dman: <http://lv2plug.in/ns/ext/dynmanifest#> .
-@prefix doap: <http://usefulinc.com/ns/doap#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-
-<http://lv2plug.in/ns/ext/dynmanifest>
- a doap:Project ;
- doap:license <http://opensource.org/licenses/isc> ;
- doap:name "LV2 Dynamic Manifest" ;
- doap:homepage <http://naspro.atheme.org> ;
- doap:created "2009-06-13" ;
- doap:shortdesc "Support for dynamic manifest data generation." ;
- doap:programming-language "C" ;
- doap:developer <http://lv2plug.in/ns/meta#daste> ;
- doap:release [
- doap:revision "1.6" ;
- doap:created "2012-10-14" ;
- doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ;
- dcs:blame <http://drobilla.net/drobilla#me> ;
- dcs:changeset [
- dcs:item [
- rdfs:label "Use consistent label style."
- ]
- ]
- ] , [
- doap:revision "1.4" ;
- doap:created "2012-04-17" ;
- doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ;
- dcs:blame <http://drobilla.net/drobilla#me> ;
- dcs:changeset [
- dcs:item [
- rdfs:label "Merge with unified LV2 package."
- ]
- ]
- ] , [
- doap:revision "1.2" ;
- doap:created "2011-11-21" ;
- doap:file-release <http://lv2plug.in/spec/lv2-dynmanifest-1.2.tar.bz2> ;
- dcs:blame <http://drobilla.net/drobilla#me> ;
- dcs:changeset [
- dcs:item [
- rdfs:label "Improve documentation."
- ]
- ]
- ] , [
- doap:revision "1.0" ;
- doap:created "2010-04-10" ;
- doap:file-release <http://lv2plug.in/spec/lv2-dyn-manifest-1.0.tar.gz> ;
- dcs:blame <http://drobilla.net/drobilla#me> ;
- dcs:changeset [
- dcs:item [
- rdfs:label "Initial release."
- ]
- ]
- ] ;
- lv2:documentation """
-
-The LV2 API, on its own, cannot be used to write plugin libraries where data is
-dynamically generated at runtime, 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.
-
-To detect that a plugin library implements a dynamic manifest generator, the
-host checks its static manifest for a description like:
-
- :::turtle
- <http://example.org/my-dynamic-manifest>
- a dman:DynManifest ;
- lv2:binary <mydynmanifest.so> .
-
-To load the data, the host loads the library (`mydynmanifest.so` in this
-example) as usual and fetches the dynamic Turtle data from it 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.
-
-### Accessing Data
-
-To access data using this API, the host must:
-
- 1. Call lv2_dyn_manifest_open().
-
- 2. Create a `FILE` for functions to write data to (for example with `tmpfile()`).
-
- 3. Get a list of exposed subject URIs using lv2_dyn_manifest_get_subjects().
-
- 4. Call lv2_dyn_manifest_get_data() for each URI of interest to write the
- related data to the file.
-
- 5. Call lv2_dyn_manifest_close().
-
- 6. Parse the content of the file(s).
-
- 7. Remove the file(s).
-
-Each call to the above mentioned dynamic manifest functions MUST write a
-complete, valid Turtle document (including all needed prefix definitions) to
-the output FILE.
-
-Each call to lv2_dyn_manifest_open() causes the (re)generation of the dynamic
-manifest data, and invalidates all data fetched before the call.
-
-In case the plugin 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.) and, in case such a loop is detected, the
-operation MUST fail. For this purpose, use of a static boolean flag is
-suggested.
-
-### Threading Rules
-
-All of the functions defined by this specification belong to the Discovery
-class.
-
-
-"""^^lv2:Markdown .
-
-dman:DynManifest
- lv2:documentation """
-
-There MUST NOT be any instances of dman:DynManifest in the generated manifest.
-
-All relative URIs in the generated data MUST be relative to the base path that
-would be used to parse a normal LV2 manifest (the bundle path).
-
-"""^^lv2:Markdown .
-
diff --git a/lv2/dynmanifest/dynmanifest.ttl b/lv2/dynmanifest/dynmanifest.ttl
deleted file mode 100644
index 4e2e830..0000000
--- a/lv2/dynmanifest/dynmanifest.ttl
+++ /dev/null
@@ -1,25 +0,0 @@
-@prefix dman: <http://lv2plug.in/ns/ext/dynmanifest#> .
-@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
-@prefix owl: <http://www.w3.org/2002/07/owl#> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-
-<http://lv2plug.in/ns/ext/dynmanifest>
- a owl:Ontology ;
- rdfs:label "LV2 Dyn Manifest" ;
- rdfs:comment "Support for dynamic manifest data generation." ;
- rdfs:seeAlso <dynmanifest.h> ,
- <dynmanifest.meta.ttl> .
-
-dman:DynManifest
- a rdfs:Class ;
- rdfs:label "Dynamic Manifest" ;
- rdfs:subClassOf [
- a owl:Restriction ;
- owl:onProperty lv2:binary ;
- owl:minCardinality 1 ;
- rdfs:comment "A DynManifest MUST have at least one lv2:binary."
- ] ;
- rdfs:comment "Dynamic manifest for an LV2 binary." .
-
diff --git a/lv2/dynmanifest/manifest.ttl b/lv2/dynmanifest/manifest.ttl
deleted file mode 100644
index db27a73..0000000
--- a/lv2/dynmanifest/manifest.ttl
+++ /dev/null
@@ -1,9 +0,0 @@
-@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-
-<http://lv2plug.in/ns/ext/dynmanifest>
- a lv2:Specification ;
- lv2:minorVersion 1 ;
- lv2:microVersion 6 ;
- rdfs:seeAlso <dynmanifest.ttl> .
-
diff --git a/lv2/dynmanifest/meson.build b/lv2/dynmanifest/meson.build
deleted file mode 100644
index ba78972..0000000
--- a/lv2/dynmanifest/meson.build
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2022 David Robillard <d@drobilla.net>
-# SPDX-License-Identifier: CC0-1.0 OR ISC
-
-name = 'dynmanifest'
-path = 'ns' / 'ext' / 'dynmanifest'
-
-dynmanifest_data = files(
- 'dynmanifest.meta.ttl',
- 'dynmanifest.ttl',
- 'manifest.ttl',
-)
-
-headers = files(
- 'dynmanifest.h',
-)
-
-# Install specification bundle
-install_data(dynmanifest_data, install_dir: lv2dir / name + '.lv2')
-install_headers(headers, subdir: 'lv2' / name)
-if get_option('old_headers')
- install_headers(headers, subdir: 'lv2' / 'lv2plug.in' / path)
-endif
-
-# Build documentation
-if build_docs
- lv2_dynmanifest_docs = custom_target(
- name + '.html',
- command: lv2specgen_command_prefix + [
- '--docdir=../../html',
- '--style-uri=../../aux/style.css',
- '@INPUT@',
- '@OUTPUT@',
- ],
- depends: doc_deps,
- input: files('dynmanifest.ttl'),
- install: true,
- install_dir: lv2_docdir / 'ns' / 'ext',
- output: name + '.html',
- )
-endif