32static const unsigned char params_a[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
33static const unsigned char params_b[] = { 0x0a, 0x0b, 0x0c };
79 if(
p->op_version == 1)
85 if(
p->op_version == 2)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_module_preset_free(gpointer data)
Release one dt_module_preset_t. Suits g_list_free_full().
GList * dt_preset_repository_list_all(void)
Every preset, ordered by (operation, name) – the grouping the tree relies on to start a new module no...
void dt_preset_row_free(gpointer data)
Free one dt_preset_row_t. Suits g_list_free_full().
dt_module_preset_t * dt_preset_repository_get_module_preset(const char *operation, const int op_version, const char *name)
One preset by name, or NULL. Free with dt_module_preset_free().
GList * dt_preset_repository_list_editable(void)
Every preset the user may edit (writeprotect = 0), in row order.
GList * dt_preset_repository_list_for_upgrade(const char *operation)
Every preset of operation at any version, with both parameter blobs.
void dt_preset_repository_update_module_params(const char *operation, const char *name, const int op_version, const void *params, const int params_size)
Replace the parameters (and version) of (operation, name).
void dt_preset_identity_free(gpointer data)
Free one dt_preset_identity_t. Suits g_list_free_full().
void dt_preset_repository_add_module_preset(const char *name, const char *operation, const int op_version, const void *params, const int params_size)
Create an empty user preset holding params, as the "new preset" menu item does.
void dt_preset_repository_set_module_version(const char *operation, const char *name, const int op_version)
Set ONLY the version of (operation, name), leaving the parameters alone.
void dt_preset_repository_add_shipped_preset(const char *name, const char *operation, const int op_version, const void *params, const int params_size, const int writeprotect)
Create a preset from code rather than from the menu – the built-in presets a module registers at star...
const float uint32_t state[4]
Identity of one preset, for callers listing rather than loading.
One row of the Preferences preset tree, with its auto-apply conditions.
static void test_set_module_version_leaves_params_alone(void **state)
static void test_list_editable_excludes_shipped(void **state)
static void test_list_all_carries_the_tree_row(void **state)
static const unsigned char params_a[]
static const unsigned char params_b[]
static void test_list_for_upgrade_returns_all_versions(void **state)
Shared fixture for the src/database repository tests.
static int testdb_setup(void **state)
static int testdb_teardown(void **state)