aboutsummaryrefslogtreecommitdiffstats
path: root/ext/message.lv2/message.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-10-17 01:08:23 +0000
committerDavid Robillard <d@drobilla.net>2010-10-17 01:08:23 +0000
commit591d09e1923164220485e843ae3161090d5dc0ec (patch)
tree1a1adcd5e0e37e28b2570fee5ac47508ca403000 /ext/message.lv2/message.h
parent1bde548b3c2c0ae5ce5a8f849ada96c2e8735217 (diff)
downloadlv2-591d09e1923164220485e843ae3161090d5dc0ec.tar.xz
Create new Message extension, and remove message type definition from Atom extension.
Clean up Atom extension and define more struct types in header.
Diffstat (limited to 'ext/message.lv2/message.h')
-rw-r--r--ext/message.lv2/message.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/ext/message.lv2/message.h b/ext/message.lv2/message.h
new file mode 100644
index 0000000..45391c3
--- /dev/null
+++ b/ext/message.lv2/message.h
@@ -0,0 +1,46 @@
+/* lv2_message.h - C header file for the LV2 Message extension.
+ * Copyright (C) 2010 David Robillard <http://drobilla.net>
+ *
+ * This header is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This header is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this header; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
+ */
+
+/** @file
+ * C header for the LV2 Message extension <http://lv2plug.in/ns/ext/message>.
+ */
+
+#ifndef LV2_MESSAGE_H
+#define LV2_MESSAGE_H
+
+#define LV2_MESSAGE_URI "http://lv2plug.in/ns/ext/message"
+
+#include <stdint.h>
+#include <stddef.h>
+
+#include "lv2/http/lv2plug.in/ns/ext/atom/atom.h"
+
+/** An LV2 Message.
+ *
+ * A "Message" is an Atom of type message:Message. The payload of a Message
+ * is a key/value dictionary with URI mapped integer keys (uint32_t), followed
+ * by a key/value dictionary with URI mapped integer keys and Atom values
+ * (atom:Blank, i.e. LV2_).
+ */
+typedef struct _LV2_Message_Message {
+ uint32_t selector; /***< Selector URI mapped to integer */
+ LV2_Atom triples; /***< Always an atom:Triples */
+} LV2_Message_Message;
+
+#endif /* LV2_MESSAGE_H */
+