diff options
author | David Robillard <d@drobilla.net> | 2007-04-19 16:49:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-04-19 16:49:25 +0000 |
commit | 98ea88b5fd404ff4ba43709f731ba074f291eb5b (patch) | |
tree | 1318604ebfedd677ac8f6cbad3f9d58e5922a1c4 /src/private_types.h | |
parent | 6626f77037747855e7dcec64697d436c4300d7c2 (diff) | |
download | lilv-98ea88b5fd404ff4ba43709f731ba074f291eb5b.tar.gz lilv-98ea88b5fd404ff4ba43709f731ba074f291eb5b.tar.bz2 lilv-98ea88b5fd404ff4ba43709f731ba074f291eb5b.zip |
Added Redland dependency, using in-memory RDF models.
Numerous significant performance improvements.
git-svn-id: http://svn.drobilla.net/lad/slv2@457 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/private_types.h')
-rw-r--r-- | src/private_types.h | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/src/private_types.h b/src/private_types.h index 027d68d..12f74cb 100644 --- a/src/private_types.h +++ b/src/private_types.h @@ -25,13 +25,21 @@ extern "C" { #include <stdbool.h> #include <stddef.h> -#include <raptor.h> -#include <slv2/lv2.h> +#include <librdf.h> +#include <slv2/pluginlist.h> -/** The URI of the lv2.ttl file. +/** Reference to a port on some plugin. */ -extern raptor_uri* slv2_ontology_uri; +struct _Port { + uint32_t index; ///< LV2 index + char* symbol; ///< LV2 symbol + //char* node_id; ///< RDF Node ID +}; + +SLV2Port slv2_port_new(uint32_t index, const char* symbol/*, const char* node_id*/); +SLV2Port slv2_port_duplicate(SLV2Port port); +void slv2_port_free(SLV2Port port); /** Record of an installed/available plugin. @@ -40,28 +48,42 @@ extern raptor_uri* slv2_ontology_uri; * paths of relevant files, the actual data therein isn't loaded into memory. */ struct _Plugin { - char* plugin_uri; - char* bundle_url; // Bundle directory plugin was loaded from + int deletable; + struct _Model* model; + librdf_uri* plugin_uri; +// char* bundle_url; // Bundle directory plugin was loaded from + char* binary_uri; // lv2:binary raptor_sequence* data_uris; // rdfs::seeAlso - char* lib_uri; // lv2:binary + raptor_sequence* ports; + librdf_storage* storage; + librdf_model* rdf; }; - -/** Pimpl portion of SLV2Instance */ -struct _InstanceImpl { - void* lib_handle; -}; +SLV2Plugin slv2_plugin_new(SLV2Model model, librdf_uri* uri, const char* binary_uri); +void slv2_plugin_load(SLV2Plugin p); -/** List of references to plugins available for loading (private type) */ +/** List of references to plugins available for loading */ struct _PluginList { size_t num_plugins; struct _Plugin** plugins; }; +/** Pimpl portion of SLV2Instance */ +struct _InstanceImpl { + void* lib_handle; +}; -/** An ordered, indexable collection of strings. */ -//typedef raptor_sequence* SLV2Strings; + +/** Model of LV2 (RDF) data loaded from bundles. + */ +struct _Model { + librdf_world* world; + librdf_storage* storage; + librdf_model* model; + librdf_parser* parser; + SLV2Plugins plugins; +}; #ifdef __cplusplus |