* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#if !defined( __LIBVLC__ )
+ #error You are not libvlc or one of its plugins. You cannot include this file
+#endif
+
/**
* \defgroup variables Variables
*
#define VLC_VAR_HASMAX 0x0400
#define VLC_VAR_HASSTEP 0x0800
-#define VLC_VAR_ISLIST 0x1000
#define VLC_VAR_ISCOMMAND 0x2000
-#define VLC_VAR_ISCONFIG 0x2000
/** Creation flag */
#define VLC_VAR_DOINHERIT 0x8000
return strdup( "" );
}
+static inline char *__var_GetNonEmptyString( vlc_object_t *obj, const char *name )
+{
+ vlc_value_t val;
+ if (__var_Get (obj, name, &val))
+ return NULL;
+ if (*val.psz_string)
+ return val.psz_string;
+ free (val.psz_string);
+ return NULL;
+}
+
+
/**
* __var_GetInteger() with automatic casting
*/
* __var_GetString() with automatic casting
*/
#define var_GetString(a,b) __var_GetString( VLC_OBJECT(a),b)
+#define var_GetNonEmptyString(a,b) __var_GetNonEmptyString( VLC_OBJECT(a),b)