From 948d44984373f7af868ff676c97da6a5657d8425 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 6 Apr 2011 14:59:37 +0000 Subject: Update LV2 files extension. git-svn-id: svn://localhost/ardour2/branches/3.0@9301 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/lv2ext/lv2_files.h | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'libs') diff --git a/libs/ardour/lv2ext/lv2_files.h b/libs/ardour/lv2ext/lv2_files.h index 2ffb9643c6..f996e2ed16 100644 --- a/libs/ardour/lv2ext/lv2_files.h +++ b/libs/ardour/lv2ext/lv2_files.h @@ -32,17 +32,18 @@ extern "C" { #endif -#define LV2_FILES_URI "http://lv2plug.in/ns/ext/files" -#define LV2_FILES_FILE_SUPPORT_URI LV2_FILES_URI "#fileSupport" +#define LV2_FILES_URI "http://lv2plug.in/ns/ext/files" +#define LV2_FILES_PATH_SUPPORT_URI LV2_FILES_URI "#pathSupport" +#define LV2_FILES_NEW_FILE_SUPPORT_URI LV2_FILES_URI "#newFileSupport" typedef void* LV2_Files_Host_Data; /** - files:fileSupport feature struct. + files:pathSupport feature struct. To support this feature, the host MUST pass an LV2_Feature struct with @a - URI "http://lv2plug.in/ns/ext/files#fileSupport" and @a data pointed to an - instance of this struct. + URI @ref LV2_FILES_PATH_SUPPORT_URI and @a data pointed to an instance of + this struct. */ typedef struct { @@ -95,6 +96,21 @@ typedef struct { char* (*absolute_path)(LV2_Files_Host_Data host_data, const char* abstract_path); +} LV2_Files_Path_Support; + +/** + files:newFileSupport feature struct. + + To support this feature, the host MUST pass an LV2_Feature struct with @a + URI @ref LV2_FILES_NEW_FILE_SUPPORT_URI and @a data pointed to an instance + of this struct. +*/ +typedef struct { + + /** + Opaque host data. + */ + LV2_Files_Host_Data host_data; /** Return an absolute path the plugin may use to create a new file. @@ -107,7 +123,7 @@ typedef struct { giving each plugin instance its own state directory. The returned path is absolute and thus suitable for creating and using a file, but NOT suitable for storing in plugin state (it MUST be mapped to an abstract - path using @ref abstract_path in order to do so). + path using @ref LV2_Files_Path_Support::abstract_path to do so). This function may be called from any non-realtime context. The caller is responsible for freeing the returned value. @@ -115,8 +131,7 @@ typedef struct { char* (*new_file_path)(LV2_Files_Host_Data host_data, const char* relative_path); - -} LV2_Files_File_Support; +} LV2_Files_New_File_Support; #ifdef __cplusplus } /* extern "C" */ -- cgit v1.2.3