* interface, such as command line.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: interface.c,v 1.105 2003/06/26 12:19:59 sam Exp $
+ * $Id: interface.c,v 1.106 2003/09/18 17:54:02 zorglub Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
+/**
+ * \file
+ * This file contains functions related to interface management
+ */
+
+
/*****************************************************************************
* Preamble
*****************************************************************************/
* This function opens output devices and creates specific interfaces. It sends
* its own error messages.
*****************************************************************************/
+/**
+ * Create the interface, and prepare it for main loop.
+ *
+ * \param p_this the calling vlc_object_t
+ * \param psz_module a prefered interface module
+ * \return a pointer to the created interface thread, NULL on error
+ */
intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
{
intf_thread_t * p_intf;
* This function either creates a new thread and runs the interface in it,
* or runs the interface in the current thread, depending on b_block.
*****************************************************************************/
+/**
+ * Run the interface thread.
+ *
+ * If b_block is not set, runs the interface in the thread, else,
+ * creates a new thread and runs the interface.
+ * \param p_intf the interface thread
+ * \return VLC_SUCCESS on success, an error number else
+ */
int intf_RunThread( intf_thread_t *p_intf )
{
if( p_intf->b_block )
*****************************************************************************
* This function asks the interface thread to stop.
*****************************************************************************/
+/**
+ * Stops the interface thread
+ *
+ * This function asks the interface thread to stop
+ * \param p_intf the interface thread
+ * \return nothing
+ */
void intf_StopThread( intf_thread_t *p_intf )
{
/* Tell the interface to die */
*****************************************************************************
* This function destroys specific interfaces and close output devices.
*****************************************************************************/
+/**
+ * \brief Destroy the interface after the main loop endeed.
+ *
+ * Destroys interfaces and output devices
+ * \param p_intf the interface thread
+ * \return nothing
+ */
void intf_Destroy( intf_thread_t *p_intf )
{
/* Unlock module */
/* Following functions are local */
+
+
/*****************************************************************************
* Manager: helper thread for blocking interfaces
*****************************************************************************
* p_vlc->b_die events because it is only supposed to listen to p_intf->b_die.
* This thread takes care of the matter.
*****************************************************************************/
+/**
+ * \brief Helper thread for blocking interfaces.
+ * \ingroup vlc_interface
+ *
+ * This is a local function
+ * If the interface is launched in the main thread, it will not listen to
+ * p_vlc->b_die events because it is only supposed to listen to p_intf->b_die.
+ * This thread takes care of the matter.
+ * \see intf_RunThread
+ * \param p_intf an interface thread
+ * \return nothing
+ */
static void Manager( intf_thread_t *p_intf )
{
while( !p_intf->b_die )