diff options
author | David Robillard <d@drobilla.net> | 2011-01-30 22:18:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-30 22:18:41 +0000 |
commit | d136e0bbd0f0d30a1a6d519462f4ad7bee4812b1 (patch) | |
tree | e526472cf21ba671e7ec675033b8b70669724459 /src/slv2_internal.h | |
parent | d2ca87e3f2b8e38222f9c2a9f3235e4d270528c7 (diff) | |
download | lilv-d136e0bbd0f0d30a1a6d519462f4ad7bee4812b1.tar.gz lilv-d136e0bbd0f0d30a1a6d519462f4ad7bee4812b1.tar.bz2 lilv-d136e0bbd0f0d30a1a6d519462f4ad7bee4812b1.zip |
Completely abstract away use of librdf_stream for statement matching.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2876 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/slv2_internal.h')
-rw-r--r-- | src/slv2_internal.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/slv2_internal.h b/src/slv2_internal.h index 35a8f12..2d161cb 100644 --- a/src/slv2_internal.h +++ b/src/slv2_internal.h @@ -95,11 +95,6 @@ void slv2_plugin_load_if_necessary(SLV2Plugin p); void slv2_plugin_load_ports_if_necessary(SLV2Plugin p); void slv2_plugin_free(SLV2Plugin plugin); -librdf_stream* slv2_plugin_find_statements(SLV2Plugin plugin, - librdf_node* subject, - librdf_node* predicate, - librdf_node* object); - SLV2Value slv2_plugin_get_unique(SLV2Plugin p, librdf_node* subject, @@ -279,8 +274,23 @@ void slv2_scale_point_free(SLV2ScalePoint point); /* ********* Query Results********* */ -SLV2Values slv2_values_from_stream_i18n(SLV2Plugin p, - librdf_stream* stream); +typedef librdf_stream* SLV2Matches; + +SLV2Matches slv2_plugin_find_statements(SLV2Plugin plugin, + librdf_node* subject, + librdf_node* predicate, + librdf_node* object); + +static inline bool slv2_matches_next(SLV2Matches matches) { + return librdf_stream_next(matches); +} + +static inline bool slv2_matches_end(SLV2Matches matches) { + return librdf_stream_end(matches); +} + +SLV2Values slv2_values_from_stream_i18n(SLV2Plugin p, + SLV2Matches stream); /* ********* Utilities ********* */ |