ocarina/design/callback.txt
Anna Schumaker 25ee2e945c library: Add callbacks for adding and removing tracks
Useful for keeping a library playqueue up to date.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00

29 lines
692 B
Plaintext

== Files ==
ocarina/include/
callback.h
ocarina/lib/
callback.cpp
== Depends ==
version print
Callbacks: (lib/callback.cpp)
Callbacks are used to notify a unit test or the gui that something in
the backend has changed. The callbacks structure should be initialized
with no-op default values and filled in by the user through the
get_callbacks() function.
- Callback functions:
struct Callbacks {
void (*on_library_add)(unsigned int, library :: Library *);
void (*on_library_update)(unsigned int, library :: Library *);
void (*on_library_track_add)();
};
static struct Callbacks callbacks;
- API:
struct Callbacks *get_callbacks();
Return the Callbacks structure;