VLC  3.0.15
Data Structures | Macros | Typedefs | Functions
VLC dialog callbacks

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)
 

Typedefs

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

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. More...
 
void vlc_dialog_id_set_context (vlc_dialog_id *p_id, void *p_context)
 Associate an opaque pointer with the dialog id. More...
 
void * vlc_dialog_id_get_context (vlc_dialog_id *p_id)
 Return the opaque pointer associated with the dialog id. More...
 
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. More...
 
int vlc_dialog_id_post_action (vlc_dialog_id *p_id, int i_action)
 Post a question answer. More...
 
int vlc_dialog_id_dismiss (vlc_dialog_id *p_id)
 Dismiss a dialog. More...
 

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)

Typedef Documentation

◆ vlc_dialog_cbs

Dialog callbacks to be implemented.

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

< Not enough memory

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