Commit 17a5a891 authored by Antoine Cellerier's avatar Antoine Cellerier

include/* : fix doxygen comments

modules/gui/wxwidgets/dialogs/updatevlc.cpp : clean up
parent 16454068
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
*/ */
struct user_widget_t struct user_widget_t
{ {
int i_type; //< Type identifier; int i_type; ///< Type identifier;
char *psz_text; //< Free text char *psz_text; ///< Free text
vlc_value_t val; vlc_value_t val;
}; };
...@@ -37,9 +37,9 @@ struct user_widget_t ...@@ -37,9 +37,9 @@ struct user_widget_t
*/ */
enum enum
{ {
WIDGET_TEXT, //< Text display WIDGET_TEXT, ///< Text display
WIDGET_PROGRESS, //< A progress bar WIDGET_PROGRESS, ///< A progress bar
WIDGET_INPUT_TEXT //< Input (backed up by a variable) WIDGET_INPUT_TEXT ///< Input (backed up by a variable)
}; };
/** /**
...@@ -47,23 +47,23 @@ enum ...@@ -47,23 +47,23 @@ enum
*/ */
struct interaction_dialog_t struct interaction_dialog_t
{ {
int i_id; //< Unique ID int i_id; ///< Unique ID
int i_type; //< Type identifier int i_type; ///< Type identifier
char *psz_title; //< Title char *psz_title; ///< Title
char *psz_description; //< Descriptor string char *psz_description; ///< Descriptor string
int i_widgets; //< Number of dialog widgets int i_widgets; ///< Number of dialog widgets
user_widget_t **pp_widgets; //< Dialog widgets user_widget_t **pp_widgets; ///< Dialog widgets
void * p_private; //< Private interface data void * p_private; ///< Private interface data
int i_status; //< Dialog status; int i_status; ///< Dialog status;
int i_action; //< Action to perform; int i_action; ///< Action to perform;
int i_flags; //< Misc flags int i_flags; ///< Misc flags
int i_return; //< Return status int i_return; ///< Return status
interaction_t *p_interaction; //< Parent interaction object interaction_t *p_interaction; ///< Parent interaction object
vlc_object_t *p_parent; //< The vlc object that asked vlc_object_t *p_parent; ///< The vlc object that asked
//for interaction //for interaction
}; };
...@@ -93,13 +93,13 @@ enum ...@@ -93,13 +93,13 @@ enum
*/ */
enum enum
{ {
NEW_DIALOG, //< Just created NEW_DIALOG, ///< Just created
SENT_DIALOG, //< Sent to interface SENT_DIALOG, ///< Sent to interface
UPDATED_DIALOG, //< Update to send UPDATED_DIALOG, ///< Update to send
ANSWERED_DIALOG, //< Got "answer" ANSWERED_DIALOG, ///< Got "answer"
HIDING_DIALOG, //< Hiding requested HIDING_DIALOG, ///< Hiding requested
HIDDEN_DIALOG, //< Now hidden. Requesting destruction HIDDEN_DIALOG, ///< Now hidden. Requesting destruction
DESTROYED_DIALOG, //< Interface has destroyed it DESTROYED_DIALOG, ///< Interface has destroyed it
}; };
/** /**
...@@ -107,9 +107,9 @@ enum ...@@ -107,9 +107,9 @@ enum
*/ */
enum enum
{ {
INTERACT_PROGRESS, //< Progress bar (in the main interface ?) INTERACT_PROGRESS, ///< Progress bar (in the main interface ?)
INTERACT_DIALOG_ONEWAY, //< Dialog box without feedback INTERACT_DIALOG_ONEWAY, ///< Dialog box without feedback
INTERACT_DIALOG_TWOWAY, //< Dialog box with feedback INTERACT_DIALOG_TWOWAY, ///< Dialog box with feedback
}; };
/** /**
...@@ -131,12 +131,12 @@ struct interaction_t ...@@ -131,12 +131,12 @@ struct interaction_t
{ {
VLC_COMMON_MEMBERS VLC_COMMON_MEMBERS
int i_dialogs; //< Number of dialogs int i_dialogs; ///< Number of dialogs
interaction_dialog_t **pp_dialogs; //< Dialogs interaction_dialog_t **pp_dialogs; ///< Dialogs
intf_thread_t *p_intf; //< Interface to use intf_thread_t *p_intf; ///< Interface to use
int i_last_id; //< Last attributed ID int i_last_id; ///< Last attributed ID
}; };
/** /**
* Possible actions * Possible actions
......
...@@ -26,6 +26,12 @@ ...@@ -26,6 +26,12 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
/**
* \defgroup update Update
*
* @{
*/
#define UPDATE_FILE_TYPE_ALL (~0) #define UPDATE_FILE_TYPE_ALL (~0)
#define UPDATE_FILE_TYPE_NONE 0 #define UPDATE_FILE_TYPE_NONE 0
...@@ -60,11 +66,11 @@ ...@@ -60,11 +66,11 @@
*/ */
struct update_file_t struct update_file_t
{ {
int i_type; //< File type int i_type; ///< File type
char* psz_md5; //< MD5 hash char* psz_md5; ///< MD5 hash
long int l_size; //< File size in bytes long int l_size; ///< File size in bytes
char* psz_url; //< Relative (to a mirror) or absolute url char* psz_url; ///< Relative (to a mirror) or absolute url
char* psz_description; //< Plain text description char* psz_description; ///< Plain text description
}; };
/** /**
...@@ -72,19 +78,19 @@ struct update_file_t ...@@ -72,19 +78,19 @@ struct update_file_t
*/ */
struct update_release_t struct update_release_t
{ {
char* psz_major; //< Version major string char* psz_major; ///< Version major string
char* psz_minor; //< Version minor string char* psz_minor; ///< Version minor string
char* psz_revision; //< Version revision string char* psz_revision; ///< Version revision string
char* psz_extra; //< Version extra string char* psz_extra; ///< Version extra string
char* psz_svn_revision; //< SVN revision char* psz_svn_revision; ///< SVN revision
int i_type; //< Release type int i_type; ///< Release type
int i_status; //< Release status compared to current VLC version int i_status; ///< Release status compared to current VLC version
struct update_file_t* p_files; //< Files list struct update_file_t* p_files; ///< Files list
int i_files; //< Number of files in the files list int i_files; ///< Number of files in the files list
}; };
/** /**
...@@ -92,11 +98,11 @@ struct update_release_t ...@@ -92,11 +98,11 @@ struct update_release_t
*/ */
struct update_mirror_t struct update_mirror_t
{ {
char *psz_name; //< Mirror name char *psz_name; ///< Mirror name
char *psz_location; //< Mirror geographical location char *psz_location; ///< Mirror geographical location
char *psz_type; //< Mirror type (FTP, HTTP, ...) char *psz_type; ///< Mirror type (FTP, HTTP, ...)
char *psz_base_url; //< Mirror base url char *psz_base_url; ///< Mirror base url
}; };
...@@ -109,13 +115,13 @@ struct update_t ...@@ -109,13 +115,13 @@ struct update_t
vlc_mutex_t lock; vlc_mutex_t lock;
struct update_release_t *p_releases; //< Releases (version) list struct update_release_t *p_releases; ///< Releases (version) list
int i_releases; //< Number of releases int i_releases; ///< Number of releases
vlc_bool_t b_releases; //< True if we have a releases list vlc_bool_t b_releases; ///< True if we have a releases list
struct update_mirror_t *p_mirrors; //< Mirrors list struct update_mirror_t *p_mirrors; ///< Mirrors list
int i_mirrors; //< Number of mirrors int i_mirrors; ///< Number of mirrors
vlc_bool_t b_mirrors; //< True if we have a mirrors list vlc_bool_t b_mirrors; ///< True if we have a mirrors list
}; };
/** /**
...@@ -123,37 +129,37 @@ struct update_t ...@@ -123,37 +129,37 @@ struct update_t
*/ */
struct update_iterator_t struct update_iterator_t
{ {
update_t *p_u; //< Pointer to VLC update object update_t *p_u; ///< Pointer to VLC update object
int i_r; //< Position in the releases list int i_r; ///< Position in the releases list
int i_f; //< Position in the release's files list int i_f; ///< Position in the release's files list
int i_m; //< Position in the mirrors list int i_m; ///< Position in the mirrors list
int i_t; //< File type bitmask int i_t; ///< File type bitmask
int i_rs; //< Release status bitmask int i_rs; ///< Release status bitmask
int i_rt; //< Release type bitmask int i_rt; ///< Release type bitmask
struct struct
{ {
int i_type; //< Type int i_type; ///< Type
char* psz_md5; //< MD5 hash char* psz_md5; ///< MD5 hash
long int l_size; //< Size in bytes long int l_size; ///< Size in bytes
char* psz_url; //< Absolute URL char* psz_url; ///< Absolute URL
char* psz_description; //< Description char* psz_description; ///< Description
} file; //< Local 'copy' of the current file's information } file; ///< Local 'copy' of the current file's information
struct struct
{ {
char *psz_version; //< Version string char *psz_version; ///< Version string
char *psz_svn_revision; //< SVN revision char *psz_svn_revision; ///< SVN revision
int i_status; //< Status int i_status; ///< Status
int i_type; //< Type int i_type; ///< Type
} release; //< Local 'copy' of the current release's information } release; ///< Local 'copy' of the current release's information
struct struct
{ {
char *psz_name; //< Name char *psz_name; ///< Name
char *psz_location; //< Geographical location char *psz_location; ///< Geographical location
char *psz_type; //< Type (HTTP, FTP, ...) char *psz_type; ///< Type (HTTP, FTP, ...)
} mirror; //< Local 'copy' of the current mirror's information } mirror; ///< Local 'copy' of the current mirror's information
}; };
#define update_New( a ) __update_New( VLC_OBJECT( a ) ) #define update_New( a ) __update_New( VLC_OBJECT( a ) )
...@@ -168,4 +174,8 @@ VLC_EXPORT( unsigned int, update_iterator_Action, ( update_iterator_t *, int ) ) ...@@ -168,4 +174,8 @@ VLC_EXPORT( unsigned int, update_iterator_Action, ( update_iterator_t *, int ) )
VLC_EXPORT( unsigned int, update_iterator_ChooseMirrorAndFile, ( update_iterator_t *, int, int, int ) ); VLC_EXPORT( unsigned int, update_iterator_ChooseMirrorAndFile, ( update_iterator_t *, int, int, int ) );
VLC_EXPORT( void, update_download, ( update_iterator_t *, char * ) ); VLC_EXPORT( void, update_download, ( update_iterator_t *, char * ) );
/**
* @}
*/
#endif #endif
...@@ -33,11 +33,6 @@ ...@@ -33,11 +33,6 @@
#include "bitmaps/update_info.xpm" #include "bitmaps/update_info.xpm"
#include "bitmaps/update_source.xpm" #include "bitmaps/update_source.xpm"
#include "vlc_block.h"
#include "vlc_stream.h"
#define UPDATE_VLC_DOWNLOAD_BUFFER_SIZE 2048
/***************************************************************************** /*****************************************************************************
* Event Table. * Event Table.
*****************************************************************************/ *****************************************************************************/
...@@ -130,10 +125,6 @@ void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event ) ...@@ -130,10 +125,6 @@ void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event )
list->AssignImageList( images, wxIMAGE_LIST_SMALL ); list->AssignImageList( images, wxIMAGE_LIST_SMALL );
while( update_iterator_Action( p_uit, UPDATE_FILE ) != UPDATE_FAIL ) while( update_iterator_Action( p_uit, UPDATE_FILE ) != UPDATE_FAIL )
{ {
/*wxButton *update_button =
new wxButton( this, Download_Event,
wxU(p_uit->file.psz_description) );
main_sizer->Add( update_button, 0, wxALIGN_CENTER );*/
int i_image; int i_image;
switch( p_uit->file.i_type ) switch( p_uit->file.i_type )
{ {
...@@ -160,7 +151,7 @@ void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event ) ...@@ -160,7 +151,7 @@ void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event )
} }
main_sizer->Add( new wxStaticText( this, -1, wxU( _("\nAvailable updates and related downloads:\n(Double click on a file to download it)\n" ) ) ) ); main_sizer->Add( new wxStaticText( this, -1, wxU( _("\nAvailable updates and related downloads:\n(Double click on a file to download it)\n" ) ) ) );
main_sizer->Add( list/*, 0, wxEXPAND */); main_sizer->Add( list );
SetSizerAndFit( main_sizer ); SetSizerAndFit( main_sizer );
Layout(); Layout();
update_iterator_Delete( p_uit ); update_iterator_Delete( p_uit );
...@@ -185,7 +176,7 @@ void UpdateVLC::OnChooseItem( wxListEvent& event ) ...@@ -185,7 +176,7 @@ void UpdateVLC::OnChooseItem( wxListEvent& event )
} }
wxString url = wxU( p_uit->file.psz_url ); wxString url = wxU( p_uit->file.psz_url );
wxFileDialog *filedialog = wxFileDialog *filedialog =
new wxFileDialog( this, wxU(_("Save file ...")), new wxFileDialog( this, wxU(_("Save file...")),
wxT(""), url.AfterLast( '/' ), wxT("*.*"), wxT(""), url.AfterLast( '/' ), wxT("*.*"),
wxSAVE | wxOVERWRITE_PROMPT ); wxSAVE | wxOVERWRITE_PROMPT );
if( filedialog->ShowModal() == wxID_OK ) if( filedialog->ShowModal() == wxID_OK )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment