LMMS
Loading...
Searching...
No Matches
lv2_state.h
Go to the documentation of this file.
1/*
2 Copyright 2010-2012 David Robillard <http://drobilla.net>
3 Copyright 2010 Leonard Ritter <paniq@paniq.org>
4
5 Permission to use, copy, modify, and/or distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
8
9 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*/
17
22
23#ifndef LV2_STATE_H
24#define LV2_STATE_H
25
26#include <stddef.h>
27#include <stdint.h>
28
29#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
30
31#define LV2_STATE_URI "http://lv2plug.in/ns/ext/state"
32#define LV2_STATE_PREFIX LV2_STATE_URI "#"
33
34#define LV2_STATE__State LV2_STATE_PREFIX "State"
35#define LV2_STATE__interface LV2_STATE_PREFIX "interface"
36#define LV2_STATE__loadDefaultState LV2_STATE_PREFIX "loadDefaultState"
37#define LV2_STATE__makePath LV2_STATE_PREFIX "makePath"
38#define LV2_STATE__mapPath LV2_STATE_PREFIX "mapPath"
39#define LV2_STATE__state LV2_STATE_PREFIX "state"
40
41#ifdef __cplusplus
42extern "C" {
43#else
44# include <stdbool.h>
45#endif
46
47typedef void* LV2_State_Handle;
50
94
104
139 LV2_State_Handle handle,
141 const void* value,
142 size_t size,
144 uint32_t flags);
145
164typedef const void* (*LV2_State_Retrieve_Function)(
165 LV2_State_Handle handle,
167 size_t* size,
168 uint32_t* type,
169 uint32_t* flags);
170
189typedef struct _LV2_State_Interface {
228 LV2_State_Handle handle,
229 uint32_t flags,
230 const LV2_Feature *const * features);
231
259 LV2_State_Handle handle,
260 uint32_t flags,
261 const LV2_Feature *const * features);
263
267typedef struct {
272
292 char* (*abstract_path)(LV2_State_Map_Path_Handle handle,
293 const char* absolute_path);
294
308 char* (*absolute_path)(LV2_State_Map_Path_Handle handle,
309 const char* abstract_path);
311
315typedef struct {
320
344 char* (*path)(LV2_State_Make_Path_Handle handle,
345 const char* path);
347
348#ifdef __cplusplus
349} /* extern "C" */
350#endif
351
352#endif /* LV2_STATE_H */
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static PuglViewHint int value
Definition pugl.h:1708
void * LV2_Handle
Definition lv2.h:133
void * LV2_State_Make_Path_Handle
Opaque handle for state:makePath feature.
Definition state.h:57
void * LV2_State_Handle
Opaque handle for state save/restore.
Definition state.h:54
LV2_State_Status(* LV2_State_Store_Function)(LV2_State_Handle handle, uint32_t key, const void *value, size_t size, uint32_t type, uint32_t flags)
Definition state.h:147
LV2_State_Flags
Definition state.h:65
void * LV2_State_Map_Path_Handle
Opaque handle for state:mapPath feature.
Definition state.h:56
LV2_State_Status
Definition state.h:104
@ LV2_STATE_IS_NATIVE
Definition state.h:100
@ LV2_STATE_IS_PORTABLE
Definition state.h:89
@ LV2_STATE_IS_POD
Definition state.h:78
@ LV2_STATE_SUCCESS
Definition state.h:105
@ LV2_STATE_ERR_NO_FEATURE
Definition state.h:109
@ LV2_STATE_ERR_BAD_TYPE
Definition state.h:107
@ LV2_STATE_ERR_UNKNOWN
Definition state.h:106
@ LV2_STATE_ERR_NO_PROPERTY
Definition state.h:110
@ LV2_STATE_ERR_BAD_FLAGS
Definition state.h:108
static char * absolute_path(LV2_State_Map_Path_Handle handle, const char *state_path)
Definition state.c:341
static char * abstract_path(LV2_State_Map_Path_Handle handle, const char *abs_path)
Definition state.c:269
void * LV2_State_Handle
Definition lv2_state.h:47
LV2_State_Status(* LV2_State_Store_Function)(LV2_State_Handle handle, uint32_t key, const void *value, size_t size, uint32_t type, uint32_t flags)
Definition lv2_state.h:138
const void *(* LV2_State_Retrieve_Function)(LV2_State_Handle handle, uint32_t key, size_t *size, uint32_t *type, uint32_t *flags)
Definition lv2_state.h:164
LV2_State_Status
Definition lv2_state.h:96
unsigned int uint32_t
Definition mid.cpp:100
Definition lv2_state.h:189
LV2_State_Status(* save)(LV2_Handle instance, LV2_State_Store_Function store, LV2_State_Handle handle, uint32_t flags, const LV2_Feature *const *features)
Definition lv2_state.h:226
LV2_State_Status(* restore)(LV2_Handle instance, LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle, uint32_t flags, const LV2_Feature *const *features)
Definition lv2_state.h:257
Definition lv2.h:157
Definition state.h:198
Definition state.h:324
Definition state.h:276
ZCONST char * key
Definition crypt.c:587
ulg size
Definition extract.c:2350