Functions
Utilities

Detailed Description

Functions

static void * lv2_features_data (const LV2_Feature *const *features, const char *const uri)
 
static const char * lv2_features_query (const LV2_Feature *const *features,...)
 

Function Documentation

◆ lv2_features_data()

static void * lv2_features_data ( const LV2_Feature *const * features,
const char *const uri )
inlinestatic

Return the data for a feature in a features array.

If the feature is not found, NULL is returned. Note that this function is only useful for features with data, and can not detect features that are present but have NULL data.

◆ lv2_features_query()

static const char * lv2_features_query ( const LV2_Feature *const * features,
... )
inlinestatic

Query a features array.

This function allows getting several features in one call, and detect missing required features, with the same caveat of lv2_features_data().

The arguments should be a series of const char* uri, void** data, bool required, terminated by a NULL URI. The data pointers MUST be initialized to NULL. For example:

LV2_URID_Log* log = NULL;
LV2_URID_Map* map = NULL;
const char* missing = lv2_features_query(
features,
LV2_LOG__log, &log, false,
LV2_URID__map, &map, true,
NULL);
#define LV2_LOG__log
http://lv2plug.in/ns/ext/log#log
Definition log.h:28
static const char * lv2_features_query(const LV2_Feature *const *features,...)
Query a features array.
Definition lv2_util.h:66
#define LV2_URID__map
http://lv2plug.in/ns/ext/urid#map
Definition urid.h:24
URID Map Feature (LV2_URID__map)
Definition urid.h:56
Returns
NULL on success, otherwise the URI of this missing feature.