/** Execute a command.
*/
-valerie_error_code valerie_execute( valerie this, size_t size, char *format, ... )
+valerie_error_code valerie_execute( valerie this, size_t size, const char *format, ... )
{
valerie_error_code error = valerie_server_unavailable;
char *command = malloc( size );
/** Execute a command.
*/
-valerie_error_code valerie_receive( valerie this, char *doc, size_t size, char *format, ... )
+valerie_error_code valerie_receive( valerie this, char *doc, size_t size, const char *format, ... )
{
valerie_error_code error = valerie_server_unavailable;
char *command = malloc( size );
/** Execute a command.
*/
-valerie_error_code valerie_push( valerie this, mlt_service service, size_t size, char *format, ... )
+valerie_error_code valerie_push( valerie this, mlt_service service, size_t size, const char *format, ... )
{
valerie_error_code error = valerie_server_unavailable;
char *command = malloc( size );
return valerie_execute( this, 1024, "CLEAR U%d", unit );
}
+/** Wipe the unit - this function removes all clips before the current one.
+*/
+
+valerie_error_code valerie_unit_wipe( valerie this, int unit )
+{
+ return valerie_execute( this, 1024, "WIPE U%d", unit );
+}
+
/** Move clips on the units playlist.
*/
/** Set a unit configuration property.
*/
-valerie_error_code valerie_unit_set( valerie this, int unit, char *name, char *value )
+valerie_error_code valerie_unit_set( valerie this, int unit, const char *name, const char *value )
{
return valerie_execute( this, 1024, "USET U%d %s=%s", unit, name, value );
}
/** List the contents of the specified directory.
*/
-valerie_dir valerie_dir_init( valerie this, char *directory )
+valerie_dir valerie_dir_init( valerie this, const char *directory )
{
valerie_dir dir = malloc( sizeof( valerie_dir_t ) );
if ( dir != NULL )
/** Obtain a printable message associated to the error code provided.
*/
-char *valerie_error_description( valerie_error_code error )
+const char *valerie_error_description( valerie_error_code error )
{
- char *msg = "Unrecognised error";
+ const char *msg = "Unrecognised error";
switch( error )
{
case valerie_ok: