*
* This function requests the running threads to finish, waits for their
* termination, and destroys their structure.
- * Then it will de-init all VLC object initializations.
+ * Then it will de-init all VLC object initializations.
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
#define DIALOG_OK_CANCEL 0x02
#define DIALOG_YES_NO 0x04
#define DIALOG_YES_NO_CANCEL 0x04
-#define DIALOG_GOT_ANSWER 0x08
+#define DIALOG_CLEAR_NOSHOW 0x08
+#define DIALOG_GOT_ANSWER 0x10
/**
* Possible return codes
VLC_EXPORT( void, __intf_UserFatal,( vlc_object_t*, const char*, const char*, ...) );
#define intf_UserLoginPassword( a, b, c, d, e... ) __intf_UserLoginPassword( a,b,c,d,e)
VLC_EXPORT( int, __intf_UserLoginPassword,( vlc_object_t*, const char*, const char*, char **, char **) );
+#define intf_UserYesNo( a, b, c ) __intf_UserYesNo( a,b,c )
+VLC_EXPORT( int, __intf_UserYesNo,( vlc_object_t*, const char*, const char*) );
VLC_EXPORT( void, intf_InteractionManage,( playlist_t *) );
VLC_EXPORT( void, intf_InteractionDestroy,( interaction_t *) );
char * mstrtime (char *psz_buffer, mtime_t date);
void aout_FormatPrepare (audio_sample_format_t * p_format);
void spu_DisplaySubpicture (spu_t *, subpicture_t *);
+int intf_RunThread (intf_thread_t *);
int httpd_StreamSend (httpd_stream_t *, uint8_t *p_data, int i_data);
decoder_t * input_DecoderNew (input_thread_t *, es_format_t *, vlc_bool_t b_force_decoder);
-int intf_RunThread (intf_thread_t *);
xml_t * __xml_Create (vlc_object_t *);
msg_subscription_t* __msg_Subscribe (vlc_object_t *);
const char * VLC_Version (void);
int osd_ShowTextAbsolute (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t);
void net_Close (int fd);
int __vlc_threads_init (vlc_object_t *);
+int __intf_UserYesNo (vlc_object_t*, const char*, const char*);
void __vout_CopyPicture (vlc_object_t *p_this, picture_t *p_dst, picture_t *p_src);
void sout_MuxDeleteStream (sout_mux_t *, sout_input_t *);
char * httpd_MsgGet (httpd_message_t *, char *psz_name);
void (*intf_InteractionDestroy_inner) (interaction_t *);
void (*__intf_UserFatal_inner) (vlc_object_t*, const char*, const char*, ...);
int (*__intf_UserLoginPassword_inner) (vlc_object_t*, const char*, const char*, char **, char **);
+ int (*__intf_UserYesNo_inner) (vlc_object_t*, const char*, const char*);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
# define intf_InteractionDestroy (p_symbols)->intf_InteractionDestroy_inner
# define __intf_UserFatal (p_symbols)->__intf_UserFatal_inner
# define __intf_UserLoginPassword (p_symbols)->__intf_UserLoginPassword_inner
+# define __intf_UserYesNo (p_symbols)->__intf_UserYesNo_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
((p_symbols)->intf_InteractionDestroy_inner) = intf_InteractionDestroy; \
((p_symbols)->__intf_UserFatal_inner) = __intf_UserFatal; \
((p_symbols)->__intf_UserLoginPassword_inner) = __intf_UserLoginPassword; \
+ ((p_symbols)->__intf_UserYesNo_inner) = __intf_UserYesNo; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
# endif /* __PLUGIN__ */
p_new->i_widgets,
p_widget );
+ p_new->i_flags |= DIALOG_CLEAR_NOSHOW;
+
intf_Interact( p_this, p_new );
}
* \param psz_description A description
* \param ppsz_login Returned login
* \param ppsz_password Returned password
- * \return 1 if user clicked Cancel, 0 if OK
+ * \return Clicked button code
+ */
+int __intf_UserYesNo( vlc_object_t *p_this,
+ const char *psz_title,
+ const char *psz_description )
+{
+ int i_ret;
+ interaction_dialog_t *p_new = NULL;
+ user_widget_t *p_widget = NULL;
+
+ INTERACT_INIT( p_new );
+
+ p_new->i_type = INTERACT_DIALOG_TWOWAY;
+ p_new->psz_title = strdup( psz_title );
+
+ /* Text */
+ p_widget = (user_widget_t* )malloc( sizeof( user_widget_t ) );
+ p_widget->i_type = WIDGET_TEXT;
+ p_widget->psz_text = strdup( psz_description );
+ p_widget->val.psz_string = NULL;
+ INSERT_ELEM ( p_new->pp_widgets, p_new->i_widgets,
+ p_new->i_widgets, p_widget );
+
+ p_new->i_flags = DIALOG_YES_NO_CANCEL;
+
+ i_ret = intf_Interact( p_this, p_new );
+
+ return i_ret;
+}
+
+/** Helper function to ask a yes-no question
+ * \param p_this Parent vlc_object
+ * \param psz_title Title for the dialog
+ * \param psz_description A description
+ * \return Clicked button code
*/
int __intf_UserLoginPassword( vlc_object_t *p_this,
const char *psz_title,
return i_ret;
}
+
+
+
+
/**********************************************************************
* The following functions are local
**********************************************************************/