aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-01 18:43:28 +0000
committerDavid Robillard <d@drobilla.net>2011-04-01 18:43:28 +0000
commit22a9dc0354eb1eb6b764b57d88561879c7731600 (patch)
tree6b6410ade31205cf41e1e1551473370615fa14e9 /ext
parentb841b783a4bb7155c4d9d5a65c9e4e4af3a0c301 (diff)
downloadlv2-22a9dc0354eb1eb6b764b57d88561879c7731600.tar.xz
Tidy.
Fix copyright header (sloppy copy/paste artifact). Switch header to MIT license (same as data).
Diffstat (limited to 'ext')
-rw-r--r--ext/files.lv2/files.h82
-rw-r--r--ext/files.lv2/files.ttl46
2 files changed, 70 insertions, 58 deletions
diff --git a/ext/files.lv2/files.h b/ext/files.lv2/files.h
index 4f0564f..4b93331 100644
--- a/ext/files.lv2/files.h
+++ b/ext/files.lv2/files.h
@@ -1,24 +1,29 @@
-/* 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>.
- */
+/*
+ Copyright 2010-2011 David Robillard <d@drobilla.net>
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+ @file files.h
+ C API for the LV2 Files extension <http://lv2plug.in/ns/ext/files>.
+*/
#ifndef LV2_FILES_H
#define LV2_FILES_H
@@ -31,24 +36,31 @@ extern "C" {
typedef void* LV2_Files_FileSupport_Data;
-/** Feature structure passed by host to instantiate with feature URI
- * <http://lv2plug.in/ns/ext/files#fileSupport>.
- */
+/**
+ files:FileSupport 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 @ data pointed to an
+ instance of this struct.
+*/
typedef struct {
+ /**
+ Opaque host data.
+ */
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.
- */
+ /**
+ 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 instance its own files directory).
+
+ @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);
diff --git a/ext/files.lv2/files.ttl b/ext/files.lv2/files.ttl
index e3cf719..6b2b3ca 100644
--- a/ext/files.lv2/files.ttl
+++ b/ext/files.lv2/files.ttl
@@ -1,6 +1,5 @@
# LV2 Files Extension
-# Copyright (C) 2010 Leonard Ritter <paniq@paniq.org>
-# Copyright (C) 2010 David Robillard <d@drobilla.net>
+# Copyright 2010-2011 David Robillard <d@drobilla.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -20,9 +19,9 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
-@prefix files: <http://lv2plug.in/ns/ext/files#> .
-@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
+@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix files: <http://lv2plug.in/ns/ext/files#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@@ -43,19 +42,20 @@
storing arbitrary data (e.g. waveforms), which can be persisted using
the <a href="http://lv2plug.in/ns/ext/persist">LV2 Persist</a> extension.
This allows plugins to work with potentially very large data via files,
-and save/restore these files.</p>
+and save/restore these files across plugin instances.</p>
<p>The motivating idea behind this extension is that all details of file
-management must be handled by the host in whatever way is most appropriate for
-that host. Plugins MUST NOT make any assumption about filesystem locations
-beyond what is explicitly guaranteed by this extension.</p>
+management MUST be handled by the host in whatever way is most appropriate for
+that host, since hosts may have very different requirements. Plugins MUST NOT
+make any assumption about filesystem locations beyond what is explicitly
+guaranteed by this extension.</p>
-<p>To create a new file, plugins request a filename from the host. This way,
+<p>To create a new file, plugins request a filename from the host. This way,
the host is aware of files used by the plugin and can use an appropriate
location for them that the plugin alone could not know (e.g. using an
appropriate disk volume for recording).</p>
-<p>Plugins may also use pre-existing files from elsewhere on the filesystem.
+<p>Plugins MAY also use pre-existing files from elsewhere on the filesystem.
Using the LV2 Persist extension, the host can save both these types of files
in an appropriate way (by e.g. storing a link, or copying the file to export
or archive a project).</p>
@@ -64,17 +64,17 @@ or archive a project).</p>
files:fileSupport a lv2:Feature ;
rdfs:label "Support for plugin-created files" ;
lv2:documentation """
-<p>This feature allows plugins to use pre-existing or newly created files,
-and files them (e.g. across project saves and restores). If a host supports
-this feature it passes a LV2_Files_FileSupport structure to the plugins
-instantiate method as a feature (with URI
-http://lv2plug.in/ns/ext/files#FileSupport). This structure provides
-a function the plugin can use to create new file names. If and only if the
-host supports this feature, the plugin MAY files and restore values of
-type LV2_FILES_FILENAME.</p>
+
+<p>This feature allows plugins to use pre-existing or newly created files, and
+persist them (e.g. across project saves and restores). If a host supports this
+feature it passes a LV2_Files_FileSupport structure to the plugins instantiate
+method as a feature (with URI http://lv2plug.in/ns/ext/files#FileSupport). This
+structure provides a function the plugin can use to create new file names. If
+and only if the host supports this feature, the plugin MAY files and restore
+values of type LV2_FILES_FILENAME.</p>
<p>A plugin SHOULD use this facility to create any new files it may need
-(e.g. samples, waveforms for recording). Plugins MUST NOT expect their
+(e.g. samples, waveforms for recording). Plugins MUST NOT expect their
state to be correctly restored if they do not use this mechanism to
create new files.</p>
""" .
@@ -82,12 +82,12 @@ create new files.</p>
files:FilePath a atom:AtomType ;
rdfs:label "File Path" ;
lv2:documentation """
-The full path to a file on the local filesystem. The format of a
+The full path to a file on the local filesystem. The format of a
files:filePath is a C string (escaped or otherwise restricted in whatever way
-necessary for the system). This URI (http://lv2plug.in/ns/ext/files#FilePath),
+necessary for the system). This URI (http://lv2plug.in/ns/ext/files#FilePath),
mapped to an integer, should be used as the <code>type</code> parameter with
-the LV2 Persist extension to persist a file. When persisting a files:FilePath,
+the LV2 Persist extension to persist a file. When persisting a files:FilePath,
the plugin MUST NOT assume that the same path will be restored (i.e. the
-host MAY choose to store the file elsewhere). The plugin may, of course,
+host MAY choose to store the file elsewhere). The plugin may, of course,
assume that the actual contents of the file are equivalent when restored.
""" .