Commit 31e721a7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

variables: remove VLC_VAR_SET{MIN,MAX}

parent 4b1ba248
......@@ -77,18 +77,6 @@
* @{
*/
/**
* Set the minimum value of this variable
* \param p_val The new minimum value
* \param p_val2 Unused
*/
#define VLC_VAR_SETMIN 0x0010
/**
* Set the maximum value of this variable
* \param p_val The new maximum value
* \param p_val2 Unused
*/
#define VLC_VAR_SETMAX 0x0011
#define VLC_VAR_SETSTEP 0x0012
/**
......
......@@ -505,19 +505,9 @@ int var_Change( vlc_object_t *p_this, const char *psz_name,
switch( i_action )
{
case VLC_VAR_SETMIN:
assert(p_var->ops->pf_free == FreeDummy);
p_var->min = *p_val;
CheckValue( p_var, &p_var->val );
break;
case VLC_VAR_GETMIN:
*p_val = p_var->min;
break;
case VLC_VAR_SETMAX:
assert(p_var->ops->pf_free == FreeDummy);
p_var->max = *p_val;
CheckValue( p_var, &p_var->val );
break;
case VLC_VAR_GETMAX:
*p_val = p_var->max;
break;
......
......@@ -403,15 +403,12 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL ) != 0
|| val.i_int == INT64_MIN );
val.i_int = 4212;
var_Change( p_libvlc, "bla", VLC_VAR_SETMIN, &val, NULL );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL ) == 0
&& val.i_int == 4212 );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL ) != 0
|| val.i_int == INT64_MAX );
val.i_int = 4212;
var_Change( p_libvlc, "bla", VLC_VAR_SETMAX, &val, NULL );
var_Change( p_libvlc, "bla", VLC_VAR_SETMINMAX, &val, &val );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL ) == 0
&& val.i_int == 4212 );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL ) == 0
&& val.i_int == 4212 );
......@@ -441,20 +438,6 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
assert( var_Get( p_libvlc, "bla", &val ) == VLC_ENOVAR );
var_Create( p_libvlc, "bla", VLC_VAR_INTEGER );
var_Change( p_libvlc, "bla", VLC_VAR_SETMIN, &val, NULL );
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ) == VLC_SUCCESS );
assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND) );
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE ) == VLC_SUCCESS );
assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND | VLC_VAR_HASCHOICE) );
var_Destroy( p_libvlc, "bla" );
var_Destroy( p_libvlc, "bla" );
var_Destroy( p_libvlc, "bla" );
assert( var_Get( p_libvlc, "bla", &val ) == VLC_ENOVAR );
var_Create( p_libvlc, "bla", VLC_VAR_INTEGER );
var_Change( p_libvlc, "bla", VLC_VAR_SETMAX, &val, NULL );
var_Change( p_libvlc, "bla", VLC_VAR_SETSTEP, &val, NULL );
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ) == VLC_SUCCESS );
assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND) );
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE ) == VLC_SUCCESS );
......
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