Skip to content

Commit

Permalink
fix tests; add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Feb 8, 2024
1 parent f6e242a commit 63ad54d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions Tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ TEST_C_SOURCES=$(wildcard \
src/metadata/*.c \
src/scriptable/*.c \
src/undo/*.c \
src/filereader/*.c \
Tests/*.c)
TEST_C_SOURCES:=$(filter-out src/main.c,$(TEST_C_SOURCES))
TEST_C_OBJS:=$(addprefix $(BUILD)/,\
Expand Down
14 changes: 13 additions & 1 deletion include/deadbeef/deadbeef.h
Original file line number Diff line number Diff line change
Expand Up @@ -1750,12 +1750,24 @@ typedef struct {
/// usually from the UI plugin's start method.
void (*register_for_undo) (ddb_undo_hooks_t *undo_hooks);

/// Get all items from specified playlist as an array, increase reference counts.
/// The resulting array must be freed.
/// @return number of resulting items
size_t (*plt_get_items) (ddb_playlist_t *plt, ddb_playItem_t ***out_items);

/// Get all selected items from specified playlist as an array, increase reference counts
/// The resulting array must be freed.
/// @return number of resulting items
size_t (*plt_get_selected_items) (ddb_playlist_t *plt, ddb_playItem_t ***out_items);

/// Load playlist from buffer
/// @return 0 on success, -1 on error
int (*plt_load_from_buffer) (ddb_playlist_t *plt, const uint8_t *buffer, size_t size);
ssize_t (*plt_save_to_buffer) (ddb_playlist_t *plt, uint8_t **out_buffer);

/// Save playlist to the buffer.
/// The resulting buffer must be freed after use.
/// @return buffer size on success, -1 on error
ssize_t (*plt_save_to_buffer) (ddb_playlist_t *plt, uint8_t **out_buffer);
#endif
} DB_functions_t;

Expand Down

0 comments on commit 63ad54d

Please sign in to comment.