summaryrefslogtreecommitdiffstats
path: root/sratom/sratom.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-03 21:03:41 +0000
committerDavid Robillard <d@drobilla.net>2012-03-03 21:03:41 +0000
commita91b37a822fe366be5a582953857cb29dead8a36 (patch)
tree08beb4593c233a4c935a9a256a98339d1f4558ac /sratom/sratom.h
parent4742300f40eb8831ab36376fa7c18dcbc38b32da (diff)
downloadsratom-a91b37a822fe366be5a582953857cb29dead8a36.tar.gz
sratom-a91b37a822fe366be5a582953857cb29dead8a36.tar.bz2
sratom-a91b37a822fe366be5a582953857cb29dead8a36.zip
Add forge sink and only require a URID_Unmap for writing.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4017 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'sratom/sratom.h')
-rw-r--r--sratom/sratom.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/sratom/sratom.h b/sratom/sratom.h
index fdbad78..6398135 100644
--- a/sratom/sratom.h
+++ b/sratom/sratom.h
@@ -65,8 +65,7 @@ typedef struct SratomImpl Sratom;
*/
SRATOM_API
Sratom*
-sratom_new(LV2_URID_Map* map,
- LV2_URID_Unmap* unmap);
+sratom_new(LV2_URID_Map* map);
/**
Free an Atom serialisation.
@@ -82,6 +81,7 @@ sratom_free(Sratom* sratom);
SRATOM_API
void
sratom_write(Sratom* sratom,
+ LV2_URID_Unmap* unmap,
SerdWriter* writer,
uint32_t flags,
const SerdNode* subject,
@@ -109,6 +109,7 @@ sratom_read(Sratom* sratom,
SRATOM_API
char*
sratom_to_turtle(Sratom* sratom,
+ LV2_URID_Unmap* unmap,
const SerdNode* subject,
const SerdNode* predicate,
uint32_t type,
@@ -127,6 +128,24 @@ sratom_from_turtle(Sratom* sratom,
const char* str);
/**
+ A convenient resizing string sink for LV2_Atom_Forge.
+ The handle must point to an initialized SerdChunk.
+*/
+SRATOM_API
+LV2_Atom_Forge_Ref
+sratom_forge_sink(LV2_Atom_Forge_Sink_Handle handle,
+ const void* buf,
+ uint32_t size);
+
+/**
+ The corresponding deref function for sratom_forge_sink.
+*/
+SRATOM_API
+LV2_Atom*
+sratom_forge_deref(LV2_Atom_Forge_Sink_Handle handle,
+ LV2_Atom_Forge_Ref ref);
+
+/**
@}
*/