From: Max Kellermann Date: Fri, 17 Mar 2017 21:24:24 +0000 (+0100) Subject: callbacks: rename functions X-Git-Tag: v0.26~62 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b840385c924fa9c62708956d8cb1f24562a2b2a4;p=ncmpc.git callbacks: rename functions --- diff --git a/src/callbacks.c b/src/callbacks.c index dd5d15b..e122682 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -24,7 +24,7 @@ #include "charset.h" static bool -_screen_auth(struct mpdclient *c, gint recursion) +_mpdclient_auth_callback(struct mpdclient *c, gint recursion) { struct mpd_connection *connection = mpdclient_get_connection(c); if (connection == NULL) @@ -46,19 +46,19 @@ _screen_auth(struct mpdclient *c, gint recursion) if (mpd_connection_get_error(connection) == MPD_ERROR_SERVER && mpd_connection_get_server_error(connection) == MPD_SERVER_ERROR_PASSWORD) - return _screen_auth(c, ++recursion); + return _mpdclient_auth_callback(c, ++recursion); return true; } bool -screen_auth(struct mpdclient *c) +mpdclient_auth_callback(struct mpdclient *c) { - return _screen_auth(c, 0); + return _mpdclient_auth_callback(c, 0); } void -mpdclient_ui_error(const char *message_utf8) +mpdclient_error_callback(const char *message_utf8) { char *message_locale = utf8_to_locale(message_utf8); screen_status_printf("%s", message_locale); diff --git a/src/callbacks.h b/src/callbacks.h index 2dbe9ba..2bc8473 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -29,9 +29,9 @@ struct mpdclient; * display an error message. */ void -mpdclient_ui_error(const char *message); +mpdclient_error_callback(const char *message); bool -screen_auth(struct mpdclient *c); +mpdclient_auth_callback(struct mpdclient *c); #endif diff --git a/src/mpdclient.c b/src/mpdclient.c index 7ef34d2..582d302 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -73,10 +73,10 @@ mpdclient_handle_error(struct mpdclient *c) if (error == MPD_ERROR_SERVER && mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_PERMISSION && - screen_auth(c)) + mpdclient_auth_callback(c)) return true; - mpdclient_ui_error(mpd_connection_get_error_message(c->connection)); + mpdclient_error_callback(mpd_connection_get_error_message(c->connection)); if (!mpd_connection_clear_error(c->connection)) mpdclient_disconnect(c);