VLC 4.0.0-dev
vlc_events.h File Reference

This file is the interface definition for events (implementation in src/misc/events.c) More...

Include dependency graph for vlc_events.h:

Go to the source code of this file.

Data Structures

struct  vlc_event_listeners_group_t
 
struct  vlc_event_manager_t
 
struct  vlc_event_t
 
union  vlc_event_t::vlc_event_type_specific
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_meta_changed
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_subitem_added
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_subitem_tree_added
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_duration_changed
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_preparsed_changed
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_name_changed
 
struct  vlc_event_t::vlc_event_type_specific::vlc_input_item_info_changed
 
struct  vlc_event_t::vlc_event_type_specific::input_item_error_when_reading_changed
 
struct  vlc_event_t::vlc_event_type_specific::input_item_preparse_ended
 
struct  vlc_event_t::vlc_event_type_specific::input_item_attachments_found
 

Macros

#define VLC_EVENT_TYPE_COUNT   (vlc_InputItemAttachmentsFound + 1)
 

Typedefs

typedef enum vlc_event_type_t vlc_event_type_t
 
typedef struct vlc_event_listeners_group_t vlc_event_listeners_group_t
 
typedef struct vlc_event_manager_t vlc_event_manager_t
 
typedef struct vlc_event_t vlc_event_t
 
typedef void(* vlc_event_callback_t) (const vlc_event_t *, void *)
 

Enumerations

enum  vlc_event_type_t {
  vlc_InputItemMetaChanged , vlc_InputItemDurationChanged , vlc_InputItemPreparsedChanged , vlc_InputItemNameChanged ,
  vlc_InputItemInfoChanged , vlc_InputItemErrorWhenReadingChanged , vlc_InputItemAttachmentsFound
}
 

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 *)
 Send an event to the listener attached to this p_em. More...
 
int vlc_event_attach (vlc_event_manager_t *p_event_manager, 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_event_manager, vlc_event_type_t event_type, vlc_event_callback_t pf_callback, void *p_user_data)
 Remove a callback for an event. More...
 

Detailed Description

This file is the interface definition for events (implementation in src/misc/events.c)

Macro Definition Documentation

◆ VLC_EVENT_TYPE_COUNT

#define VLC_EVENT_TYPE_COUNT   (vlc_InputItemAttachmentsFound + 1)

Typedef Documentation

◆ vlc_event_callback_t

typedef void(* vlc_event_callback_t) (const vlc_event_t *, void *)

◆ vlc_event_listeners_group_t

◆ vlc_event_manager_t

◆ vlc_event_t

typedef struct vlc_event_t vlc_event_t

◆ vlc_event_type_t

Enumeration Type Documentation

◆ vlc_event_type_t

Enumerator
vlc_InputItemMetaChanged 
vlc_InputItemDurationChanged 
vlc_InputItemPreparsedChanged 
vlc_InputItemNameChanged 
vlc_InputItemInfoChanged 
vlc_InputItemErrorWhenReadingChanged 
vlc_InputItemAttachmentsFound 

Function Documentation

◆ vlc_event_attach()

◆ vlc_event_detach()

◆ vlc_event_manager_fini()

void vlc_event_manager_fini ( vlc_event_manager_t p_em)

◆ vlc_event_manager_init()

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().

◆ vlc_event_send()