VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_event_listener_t |
Typedefs | |
typedef struct vlc_event_listener_t | vlc_event_listener_t |
Functions | |
void | vlc_event_manager_init (vlc_event_manager_t *p_em, void *p_obj) |
Initialize event manager object p_obj is the object that contains the event manager. More... | |
void | vlc_event_manager_fini (vlc_event_manager_t *p_em) |
Destroy the event manager. More... | |
void | vlc_event_send (vlc_event_manager_t *p_em, vlc_event_t *p_event) |
Send an event to the listener attached to this p_em. More... | |
int | vlc_event_attach (vlc_event_manager_t *p_em, vlc_event_type_t event_type, vlc_event_callback_t pf_callback, void *p_user_data) |
Add a callback for an event. More... | |
void | vlc_event_detach (vlc_event_manager_t *p_em, vlc_event_type_t event_type, vlc_event_callback_t pf_callback, void *p_user_data) |
Remove a callback for an event. More... | |
typedef struct vlc_event_listener_t vlc_event_listener_t |
int vlc_event_attach | ( | vlc_event_manager_t * | p_em, |
vlc_event_type_t | event_type, | ||
vlc_event_callback_t | pf_callback, | ||
void * | p_user_data | ||
) |
Add a callback for an event.
References ARRAY_APPEND, vlc_event_manager_t::events, vlc_event_listeners_group_t::listeners, vlc_event_manager_t::lock, vlc_event_listener_t::p_user_data, vlc_event_listener_t::pf_callback, VLC_ENOMEM, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
void vlc_event_detach | ( | vlc_event_manager_t * | p_em, |
vlc_event_type_t | event_type, | ||
vlc_event_callback_t | pf_callback, | ||
void * | p_user_data | ||
) |
Remove a callback for an event.
References ARRAY_REMOVE, vlc_event_manager_t::events, vlc_event_listeners_group_t::i_size, vlc_event_listeners_group_t::listeners, vlc_event_manager_t::lock, vlc_event_listeners_group_t::p_elems, vlc_event_listener_t::p_user_data, vlc_event_listener_t::pf_callback, vlc_assert_unreachable, vlc_mutex_lock(), and vlc_mutex_unlock().
void vlc_event_manager_fini | ( | vlc_event_manager_t * | p_em | ) |
Destroy the event manager.
References ARRAY_FOREACH, ARRAY_RESET, ARRAY_SIZE, vlc_event_manager_t::events, and vlc_event_listeners_group_t::listeners.
Referenced by input_item_Release().
void vlc_event_manager_init | ( | vlc_event_manager_t * | p_em, |
void * | p_obj | ||
) |
Initialize event manager object p_obj is the object that contains the event manager.
But not necessarily a vlc_object_t (an input_item_t is not a vlc_object_t for instance).
References ARRAY_INIT, ARRAY_SIZE, vlc_event_manager_t::events, vlc_event_listeners_group_t::listeners, vlc_event_manager_t::lock, vlc_event_manager_t::p_obj, and vlc_mutex_init_recursive().
Referenced by input_item_NewExt().
void vlc_event_send | ( | vlc_event_manager_t * | p_em, |
vlc_event_t * | p_event | ||
) |
Send an event to the listener attached to this p_em.
References ARRAY_FOREACH, vlc_event_manager_t::events, vlc_event_listeners_group_t::listeners, vlc_event_manager_t::lock, vlc_event_manager_t::p_obj, vlc_event_t::p_obj, vlc_event_listener_t::p_user_data, vlc_event_listener_t::pf_callback, vlc_event_t::type, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by AppendAttachment(), input_item_AddInfo(), input_item_DelInfo(), input_item_MergeInfos(), input_item_ReplaceInfos(), input_item_SetDuration(), input_item_SetEpg(), input_item_SetEpgEvent(), input_item_SetEpgOffline(), input_item_SetErrorWhenReading(), input_item_SetMeta(), and input_item_SetPreparsed().