VLC 4.0.0-dev
Loading...
Searching...
No Matches

Need to be implemented by GUI modules or libvlc. More...

Collaboration diagram for VLC dialog callbacks:

Data Structures

struct  vlc_dialog_cbs
 Dialog callbacks to be implemented. More...
 

Macros

#define vlc_dialog_provider_set_callbacks(a, b, c)    vlc_dialog_provider_set_callbacks(VLC_OBJECT(a), b, c)
 
#define vlc_dialog_provider_set_error_callback(a, b, c)    vlc_dialog_provider_set_error_callback(VLC_OBJECT(a), b, c)
 

Typedefs

typedef struct vlc_dialog_cbs vlc_dialog_cbs
 Dialog callbacks to be implemented.
 
typedef void(* vlc_dialog_error_cbs) (void *p_data, const char *psz_title, const char *psz_text)
 Called when an error message needs to be displayed.
 

Functions

void vlc_dialog_provider_set_callbacks (vlc_object_t *p_obj, const vlc_dialog_cbs *p_cbs, void *p_data)
 Register callbacks to handle VLC dialogs.
 
void vlc_dialog_provider_set_error_callback (vlc_object_t *p_obj, vlc_dialog_error_cbs p_cbs, void *p_data)
 Register callbacks to handle VLC error messages.
 
void vlc_dialog_id_set_context (vlc_dialog_id *p_id, void *p_context)
 Associate an opaque pointer with the dialog id.
 
void * vlc_dialog_id_get_context (vlc_dialog_id *p_id)
 Return the opaque pointer associated with the dialog id.
 
int vlc_dialog_id_post_login (vlc_dialog_id *p_id, const char *psz_username, const char *psz_password, bool b_store)
 Post a login answer.
 
int vlc_dialog_id_post_action (vlc_dialog_id *p_id, int i_action)
 Post a question answer.
 
int vlc_dialog_id_dismiss (vlc_dialog_id *p_id)
 Dismiss a dialog.
 

Detailed Description

Need to be implemented by GUI modules or libvlc.

Macro Definition Documentation

◆ vlc_dialog_provider_set_callbacks

#define vlc_dialog_provider_set_callbacks (   a,
  b,
 
)     vlc_dialog_provider_set_callbacks(VLC_OBJECT(a), b, c)

◆ vlc_dialog_provider_set_error_callback

#define vlc_dialog_provider_set_error_callback (   a,
  b,
 
)     vlc_dialog_provider_set_error_callback(VLC_OBJECT(a), b, c)

Typedef Documentation

◆ vlc_dialog_cbs

Dialog callbacks to be implemented.

◆ vlc_dialog_error_cbs

typedef void(* vlc_dialog_error_cbs) (void *p_data, const char *psz_title, const char *psz_text)

Called when an error message needs to be displayed.

Parameters
p_dataopaque pointer for the callback
psz_titletitle of the dialog
psz_texttext of the dialog

Function Documentation

◆ vlc_dialog_id_dismiss()

int vlc_dialog_id_dismiss ( vlc_dialog_id p_id)

Dismiss a dialog.

After this call, p_id won't be valid anymore

See also
vlc_dialog_cbs.pf_cancel
Parameters
p_idid of the dialog
Returns
VLC_SUCCESS on success, or a VLC error code on error

References dialog_id_post().

◆ vlc_dialog_id_get_context()

void * vlc_dialog_id_get_context ( vlc_dialog_id p_id)

Return the opaque pointer associated with the dialog id.

References vlc_dialog_id::lock, vlc_dialog_id::p_context, vlc_mutex_lock(), and vlc_mutex_unlock().

◆ vlc_dialog_id_post_action()

int vlc_dialog_id_post_action ( vlc_dialog_id p_id,
int  i_action 
)

Post a question answer.

After this call, p_id won't be valid anymore

See also
vlc_dialog_cbs.pf_display_question
Parameters
p_idid of the dialog
i_action1 for action1, 2 for action2
Returns
VLC_SUCCESS on success, or a VLC error code on error

References dialog_id_post(), dialog_answer::i_action, dialog_answer::i_type, and VLC_DIALOG_QUESTION.

◆ vlc_dialog_id_post_login()

int vlc_dialog_id_post_login ( vlc_dialog_id p_id,
const char *  psz_username,
const char *  psz_password,
bool  b_store 
)

Post a login answer.

After this call, p_id won't be valid anymore

See also
vlc_dialog_cbs.pf_display_login
Parameters
p_idid of the dialog
psz_usernamevalid and non empty string
psz_passwordvalid string (can be empty)
b_storeif true, store the credentials
Returns
VLC_SUCCESS on success, or a VLC error code on error

References dialog_answer::b_store, dialog_id_post(), dialog_answer::i_type, dialog_answer::login, dialog_answer::psz_password, dialog_answer::psz_username, strdup(), dialog_answer::u, VLC_DIALOG_LOGIN, and VLC_ENOMEM.

◆ vlc_dialog_id_set_context()

void vlc_dialog_id_set_context ( vlc_dialog_id p_id,
void *  p_context 
)

Associate an opaque pointer with the dialog id.

References vlc_dialog_id::lock, vlc_dialog_id::p_context, vlc_mutex_lock(), and vlc_mutex_unlock().

◆ vlc_dialog_provider_set_callbacks()

void vlc_dialog_provider_set_callbacks ( vlc_object_t p_obj,
const vlc_dialog_cbs p_cbs,
void *  p_data 
)

Register callbacks to handle VLC dialogs.

Parameters
p_objthe VLC object to get the dialog provider from
p_cbsa pointer to callbacks, or NULL to unregister callbacks.
p_dataopaque pointer for the callback

References vlc_dialog_provider::cbs, dialog_clear_all_locked(), get_dialog_provider(), vlc_dialog_provider::lock, vlc_dialog_provider::p_cbs_data, vlc_mutex_lock(), and vlc_mutex_unlock().

◆ vlc_dialog_provider_set_error_callback()

void vlc_dialog_provider_set_error_callback ( vlc_object_t p_obj,
vlc_dialog_error_cbs  p_cbs,
void *  p_data 
)

Register callbacks to handle VLC error messages.

Version
LibVLC 4.0.0 and later.
Parameters
p_objthe VLC object to get the dialog provider from
p_cbsa pointer to the callback, or NULL to unregister the callback.
p_dataopaque pointer for the callback

References vlc_dialog_provider::err_cbs, get_dialog_provider(), vlc_dialog_provider::lock, vlc_dialog_provider::p_err_cbs_data, vlc_mutex_lock(), and vlc_mutex_unlock().