Fix last commit
[carla.git] / source / includes / lv2 / midnam.h
blob4c2d9988eeca78d128d38f26d6f86b8136fd38a4
1 /*
2 Copyright 2016 Robin Gareus <robin@gareus.org>
3 Permission to use, copy, modify, and/or distribute this software for any
4 purpose with or without fee is hereby granted, provided that the above
5 copyright notice and this permission notice appear in all copies.
6 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
12 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 #ifndef LV2_MIDNAM_H
16 #define LV2_MIDNAM_H
18 #include "lv2.h"
20 /**
21 @defgroup lv2midnam MIDI Naming
25 #define LV2_MIDNAM_URI "http://ardour.org/lv2/midnam"
26 #define LV2_MIDNAM_PREFIX LV2_MIDNAM_URI "#"
27 #define LV2_MIDNAM__interface LV2_MIDNAM_PREFIX "interface"
28 #define LV2_MIDNAM__update LV2_MIDNAM_PREFIX "update"
30 typedef void* LV2_Midnam_Handle;
32 /** a LV2 Feature provided by the Host to the plugin */
33 typedef struct {
34 /** Opaque host data */
35 LV2_Midnam_Handle handle;
36 /** Request from run() that the host should re-read the midnam */
37 void (*update)(LV2_Midnam_Handle handle);
38 } LV2_Midnam;
40 typedef struct {
41 /** Query midnam document. The plugin
42 * is expected to return a null-terminated XML
43 * text which is a valid midnam desciption
44 * (or NULL in case of error).
46 * The midnam \<Model\> must be unique and
47 * specific for the given plugin-instance.
49 char* (*midnam)(LV2_Handle instance);
51 /** The unique model id used ith the midnam,
52 * (or NULL).
54 char* (*model)(LV2_Handle instance);
56 /** free allocated strings. The host
57 * calls this for every value returned by
58 * \ref midnam and \ref model.
60 void (*free)(char*);
61 } LV2_Midnam_Interface;
63 #endif