data-access.h (2264B)
1 /* 2 LV2 Data Access Extension 3 Copyright 2008-2016 David Robillard <http://drobilla.net> 4 5 Permission to use, copy, modify, and/or distribute this software for any 6 purpose with or without fee is hereby granted, provided that the above 7 copyright notice and this permission notice appear in all copies. 8 9 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /** 19 @defgroup data-access Data Access 20 21 Access to plugin extension_data() for UIs, see 22 <http://lv2plug.in/ns/ext/data-acess> for details. 23 24 @{ 25 */ 26 27 #ifndef LV2_DATA_ACCESS_H 28 #define LV2_DATA_ACCESS_H 29 30 #define LV2_DATA_ACCESS_URI "http://lv2plug.in/ns/ext/data-access" ///< http://lv2plug.in/ns/ext/data-access 31 #define LV2_DATA_ACCESS_PREFIX LV2_DATA_ACCESS_URI "#" ///< http://lv2plug.in/ns/ext/data-access# 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 /** 38 The data field of the LV2_Feature for this extension. 39 40 To support this feature the host must pass an LV2_Feature struct to the 41 instantiate method with URI "http://lv2plug.in/ns/ext/data-access" 42 and data pointed to an instance of this struct. 43 */ 44 typedef struct { 45 /** 46 A pointer to a method the UI can call to get data (of a type specified 47 by some other extension) from the plugin. 48 49 This call never is never guaranteed to return anything, UIs should 50 degrade gracefully if direct access to the plugin data is not possible 51 (in which case this function will return NULL). 52 53 This is for access to large data that can only possibly work if the UI 54 and plugin are running in the same process. For all other things, use 55 the normal LV2 UI communication system. 56 */ 57 const void* (*data_access)(const char* uri); 58 } LV2_Extension_Data_Feature; 59 60 #ifdef __cplusplus 61 } /* extern "C" */ 62 #endif 63 64 #endif /* LV2_DATA_ACCESS_H */ 65 66 /** 67 @} 68 */