summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abe255f)
raw | patch | inline | side by side (parent: abe255f)
author | Max Kellermann <max@duempel.org> | |
Sat, 15 Aug 2009 21:40:55 +0000 (23:40 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 15 Aug 2009 21:40:55 +0000 (23:40 +0200) |
The mpdclient library doesn't modify the parameter strings, let's make
them const.
them const.
src/mpdclient.c | patch | blob | history | |
src/mpdclient.h | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 4a12515752b9037366d99f1662022ea4269289e3..5f4632613632183bfb5c487c2589d5a60fa53202 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
gint
mpdclient_connect(mpdclient_t *c,
- gchar *host,
+ const gchar *host,
gint port,
gfloat _timeout,
- gchar *password)
+ const gchar *password)
{
gint retval = 0;
}
gint
-mpdclient_cmd_db_update(mpdclient_t *c, gchar *path)
+mpdclient_cmd_db_update(mpdclient_t *c, const gchar *path)
{
gint ret;
}
gint
-mpdclient_cmd_add_path(mpdclient_t *c, gchar *path_utf8)
+mpdclient_cmd_add_path(mpdclient_t *c, const gchar *path_utf8)
{
mpd_sendAddCommand(c->connection, path_utf8);
return mpdclient_finish_command(c);
}
gint
-mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename_utf8)
+mpdclient_cmd_save_playlist(mpdclient_t *c, const gchar *filename_utf8)
{
gint retval = 0;
}
gint
-mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8)
+mpdclient_cmd_load_playlist(mpdclient_t *c, const gchar *filename_utf8)
{
mpd_sendLoadCommand(c->connection, filename_utf8);
c->need_update = TRUE;
}
gint
-mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename_utf8)
+mpdclient_cmd_delete_playlist(mpdclient_t *c, const gchar *filename_utf8)
{
gint retval = 0;
}
GList *
-mpdclient_get_albums(mpdclient_t *c, gchar *artist_utf8)
+mpdclient_get_albums(mpdclient_t *c, const gchar *artist_utf8)
{
gchar *str = NULL;
GList *list = NULL;
diff --git a/src/mpdclient.h b/src/mpdclient.h
index e74722e607e01409273ca410f45c2399b8a9500e..42aa17c6877184e31a249f3a90e93139cae56d37 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
mpdclient_t *mpdclient_new(void);
void mpdclient_free(mpdclient_t *c);
-gint mpdclient_connect(mpdclient_t *c, gchar *host, gint port,
- gfloat timeout_, gchar *password);
+gint mpdclient_connect(mpdclient_t *c, const gchar *host, gint port,
+ gfloat timeout_, const gchar *password);
gint mpdclient_disconnect(mpdclient_t *c);
gint mpdclient_update(mpdclient_t *c);
gint mpdclient_cmd_single(mpdclient_t *c, gint value);
gint mpdclient_cmd_consume(mpdclient_t *c, gint value);
gint mpdclient_cmd_crossfade(mpdclient_t *c, gint value);
-gint mpdclient_cmd_db_update(mpdclient_t *c, gchar *path);
+gint mpdclient_cmd_db_update(mpdclient_t *c, const gchar *path);
gint mpdclient_cmd_volume(mpdclient_t *c, gint value);
gint mpdclient_cmd_volume_up(struct mpdclient *c);
gint mpdclient_cmd_volume_down(struct mpdclient *c);
-gint mpdclient_cmd_add_path(mpdclient_t *c, gchar *path);
+gint mpdclient_cmd_add_path(mpdclient_t *c, const gchar *path);
gint mpdclient_cmd_add(mpdclient_t *c, struct mpd_song *song);
gint mpdclient_cmd_delete(mpdclient_t *c, gint index);
gint mpdclient_cmd_move(mpdclient_t *c, gint old_index, gint new_index);
-gint mpdclient_cmd_save_playlist(mpdclient_t *c, gchar *filename);
-gint mpdclient_cmd_load_playlist(mpdclient_t *c, gchar *filename_utf8);
-gint mpdclient_cmd_delete_playlist(mpdclient_t *c, gchar *filename_utf8);
+gint mpdclient_cmd_save_playlist(mpdclient_t *c, const gchar *filename);
+gint mpdclient_cmd_load_playlist(mpdclient_t *c, const gchar *filename_utf8);
+gint mpdclient_cmd_delete_playlist(mpdclient_t *c, const gchar *filename_utf8);
/* list functions */
GList *mpdclient_get_artists(mpdclient_t *c);
-GList *mpdclient_get_albums(mpdclient_t *c, gchar *artist_utf8);
+GList *mpdclient_get_albums(mpdclient_t *c, const gchar *artist_utf8);
/*** error callbacks *****************************************************/