diff options
author | David Robillard <d@drobilla.net> | 2010-10-04 18:21:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-10-04 18:21:08 +0000 |
commit | cef9811dac46a9d54dab0f0d82ce5c3ae032fc7c (patch) | |
tree | 632b911da25fc24b6b3d331d7ceffc22606b8e5b /ext/files.lv2/files.h | |
parent | 61842745ab15454ee66be54a6f3bcc148a75406f (diff) | |
download | lv2-cef9811dac46a9d54dab0f0d82ce5c3ae032fc7c.tar.xz |
Initial import of lv2plug.in universe.
Diffstat (limited to 'ext/files.lv2/files.h')
-rw-r--r-- | ext/files.lv2/files.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ext/files.lv2/files.h b/ext/files.lv2/files.h new file mode 100644 index 0000000..4f0564f --- /dev/null +++ b/ext/files.lv2/files.h @@ -0,0 +1,61 @@ +/* lv2_files.h - C header file for the LV2 Files extension. + * Copyright (C) 2010 Leonard Ritter <paniq@paniq.org> + * + * This header is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This header is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this header; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA + */ + +/** @file + * C header for the LV2 Files extension <http://lv2plug.in/ns/ext/files>. + */ + +#ifndef LV2_FILES_H +#define LV2_FILES_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define LV2_FILES_URI "http://lv2plug.in/ns/ext/files" + +typedef void* LV2_Files_FileSupport_Data; + +/** Feature structure passed by host to instantiate with feature URI + * <http://lv2plug.in/ns/ext/files#fileSupport>. + */ +typedef struct { + + LV2_Files_FileSupport_Data data; + + /** Return the full path that should be used for a file owned by this + * plugin called @a name. The plugin can assume @a name belongs to a + * namespace dedicated to that plugin instance (i.e. hosts MUST ensure + * this, e.g. by giving each plugin its own directory for files, or + * mangling filenames somehow). + * + * @param data MUST be the @a data member of this struct. + * @param name The name of the file. + * @return A newly allocated path which the plugin may use to create a new + * file. The plugin is responsible for freeing the returned string. + */ + char* new_file_path(LV2_Files_FileSupport_Data data, + const char* name); + +} LV2_Files_FileSupport; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* LV2_FILES_H */ |