1 /* Portable file-based implementation of LV2 Persist.
2 * See <http://lv2plug.in/ns/ext/persist> for details.
4 * This file is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
9 * This file 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 General Public License
14 * You should have received a copy of the GNU General Public License along
15 * with this file; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26 typedef struct _LV2PFile* LV2PFile;
27 typedef struct _LV2PFile_Iterator* LV2PFile_Iterator;
31 LV2_PFILE_UNKNOWN_ERROR = 1,
36 /** Open/Create a new persist file. */
38 lv2_pfile_open(const char* path, bool write);
40 /** Write a record to a persist file. */
42 lv2_pfile_write(LV2PFile file,
48 /** Read a record from a persist file.
49 * @a key and @a value are allocated with malloc and must be freed by caller.
52 lv2_pfile_read(LV2PFile file,
60 /** Close a persist file.
61 * After this call, @a file is invalid.
64 lv2_pfile_close(LV2PFile file);