Constness changes
[melted] / src / valerie / valerie.c
index c76112d..bc3624d 100644 (file)
@@ -117,7 +117,7 @@ static valerie_error_code valerie_get_error_code( valerie this, valerie_response
 /** 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 );
@@ -346,6 +346,14 @@ valerie_error_code valerie_unit_clear( valerie this, int unit )
        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.
 */
 
@@ -526,7 +534,7 @@ valerie_error_code valerie_unit_clear_in_out( valerie this, int unit )
 /** 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 );
 }
@@ -903,9 +911,9 @@ valerie_response valerie_get_last_response( valerie this )
 /** 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: