plugin.h   plugin.h 
skipping to change at line 30 skipping to change at line 30
#define __SLV2_PLUGIN_H__ #define __SLV2_PLUGIN_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "slv2/types.h" #include "slv2/types.h"
#include "slv2/port.h" #include "slv2/port.h"
#include "slv2/values.h" #include "slv2/collections.h"
/** \defgroup slv2_data Plugin data access /** \defgroup slv2_data Plugin data access
* *
* These functions work exclusively with the plugin's RDF data, * These functions work exclusively with the plugin's RDF data,
* they do not access the plugin's shared library in any way. * they do not access the plugin's shared library in any way.
* *
* An SLV2Plugin contains an in-memory cache of the plugin data, loaded * An SLV2Plugin contains an in-memory cache of the plugin data, loaded
* on demand. Duplicating plugins should be avoided when possible for * on demand. Duplicating plugins should be avoided when possible for
* performance reasons. * performance reasons.
* *
skipping to change at line 202 skipping to change at line 202
* sensibly represented as an SLV2Values (e.g. blank nodes). * sensibly represented as an SLV2Values (e.g. blank nodes).
* *
* \a predicate must be either a URI or a QName. * \a predicate must be either a URI or a QName.
* See SLV2URIType documentation for examples. * See SLV2URIType documentation for examples.
* *
* Return value must be freed by caller with slv2_values_free. * Return value must be freed by caller with slv2_values_free.
* *
* Time = Query * Time = Query
*/ */
SLV2Values SLV2Values
slv2_plugin_get_value_for_subject(SLV2Plugin p, slv2_plugin_get_value_for_subject(SLV2Plugin p,
SLV2Value subject_uri, SLV2Value subject_uri,
SLV2Value predicate_uri); SLV2Value predicate_uri);
/** Return whether a feature is supported by a plugin. /** Return whether a feature is supported by a plugin.
* *
* This will return true if the feature is an optional or required feature * This will return true if the feature is an optional or required feature
* of the plugin. * of the plugin.
* *
* Time = Query * Time = Query
*/ */
bool bool
slv2_plugin_has_feature(SLV2Plugin p, slv2_plugin_has_feature(SLV2Plugin p,
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 plugininstance.h   plugininstance.h 
skipping to change at line 26 skipping to change at line 26
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef __SLV2_PLUGININSTANCE_H__ #ifndef __SLV2_PLUGININSTANCE_H__
#define __SLV2_PLUGININSTANCE_H__ #define __SLV2_PLUGININSTANCE_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <assert.h> #include <stddef.h>
#include <stdlib.h>
#include "lv2.h" #include "lv2.h"
#include "slv2/plugin.h" #include "slv2/plugin.h"
#include "slv2/port.h" #include "slv2/port.h"
typedef struct _InstanceImpl* SLV2InstanceImpl; typedef struct _InstanceImpl* SLV2InstanceImpl;
/** \cond IGNORE */ /** \cond IGNORE */
/* Instance of a plugin. /* Instance of a plugin.
* *
skipping to change at line 96 skipping to change at line 97
#ifndef LIBSLV2_SOURCE #ifndef LIBSLV2_SOURCE
/** Get the URI of the plugin which \a instance is an instance of. /** Get the URI of the plugin which \a instance is an instance of.
* *
* Returned string is shared and must not be modified or deleted. * Returned string is shared and must not be modified or deleted.
*/ */
static inline const char* static inline const char*
slv2_instance_get_uri(SLV2Instance instance) slv2_instance_get_uri(SLV2Instance instance)
{ {
assert(instance);
assert(instance->lv2_descriptor);
return instance->lv2_descriptor->URI; return instance->lv2_descriptor->URI;
} }
/** Connect a port to a data location. /** Connect a port to a data location.
* *
* This may be called regardless of whether the plugin is activated, * This may be called regardless of whether the plugin is activated,
* activation and deactivation does not destroy port connections. * activation and deactivation does not destroy port connections.
*/ */
static inline void static inline void
slv2_instance_connect_port(SLV2Instance instance, slv2_instance_connect_port(SLV2Instance instance,
uint32_t port_index, uint32_t port_index,
void* data_location) void* data_location)
{ {
assert(instance);
assert(instance->lv2_descriptor);
assert(instance->lv2_descriptor->connect_port);
instance->lv2_descriptor->connect_port instance->lv2_descriptor->connect_port
(instance->lv2_handle, port_index, data_location); (instance->lv2_handle, port_index, data_location);
} }
/** Activate a plugin instance. /** Activate a plugin instance.
* *
* This resets all state information in the plugin, except for port data * This resets all state information in the plugin, except for port data
* locations (as set by slv2_instance_connect_port). This MUST be called * locations (as set by slv2_instance_connect_port). This MUST be called
* before calling slv2_instance_run. * before calling slv2_instance_run.
*/ */
static inline void static inline void
slv2_instance_activate(SLV2Instance instance) slv2_instance_activate(SLV2Instance instance)
{ {
assert(instance);
assert(instance->lv2_descriptor);
if (instance->lv2_descriptor->activate) if (instance->lv2_descriptor->activate)
instance->lv2_descriptor->activate(instance->lv2_handle); instance->lv2_descriptor->activate(instance->lv2_handle);
} }
/** Run \a instance for \a sample_count frames. /** Run \a instance for \a sample_count frames.
* *
* If the hint lv2:hardRtCapable is set for this plugin, this function is * If the hint lv2:hardRtCapable is set for this plugin, this function is
* guaranteed not to block. * guaranteed not to block.
*/ */
static inline void static inline void
slv2_instance_run(SLV2Instance instance, slv2_instance_run(SLV2Instance instance,
uint32_t sample_count) uint32_t sample_count)
{ {
assert(instance);
assert(instance->lv2_descriptor);
assert(instance->lv2_handle);
/*if (instance->lv2_descriptor->run)*/ /*if (instance->lv2_descriptor->run)*/
instance->lv2_descriptor->run(instance->lv2_handle, sample_c ount); instance->lv2_descriptor->run(instance->lv2_handle, sample_c ount);
} }
/** Deactivate a plugin instance. /** Deactivate a plugin instance.
* *
* Note that to run the plugin after this you must activate it, which will * Note that to run the plugin after this you must activate it, which will
* reset all state information (except port connections). * reset all state information (except port connections).
*/ */
static inline void static inline void
slv2_instance_deactivate(SLV2Instance instance) slv2_instance_deactivate(SLV2Instance instance)
{ {
assert(instance);
assert(instance->lv2_descriptor);
assert(instance->lv2_handle);
if (instance->lv2_descriptor->deactivate) if (instance->lv2_descriptor->deactivate)
instance->lv2_descriptor->deactivate(instance->lv2_handle); instance->lv2_descriptor->deactivate(instance->lv2_handle);
} }
/** Get extension data from the plugin instance. /** Get extension data from the plugin instance.
* *
* The type and semantics of the data returned is specific to the particula r * The type and semantics of the data returned is specific to the particula r
* extension, though in all cases it is shared and must not be deleted. * extension, though in all cases it is shared and must not be deleted.
*/ */
static inline const void* static inline const void*
slv2_instance_get_extension_data(SLV2Instance instance, slv2_instance_get_extension_data(SLV2Instance instance,
const char* uri) const char* uri)
{ {
assert(instance);
assert(instance->lv2_descriptor);
if (instance->lv2_descriptor->extension_data) if (instance->lv2_descriptor->extension_data)
return instance->lv2_descriptor->extension_data(uri); return instance->lv2_descriptor->extension_data(uri);
else else
return NULL; return NULL;
} }
/** Get the LV2_Descriptor of the plugin instance. /** Get the LV2_Descriptor of the plugin instance.
* *
* Normally hosts should not need to access the LV2_Descriptor directly, * Normally hosts should not need to access the LV2_Descriptor directly,
* use the slv2_instance_* functions. * use the slv2_instance_* functions.
* *
* The returned descriptor is shared and must not be deleted. * The returned descriptor is shared and must not be deleted.
*/ */
static inline const LV2_Descriptor* static inline const LV2_Descriptor*
slv2_instance_get_descriptor(SLV2Instance instance) slv2_instance_get_descriptor(SLV2Instance instance)
{ {
assert(instance);
assert(instance->lv2_descriptor);
return instance->lv2_descriptor; return instance->lv2_descriptor;
} }
/** Get the LV2_Handle of the plugin instance. /** Get the LV2_Handle of the plugin instance.
* *
* Normally hosts should not need to access the LV2_Handle directly, * Normally hosts should not need to access the LV2_Handle directly,
* use the slv2_instance_* functions. * use the slv2_instance_* functions.
* *
* The returned handle is shared and must not be deleted. * The returned handle is shared and must not be deleted.
*/ */
static inline LV2_Handle static inline LV2_Handle
slv2_instance_get_handle(SLV2Instance instance) slv2_instance_get_handle(SLV2Instance instance)
{ {
assert(instance);
assert(instance->lv2_descriptor);
return instance->lv2_handle; return instance->lv2_handle;
} }
#endif /* LIBSLV2_SOURCE */ #endif /* LIBSLV2_SOURCE */
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif
 End of changes. 9 change blocks. 
28 lines changed or deleted 2 lines changed or added


 port.h   port.h 
skipping to change at line 29 skipping to change at line 29
#ifndef __SLV2_PORT_H__ #ifndef __SLV2_PORT_H__
#define __SLV2_PORT_H__ #define __SLV2_PORT_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "slv2/types.h" #include "slv2/types.h"
#include "slv2/plugin.h" #include "slv2/plugin.h"
#include "slv2/port.h" #include "slv2/port.h"
#include "slv2/values.h" #include "slv2/collections.h"
/** \addtogroup slv2_data /** \addtogroup slv2_data
* @{ * @{
*/ */
/** Port analog of slv2_plugin_get_value. /** Port analog of slv2_plugin_get_value.
* *
* Time = Query * Time = Query
*/ */
SLV2Values SLV2Values
skipping to change at line 102 skipping to change at line 102
* *
* Time = Query * Time = Query
*/ */
SLV2Value SLV2Value
slv2_port_get_symbol(SLV2Plugin plugin, slv2_port_get_symbol(SLV2Plugin plugin,
SLV2Port port); SLV2Port port);
/** Get the name of a port. /** Get the name of a port.
* *
* This is guaranteed to return the untranslated name (the doap:name in the * This is guaranteed to return the untranslated name (the doap:name in the
* data file without a language tag). Returned value must be free()'d by * data file without a language tag). Returned value must be freed by
* the caller. * the caller.
* *
* Time = Query * Time = Query
*/ */
SLV2Value SLV2Value
slv2_port_get_name(SLV2Plugin plugin, slv2_port_get_name(SLV2Plugin plugin,
SLV2Port port); SLV2Port port);
/** Get all the classes of a port. /** Get all the classes of a port.
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 slv2.h   slv2.h 
skipping to change at line 26 skipping to change at line 26
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef __SLV2_H__ #ifndef __SLV2_H__
#define __SLV2_H__ #define __SLV2_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "slv2/collections.h"
#include "slv2/plugin.h" #include "slv2/plugin.h"
#include "slv2/pluginclass.h" #include "slv2/pluginclass.h"
#include "slv2/plugininstance.h" #include "slv2/plugininstance.h"
#include "slv2/plugins.h"
#include "slv2/pluginui.h" #include "slv2/pluginui.h"
#include "slv2/pluginuiinstance.h" #include "slv2/pluginuiinstance.h"
#include "slv2/pluginuis.h"
#include "slv2/port.h" #include "slv2/port.h"
#include "slv2/query.h"
#include "slv2/scalepoint.h"
#include "slv2/types.h" #include "slv2/types.h"
#include "slv2/util.h" #include "slv2/util.h"
#include "slv2/value.h" #include "slv2/value.h"
#include "slv2/values.h"
#include "slv2/scalepoint.h"
#include "slv2/scalepoints.h"
#include "slv2/world.h" #include "slv2/world.h"
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif
#endif /* __SLV2_H__ */ #endif /* __SLV2_H__ */
 End of changes. 5 change blocks. 
5 lines changed or deleted 3 lines changed or added


 types.h   types.h 
skipping to change at line 27 skipping to change at line 27
*/ */
#ifndef __SLV2_TYPES_H__ #ifndef __SLV2_TYPES_H__
#define __SLV2_TYPES_H__ #define __SLV2_TYPES_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
#define SLV2_NAMESPACE_LV2 "http://lv2plug.in/ns/lv2core#" #define SLV2_NAMESPACE_LV2 "http://lv2plug.in/ns/lv2core#"
#define SLV2_PORT_CLASS_PORT "http://lv2plug.in/ns/lv2core#Port" #define SLV2_PORT_CLASS_PORT "http://lv2plug.in/ns/lv2core#Port"
#define SLV2_PORT_CLASS_INPUT "http://lv2plug.in/ns/lv2core#InputPort" #define SLV2_PORT_CLASS_INPUT "http://lv2plug.in/ns/lv2core#InputPort"
#define SLV2_PORT_CLASS_OUTPUT "http://lv2plug.in/ns/lv2core#OutputPort" #define SLV2_PORT_CLASS_OUTPUT "http://lv2plug.in/ns/lv2core#OutputPort"
#define SLV2_PORT_CLASS_CONTROL "http://lv2plug.in/ns/lv2core#ControlPort" #define SLV2_PORT_CLASS_CONTROL "http://lv2plug.in/ns/lv2core#ControlPort"
#define SLV2_PORT_CLASS_AUDIO "http://lv2plug.in/ns/lv2core#AudioPort" #define SLV2_PORT_CLASS_AUDIO "http://lv2plug.in/ns/lv2core#AudioPort"
#define SLV2_PORT_CLASS_EVENT "http://lv2plug.in/ns/ext/event#EventPort" #define SLV2_PORT_CLASS_EVENT "http://lv2plug.in/ns/ext/event#EventPort"
#define SLV2_EVENT_CLASS_MIDI "http://lv2plug.in/ns/ext/midi#MidiEvent" #define SLV2_EVENT_CLASS_MIDI "http://lv2plug.in/ns/ext/midi#MidiEvent"
skipping to change at line 73 skipping to change at line 74
/** A collection of scale points. */ /** A collection of scale points. */
typedef void* SLV2ScalePoints; typedef void* SLV2ScalePoints;
/** A plugin UI */ /** A plugin UI */
typedef struct _SLV2UI* SLV2UI; typedef struct _SLV2UI* SLV2UI;
/** A collection of plugin UIs. */ /** A collection of plugin UIs. */
typedef void* SLV2UIs; typedef void* SLV2UIs;
/** A set of query results (conceptually a table) */
typedef struct _SLV2Results* SLV2Results;
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif #endif
#endif /* __SLV2_TYPES_H__ */ #endif /* __SLV2_TYPES_H__ */
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 value.h   value.h 
skipping to change at line 35 skipping to change at line 35
#include <stdbool.h> #include <stdbool.h>
#include "slv2/types.h" #include "slv2/types.h"
/** \addtogroup slv2_data /** \addtogroup slv2_data
* @{ * @{
*/ */
/** Create a new URI value. /** Create a new URI value.
* *
* Returned value must be freed by called with slv2_value_free. * Returned value must be freed by caller with slv2_value_free.
*/ */
SLV2Value SLV2Value
slv2_value_new_uri(SLV2World world, const char* uri); slv2_value_new_uri(SLV2World world, const char* uri);
/** Create a new string value (with no language).
*
* Returned value must be freed by caller with slv2_value_free.
*/
SLV2Value
slv2_value_new_string(SLV2World world, const char* str);
/** Create a new integer value.
*
* Returned value must be freed by caller with slv2_value_free.
*/
SLV2Value
slv2_value_new_int(SLV2World world, int val);
/** Create a new floating point value.
*
* Returned value must be freed by caller with slv2_value_free.
*/
SLV2Value
slv2_value_new_float(SLV2World world, float val);
/** Free an SLV2Value. /** Free an SLV2Value.
*/ */
void void
slv2_value_free(SLV2Value val); slv2_value_free(SLV2Value val);
/** Duplicate an SLV2Value. /** Duplicate an SLV2Value.
*/ */
SLV2Value SLV2Value
slv2_value_duplicate(SLV2Value val); slv2_value_duplicate(SLV2Value val);
skipping to change at line 63 skipping to change at line 84
slv2_value_equals(SLV2Value value, SLV2Value other); slv2_value_equals(SLV2Value value, SLV2Value other);
/** Return this value as a Turtle/SPARQL token. /** Return this value as a Turtle/SPARQL token.
* Examples: * Examples:
* <http://example.org/foo> * <http://example.org/foo>
* doap:name * doap:name
* "this is a string" * "this is a string"
* 1.0 * 1.0
* 1 * 1
* *
* Returned string is newly allocation and must be freed by caller. * Returned string is newly allocated and must be freed by caller.
*/ */
char* char*
slv2_value_get_turtle_token(SLV2Value value); slv2_value_get_turtle_token(SLV2Value value);
/** Return whether the value is a URI (resource). /** Return whether the value is a URI (resource).
* *
* Time = O(1) * Time = O(1)
*/ */
bool bool
slv2_value_is_uri(SLV2Value value); slv2_value_is_uri(SLV2Value value);
skipping to change at line 125 skipping to change at line 146
/** Return whether this value is a string literal. /** Return whether this value is a string literal.
* *
* Returns true if \a value is a string (but not numeric) value. * Returns true if \a value is a string (but not numeric) value.
* *
* Time = O(1) * Time = O(1)
*/ */
bool bool
slv2_value_is_string(SLV2Value value); slv2_value_is_string(SLV2Value value);
/** Return whether this value is a string literal. /** Return \a value as a string.
* *
* Time = O(1) * Time = O(1)
*/ */
const char* const char*
slv2_value_as_string(SLV2Value value); slv2_value_as_string(SLV2Value value);
/** Return whether this value is a decimal literal. /** Return whether this value is a decimal literal.
* *
* Time = O(1) * Time = O(1)
*/ */
 End of changes. 4 change blocks. 
3 lines changed or deleted 24 lines changed or added


 world.h   world.h 
skipping to change at line 27 skipping to change at line 27
*/ */
#ifndef __SLV2_WORLD_H__ #ifndef __SLV2_WORLD_H__
#define __SLV2_WORLD_H__ #define __SLV2_WORLD_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <librdf.h> #include <librdf.h>
#include "slv2/plugins.h" #include "slv2/collections.h"
#include "slv2/pluginclasses.h"
/** \defgroup slv2_world Global library state /** \defgroup slv2_world Global library state
* *
* The "world" represents all library state, and the data found in bundles' * The "world" represents all library state, and the data found in bundles'
* manifest.ttl (ie it is an in-memory index of all things LV2 found). * manifest.ttl (ie it is an in-memory index of all things LV2 found).
* Plugins (and plugin extensions) and the LV2 specification (and LV2 * Plugins (and plugin extensions) and the LV2 specification (and LV2
* extensions) itself can be queried from the world for use. * extensions) itself can be queried from the world for use.
* *
* Normal hosts which just want to easily load plugins by URI are strongly * Normal hosts which just want to easily load plugins by URI are strongly
* recommended to simply call \ref slv2_world_load_all to find all installe d * recommended to simply call \ref slv2_world_load_all to find all installe d
 End of changes. 1 change blocks. 
2 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/