32 uint32_t (*getOldSize)(
const void*
list);
34 uint32_t (*getNewSize)(
const void*
list);
36 bool (*isSame)(
const void* listOld, uint32_t oldIndex,
const void* listNew, uint32_t newIndex);
49 void (*insert)(
void* opaque,
const void* listOld, uint32_t posOld,
const void* listNew, uint32_t posNew);
58 void (*remove)(
void* opaque,
const void* listOld, uint32_t posOld,
const void* listNew, uint32_t posNew);
63 void (*equal)(
void* opaque,
const void* listOld, uint32_t posOld,
const void* listNew, uint32_t posNew);
struct vlc_param ** list
Definition core.c:402
size_t count
Definition core.c:403
void vlc_diffutil_free_snake(diffutil_snake_t *snake)
free the snake created by vlc_diffutil_build_snake
Definition diffutil.c:300
void vlc_diffutil_free_change_list(vlc_diffutil_changelist_t *changelist)
free the changelist created by vlc_diffutil_build_change_list
Definition diffutil.c:612
diffutil_snake_t * vlc_diffutil_build_snake(const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew)
vlc_diffutil_build_snake compute a diff model between the dataOld model and the dataNew model.
Definition diffutil.c:248
vlc_diffutil_changelist_t * vlc_diffutil_build_change_list(const diffutil_snake_t *snake, const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew, int flags)
Definition diffutil.c:577
bool vlc_diffutil_walk_snake(const diffutil_snake_t *snake, const vlc_diffutil_snake_callback_t *snakeOp, void *cbData, const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew)
iterate over the changelist and callback user on each operation (keep/insert/remove)
Definition diffutil.c:309
#define VLC_API
Definition fourcc_gen.c:31
this structure defines callback to access and compare elements from the old and the new list
Definition vlc_diffutil.h:31
represent a change to the model, each change assumes that previous changes have already been applied
Definition vlc_diffutil.h:155
uint32_t count
number of elements to be inserted/removed/moved
Definition vlc_diffutil.h:166
enum vlc_diffutil_op_type type
type of change operation
Definition vlc_diffutil.h:163
Definition vlc_diffutil.h:169
The data positioned at newModel[ y ] is inserted at position index in the current model.
Definition vlc_diffutil.h:92
uint32_t y
data position in the new model
Definition vlc_diffutil.h:96
uint32_t index
insertion position in the updated model
Definition vlc_diffutil.h:98
uint32_t x
data position in the old model
Definition vlc_diffutil.h:94
Moves the data from position model[ from ] to model[ to ] the data is available either at newModel[ y...
Definition vlc_diffutil.h:135
uint32_t x
data position in the old model
Definition vlc_diffutil.h:141
uint32_t from
move origin
Definition vlc_diffutil.h:137
uint32_t y
data position in the new model
Definition vlc_diffutil.h:143
uint32_t to
move destination
Definition vlc_diffutil.h:139
The data positioned at oldModel[ y ] is removed at position index in the current model.
Definition vlc_diffutil.h:113
uint32_t index
removal position in the updated model
Definition vlc_diffutil.h:119
uint32_t y
data position in the new model
Definition vlc_diffutil.h:117
uint32_t x
data position in the old model
Definition vlc_diffutil.h:115
Definition vlc_diffutil.h:40
This file is a collection of common definitions and types.
vlc_diffutil_op_type
Definition vlc_diffutil.h:69
@ VLC_DIFFUTIL_OP_MOVE
items have been moved within the list
Definition vlc_diffutil.h:75
@ VLC_DIFFUTIL_OP_INSERT
items have been added to the list
Definition vlc_diffutil.h:71
@ VLC_DIFFUTIL_OP_REMOVE
items have been removed from the list
Definition vlc_diffutil.h:73
@ VLC_DIFFUTIL_OP_IGNORE
current change should be ignored
Definition vlc_diffutil.h:77
vlc_diffutil_result_flag
Definition vlc_diffutil.h:171
@ VLC_DIFFUTIL_RESULT_AGGREGATE
aggregate similar consecutive operations into a single operation for instance this: [{INSERT,...
Definition vlc_diffutil.h:181
@ VLC_DIFFUTIL_RESULT_MOVE
try to transform an insertion with a matching suppression into a move operation
Definition vlc_diffutil.h:173
This provides convenience helpers for vectors.