Skip to content

Instantly share code, notes, and snippets.

@sadko4u
Created February 13, 2019 13:48
Show Gist options
  • Save sadko4u/8f11ae5632424c30c0578ba233a899a4 to your computer and use it in GitHub Desktop.
Save sadko4u/8f11ae5632424c30c0578ba233a899a4 to your computer and use it in GitHub Desktop.
#define LV2_URID__batchMap LV2_URID_PREFIX "batchMap" ///< http://lv2plug.in/ns/ext/urid#batchMap
#define LV2_URID__batchUnmap LV2_URID_PREFIX "batchUnmap" ///< http://lv2plug.in/ns/ext/urid#batchUnmap
#define LV2_URID_BATCH_MAP_URI LV2_URID__batchMap
#define LV2_URID_BATCH_UNMAP_URI LV2_URID__batchUnmap
#ifdef __cplusplus
extern "C" {
#endif
/**
Opaque pointer to host data for LV2_URID_BatchMap.
*/
typedef void* LV2_URID_BatchMap_Handle;
/**
Opaque pointer to host data for LV2_URID_BatchUnmap.
*/
typedef void* LV2_URID_BatchUnmap_Handle;
/**
URID Batch Map Feature (LV2_URID__batchMap)
*/
typedef struct _LV2_URID_BatchMap {
/**
Opaque pointer to host data.
This MUST be passed to map() whenever it is called.
Otherwise, it must not be interpreted in any way.
*/
LV2_URID_BatchMap_Handle handle;
/**
Perform mapping of multiple URIs
@param handle Must be the 'handle' member of this struct
@param count The number of URIDs to map
@param urids The pointer to the beginning of array to store URIDs
@param uris The pointer to the beginning of array containing URI strings
*/
LV2_URID (*map)(
LV2_URID_BatchMap_Handle handle,
size_t count,
URID *urids,
const char **uris
);
} LV2_URID_BatchMap;
/**
URID Batch Unmap Feature (LV2_URID__batchUnmap)
*/
typedef struct _LV2_URID_BatchUnmap {
/**
Opaque pointer to host data.
This MUST be passed to unmap() whenever it is called.
Otherwise, it must not be interpreted in any way.
*/
LV2_URID_BatchUnmap_Handle handle;
/**
Perform unmapping of multiple URIDs
@param handle Must be the callback_data member of this struct.
@param urid The ID to be mapped back to the URI string.
*/
const char* (*unmap)(
LV2_URID_BatchUnmap_Handle handle,
size_t count,
const URID *urids
);
} LV2_URID_BatchUnmap;
#ifdef __cplusplus
} /* extern "C" */
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment