diff options
author | Robin Gareus <robin@gareus.org> | 2018-10-27 21:11:27 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-27 22:22:02 +0200 |
commit | dfe71a21e5a190e5228964265c62416779454bec (patch) | |
tree | 4c1444986481394799bd06499e0eb105b9d83c0c /midnam_lv2.h | |
parent | 7f84f53bad767dfe2d1a2900b58c4dc32e9a8059 (diff) |
Prototype LV2 midname extension
Diffstat (limited to 'midnam_lv2.h')
-rw-r--r-- | midnam_lv2.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/midnam_lv2.h b/midnam_lv2.h new file mode 100644 index 0000000..a8e3f8e --- /dev/null +++ b/midnam_lv2.h @@ -0,0 +1,37 @@ +#define LV2_MIDNAM_URI "http://ardour.org/lv2/midnam" +#define LV2_MIDNAM_PREFIX LV2_MIDNAM_URI "#" +#define LV2_MIDNAM__interface LV2_MIDNAM_PREFIX "interface" +#define LV2_MIDNAM__update LV2_MIDNAM_PREFIX "update" + +typedef void* LV2_Midnam_Handle; + +/** a LV2 Feature provided by the Host to the plugin */ +typedef struct { + /** Opaque host data */ + LV2_Midnam_Handle handle; + /** Request from run() that the host should re-read the midnam */ + void (*update)(LV2_Midnam_Handle handle); +} LV2_Midnam; + +typedef struct { + /** Query midnam document. The plugin + * is expected to return a null-terminated XML + * text which is a valid midnam desciption + * (or NULL in case of error). + * + * The midnam <Model> must be unique and + * specific for the given plugin-instance. + */ + char* (*midnam)(LV2_Handle instance); + + /** The unique model id used ith the midnam, + * (or NULL). + */ + char* (*model)(LV2_Handle instance); + + /** free allocated strings. The host + * calls this for every value returned by + * \ref midnam and \ref model. + */ + void (*free)(char*); +} LV2_Midnam_Interface; |