]> git.sesse.net Git - vlc/commitdiff
var_Command: remove broken-by-design function
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Apr 2013 19:49:32 +0000 (22:49 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 23 Apr 2013 19:49:32 +0000 (22:49 +0300)
include/vlc_variables.h
src/libvlccore.sym
src/misc/variables.c

index e5885876f1508c2689b21179faf2218b907e09ec..241185d2eb9a7314258ed8f523e607c7efcca600 100644 (file)
@@ -168,9 +168,6 @@ VLC_API int var_GetAndSet( vlc_object_t *, const char *, int, vlc_value_t * );
 
 VLC_API int var_Inherit( vlc_object_t *, const char *, int, vlc_value_t * );
 
-VLC_API int var_Command( vlc_object_t *, const char *, const char *, const char *, char ** );
-#define var_Command(a,b,c,d,e) var_Command( VLC_OBJECT( a ), b, c, d, e )
-
 VLC_API void var_FreeList( vlc_value_t *, vlc_value_t * );
 
 
index ddae89bac8486727db3162faaacb1291bddc9712..4411e6e49a8e0d710c057900dba7372d54f209f4 100644 (file)
@@ -440,7 +440,6 @@ vlc_accept
 utf8_vfprintf
 var_AddCallback
 var_Change
-var_Command
 var_Create
 var_DelCallback
 var_Destroy
index 3054879d256168a723d1690319101a263ac8b780..e3d56b70097d994d5b2f3278b7fe9d4e53d1d981 100644 (file)
@@ -1326,66 +1326,6 @@ static int TriggerCallback( vlc_object_t *p_this, variable_t *p_var,
     return VLC_SUCCESS;
 }
 
-#undef var_Command
-/**********************************************************************
- * Execute a var command on an object identified by its name
- **********************************************************************/
-int var_Command( vlc_object_t *p_this, const char *psz_name,
-                 const char *psz_cmd, const char *psz_arg, char **psz_msg )
-{
-    vlc_object_t *p_obj = vlc_object_find_name( p_this->p_libvlc,
-                                                psz_name );
-    int i_type, i_ret;
-
-    if( !p_obj )
-    {
-        if( psz_msg )
-            *psz_msg = strdup( "Unknown destination object." );
-        return VLC_ENOOBJ;
-    }
-
-    i_type = var_Type( p_obj, psz_cmd );
-    if( !( i_type&VLC_VAR_ISCOMMAND ) )
-    {
-        vlc_object_release( p_obj );
-        if( psz_msg )
-            *psz_msg = strdup( "Variable doesn't exist or isn't a command." );
-        return VLC_EGENERIC;
-    }
-
-    i_type &= VLC_VAR_CLASS;
-    switch( i_type )
-    {
-        case VLC_VAR_INTEGER:
-            i_ret = var_SetInteger( p_obj, psz_cmd, atoi( psz_arg ) );
-            break;
-        case VLC_VAR_FLOAT:
-            i_ret = var_SetFloat( p_obj, psz_cmd, us_atof( psz_arg ) );
-            break;
-        case VLC_VAR_STRING:
-            i_ret = var_SetString( p_obj, psz_cmd, psz_arg );
-            break;
-        case VLC_VAR_BOOL:
-            i_ret = var_SetBool( p_obj, psz_cmd, atoi( psz_arg ) );
-            break;
-        default:
-            i_ret = VLC_EGENERIC;
-            break;
-    }
-
-    vlc_object_release( p_obj );
-
-    if( psz_msg )
-    {
-        if( asprintf( psz_msg, "%s on object %s returned %i (%s)",
-                  psz_cmd, psz_name, i_ret, vlc_error( i_ret ) ) == -1)
-            *psz_msg = NULL;
-    }
-
-    return i_ret;
-}
-
-
 /**
  * Free a list and the associated strings
  * @param p_val: the list variable