From 50c492d119b240946f35505a71c7ee2f59ed6b4a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 5 Jun 2012 19:47:16 +0000 Subject: Use LV2 buf-size extension. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4493 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/AtomReader.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/shared') diff --git a/src/shared/AtomReader.cpp b/src/shared/AtomReader.cpp index cd871079..2bdd9fe1 100644 --- a/src/shared/AtomReader.cpp +++ b/src/shared/AtomReader.cpp @@ -80,6 +80,22 @@ AtomReader::atom_to_uri(const LV2_Atom* atom) } } +bool +AtomReader::is_message(URIs& uris, const LV2_Atom* msg) +{ + if (msg->type != uris.atom_Blank && msg->type != uris.atom_Resource) { + return false; + } + + const LV2_Atom_Object* obj = (const LV2_Atom_Object*)msg; + return (obj->body.otype == uris.patch_Get || + obj->body.otype == uris.patch_Delete || + obj->body.otype == uris.patch_Put || + obj->body.otype == uris.patch_Patch || + obj->body.otype == uris.patch_Move || + obj->body.otype == uris.patch_Response); +} + bool AtomReader::write(const LV2_Atom* msg) { -- cgit v1.2.1