LV2  1.0.13
Data Fields
LV2_State_Make_Path Struct Reference

Feature data for state:makePath (LV2_STATE__makePath). More...

Data Fields

LV2_State_Make_Path_Handle handle
 Opaque host data.
char *(* path )(LV2_State_Make_Path_Handle handle, const char *path)
 Return a path the plugin may use to create a new file.

Detailed Description

Feature data for state:makePath (LV2_STATE__makePath).


Field Documentation

LV2_State_Make_Path_Handle LV2_State_Make_Path::handle

Opaque host data.

char*(* LV2_State_Make_Path::path)(LV2_State_Make_Path_Handle handle, const char *path)

Return a path the plugin may use to create a new file.

Parameters:
handleMUST be the handle member of this struct.
pathThe path of the new file within a namespace unique to this plugin instance.
Returns:
The absolute path to use for the new file.

This function can be used by plugins to create files and directories, either at state saving time (if this feature is passed to LV2_State_Interface.save()) or any time (if this feature is passed to LV2_Descriptor.instantiate()).

The host MUST do whatever is necessary for the plugin to be able to create a file at the returned path (e.g. using fopen), including creating any leading directories.

If this function is passed to LV2_Descriptor.instantiate(), it may be called from any non-realtime context. If it is passed to LV2_State_Interface.save(), it may only be called within the dynamic scope of that function call.

The caller is responsible for freeing the returned value with free().


The documentation for this struct was generated from the following file: