summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-06-05 19:47:16 +0000
committerDavid Robillard <d@drobilla.net>2012-06-05 19:47:16 +0000
commit50c492d119b240946f35505a71c7ee2f59ed6b4a (patch)
treef730f095ded4bd9f1293f55665a6e8a6b65df8a8 /src/shared
parent9c07b402fd51ec42a78d00881e70bf2cc284f0d6 (diff)
downloadingen-50c492d119b240946f35505a71c7ee2f59ed6b4a.tar.gz
ingen-50c492d119b240946f35505a71c7ee2f59ed6b4a.tar.bz2
ingen-50c492d119b240946f35505a71c7ee2f59ed6b4a.zip
Use LV2 buf-size extension.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4493 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/AtomReader.cpp16
1 files changed, 16 insertions, 0 deletions
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
@@ -81,6 +81,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)
{
if (msg->type != _uris.atom_Blank && msg->type != _uris.atom_Resource) {