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
#define VLC_API
Definition: fourcc_gen.c:31
Definition: diffutil.c:34
this struture 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:88
uint32_t y
data position in the new model
Definition: vlc_diffutil.h:103
uint32_t index
insertion position in the updated model
Definition: vlc_diffutil.h:105
uint32_t count
number of elements to be inserted/removed/moved
Definition: vlc_diffutil.h:154
enum vlc_diffutil_op_type type
type of change operation
Definition: vlc_diffutil.h:151
uint32_t x
data position in the old model
Definition: vlc_diffutil.h:101
uint32_t from
move origin
Definition: vlc_diffutil.h:139
uint32_t to
move destination
Definition: vlc_diffutil.h:141
Definition: vlc_diffutil.h:157
Definition: vlc_diffutil.h:40
This file is a collection of common definitions and types.
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
vlc_diffutil_changelist_t * vlc_diffutil_build_change_list(const struct diffutil_snake_t *snake, const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew, int flags)
vlc_diffutil_build_change_list creates a list of changes to apply to transform dataOld into dataNew
void vlc_diffutil_free_snake(struct diffutil_snake_t *snake)
free the snake created by vlc_diffutil_build_snake
Definition: diffutil.c:300
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:159
@ VLC_DIFFUTIL_RESULT_AGGREGATE
aggreate similar consecutive operations into a single operation for instance this: [{INSERT,...
Definition: vlc_diffutil.h:169
@ VLC_DIFFUTIL_RESULT_MOVE
try to transform an insertion with a matching supression into a move operation
Definition: vlc_diffutil.h:161
struct 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
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
This provides convenience helpers for vectors.