/*****************************************************************************
* telnet.c: VLM interface plugin
*****************************************************************************
- * Copyright (C) 2000-2005 the VideoLAN team
+ * Copyright (C) 2000-2006 the VideoLAN team
* $Id$
*
* Authors: Simon Latapie <garf@videolan.org>
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
-#define TELNETHOST_TEXT N_( "Telnet Interface host" )
-#define TELNETHOST_LONGTEXT N_( "Default to listen on all network interfaces" )
-#define TELNETPORT_TEXT N_( "Telnet Interface port" )
-#define TELNETPORT_LONGTEXT N_( "Default to 4212" )
+#define TELNETHOST_TEXT N_( "Host" )
+#define TELNETHOST_LONGTEXT N_( "This is the host on which the " \
+ "interface will listen. It defaults to all network interfaces (0.0.0.0)." \
+ " If you want this interface to be available only on the local " \
+ "machine, enter \"127.0.0.1\"." )
+#define TELNETPORT_TEXT N_( "Port" )
+#define TELNETPORT_LONGTEXT N_( "This is the TCP port on which this " \
+ "interface will listen. It defaults to 4212." )
#define TELNETPORT_DEFAULT 4212
-#define TELNETPWD_TEXT N_( "Telnet Interface password" )
-#define TELNETPWD_LONGTEXT N_( "Default to admin" )
+#define TELNETPWD_TEXT N_( "Password" )
+#define TELNETPWD_LONGTEXT N_( "A single administration password is used " \
+ "to protect this interface. The default value is \"admin\"." )
#define TELNETPWD_DEFAULT "admin"
vlc_module_begin();
set_shortname( "Telnet" );
set_category( CAT_INTERFACE );
- set_subcategory( SUBCAT_INTERFACE_GENERAL );
+ set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_string( "telnet-host", "", NULL, TELNETHOST_TEXT,
TELNETHOST_LONGTEXT, VLC_TRUE );
add_integer( "telnet-port", TELNETPORT_DEFAULT, NULL, TELNETPORT_TEXT,
* option is missing from --telnet-host.
*/
static int getPort(intf_thread_t *p_intf, vlc_url_t url, int i_port)
- {
+{
// Print error if two different ports have been specified
if (url.i_port != 0 &&
i_port != TELNETPORT_DEFAULT &&
{
return url.i_port;
}
- // return default
return i_port;
}
return VLC_EGENERIC;
}
- msg_Info( p_intf, "Using the VLM interface plugin..." );
+ msg_Info( p_intf, "using the VLM interface plugin..." );
i_telnetport = config_GetInt( p_intf, "telnet-port" );
psz_address = config_GetPsz( p_intf, "telnet-host" );
return VLC_EGENERIC;
}
msg_Info( p_intf,
- "Telnet interface started on interface %s %d",
+ "telnet interface started on interface %s %d",
url.psz_host, url.i_port );
p_intf->p_sys->i_clients = 0;
else if( !strncmp( cl->buffer_read, "shutdown", 8 ) )
{
msg_Err( p_intf, "shutdown requested" );
- p_intf->p_vlc->b_die = VLC_TRUE;
+ p_intf->p_libvlc->b_die = VLC_TRUE;
}
else
{