Code

callbacks: add "connected" and "failed" callback
[ncmpc.git] / src / callbacks.h
index 610050895c346ab905bced0de0d268a5dc2fe6a1..6c315e45649396063003924ab5c48a13766623b0 100644 (file)
 
 struct mpdclient;
 
+/**
+ * A connection to MPD has been established.
+ */
+void
+mpdclient_connected_callback(void);
+
+/**
+ * An attempt to connect to MPD has failed.
+ * mpdclient_error_callback() has been called already.
+ */
+void
+mpdclient_failed_callback(void);
+
+/**
+ * The connection to MPD was lost.  If this was due to an error, then
+ * mpdclient_error_callback() has already been called.
+ */
+void
+mpdclient_lost_callback(void);
+
 /**
  * To be implemented by the application: mpdclient.c calls this to
  * display an error message.
+ *
+ * @param message a human-readable error message in the locale charset
  */
 void
 mpdclient_error_callback(const char *message);
@@ -37,9 +59,6 @@ bool
 mpdclient_auth_callback(struct mpdclient *c);
 
 void
-mpdclient_idle_callback(enum mpd_error error,
-                       enum mpd_server_error server_error,
-                       const char *message, enum mpd_idle events,
-                       void *ctx);
+mpdclient_idle_callback(enum mpd_idle events);
 
 #endif