aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-20 20:02:33 +0000
committerKalle Wallin <kaw@linux.se>2004-06-20 20:02:33 +0000
commitc168e8f26c021b6d869e3afa9b4589a638ba5909 (patch)
treec030e2160e24269f7417896a0b18c8b4227e45d4 /src/mpdclient.c
parentb64e284f82a247898be963d6df94ad128b52f3e4 (diff)
downloadmpd-c168e8f26c021b6d869e3afa9b4589a638ba5909.tar.gz
mpd-c168e8f26c021b6d869e3afa9b4589a638ba5909.tar.xz
mpd-c168e8f26c021b6d869e3afa9b4589a638ba5909.zip
Added _utf8 suffix to all functions that take utf8 arguments.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1587 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/mpdclient.c40
1 files changed, 33 insertions, 7 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 1069f8ef5..3f1fb4416 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -316,7 +316,7 @@ mpdclient_cmd_crossfade(mpdclient_t *c, gint value)
}
gint
-mpdclient_cmd_db_update(mpdclient_t *c, gchar *path)
+mpdclient_cmd_db_update_utf8(mpdclient_t *c, gchar *path)
{
mpd_sendUpdateCommand(c->connection, path ? path : "");
return mpdclient_finish_command(c);
@@ -330,13 +330,19 @@ mpdclient_cmd_volume(mpdclient_t *c, gint value)
}
gint
+mpdclient_cmd_add_path_utf8(mpdclient_t *c, gchar *path_utf8)
+{
+ mpd_sendAddCommand(c->connection, path_utf8);
+ return mpdclient_finish_command(c);
+}
+
+gint
mpdclient_cmd_add_path(mpdclient_t *c, gchar *path)
{
gint retval;
gchar *path_utf8 = locale_to_utf8(path);
- mpd_sendAddCommand(c->connection, path_utf8);
- retval=mpdclient_finish_command(c);
+ retval=mpdclient_cmd_add_path_utf8(c, path_utf8);
g_free(path_utf8);
return retval;
}
@@ -483,20 +489,29 @@ mpdclient_cmd_move(mpdclient_t *c, gint old_index, gint new_index)
}
gint
-mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename)
+mpdclient_cmd_save_playlist_utf8(mpdclient_t *c, gchar *filename_utf8)
{
gint retval = 0;
- gchar *filename_utf8 = locale_to_utf8(filename);
mpd_sendSaveCommand(c->connection, filename_utf8);
if( (retval=mpdclient_finish_command(c)) == 0 )
mpdclient_browse_callback(c, BROWSE_PLAYLIST_SAVED, NULL);
+ return retval;
+}
+
+gint
+mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename)
+{
+ gint retval = 0;
+ gchar *filename_utf8 = locale_to_utf8(filename);
+
+ retval = mpdclient_cmd_save_playlist_utf8(c, filename);
g_free(filename_utf8);
return retval;
}
gint
-mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8)
+mpdclient_cmd_load_playlist_utf8(mpdclient_t *c, gchar *filename_utf8)
{
mpd_sendLoadCommand(c->connection, filename_utf8);
c->need_update = TRUE;
@@ -504,7 +519,7 @@ mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8)
}
gint
-mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename_utf8)
+mpdclient_cmd_delete_playlist_utf8(mpdclient_t *c, gchar *filename_utf8)
{
gint retval = 0;
@@ -514,6 +529,17 @@ mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename_utf8)
return retval;
}
+gint
+mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename)
+{
+ gint retval = 0;
+ gchar *filename_utf8 = locale_to_utf8(filename);
+
+ retval = mpdclient_cmd_delete_playlist_utf8(c, filename_utf8);
+ g_free(filename_utf8);
+ return retval;
+}
+
/****************************************************************************/
/*** Callback managment functions *******************************************/