Better RDF library abstraction (just use URIs, don't depend on node object style).
[lv2.git] / ext / files.lv2 / files.h
blob4f0564f2a88836383b03f23ea179a3ae52bc64d3
1 /* lv2_files.h - C header file for the LV2 Files extension.
2 * Copyright (C) 2010 Leonard Ritter <paniq@paniq.org>
4 * This header is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This header is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this header; if not, write to the Free Software Foundation,
16 * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
19 /** @file
20 * C header for the LV2 Files extension <http://lv2plug.in/ns/ext/files>.
23 #ifndef LV2_FILES_H
24 #define LV2_FILES_H
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 #define LV2_FILES_URI "http://lv2plug.in/ns/ext/files"
32 typedef void* LV2_Files_FileSupport_Data;
34 /** Feature structure passed by host to instantiate with feature URI
35 * <http://lv2plug.in/ns/ext/files#fileSupport>.
37 typedef struct {
39 LV2_Files_FileSupport_Data data;
41 /** Return the full path that should be used for a file owned by this
42 * plugin called @a name. The plugin can assume @a name belongs to a
43 * namespace dedicated to that plugin instance (i.e. hosts MUST ensure
44 * this, e.g. by giving each plugin its own directory for files, or
45 * mangling filenames somehow).
47 * @param data MUST be the @a data member of this struct.
48 * @param name The name of the file.
49 * @return A newly allocated path which the plugin may use to create a new
50 * file. The plugin is responsible for freeing the returned string.
52 char* new_file_path(LV2_Files_FileSupport_Data data,
53 const char* name);
55 } LV2_Files_FileSupport;
57 #ifdef __cplusplus
58 } /* extern "C" */
59 #endif
61 #endif /* LV2_FILES_H */