diff --git a/src/mpdclient.h b/src/mpdclient.h
index 84878466d22e7a08bc40f42330502745f4f048e9..bac33383ab1bc33ccb34a614b5091fda8080f2cf 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
struct filelist;
struct mpdclient {
+ const char *host;
+ unsigned port;
+
+ unsigned timeout_ms;
+
+ const char *password;
+
/* playlist */
struct mpdclient_playlist playlist;
/**
* Tracks idle events. It is automatically called by
- * mpdclient_get_connection() and mpdclient_put_connection().
+ * mpdclient_get_connection().
*/
struct mpd_glib_source *source;
struct mpd_status *status;
const struct mpd_song *song;
+ /**
+ * The GLib source id which re-enters MPD idle mode before the
+ * next main loop interation.
+ */
+ unsigned enter_idle_source_id;
+
/**
* This attribute is incremented whenever the connection changes
* (i.e. on disconnection and (re-)connection).
}
struct mpdclient *
-mpdclient_new(void);
+mpdclient_new(const gchar *host, unsigned port,
+ unsigned timeout_ms, const gchar *password);
void mpdclient_free(struct mpdclient *c);
}
bool
-mpdclient_connect(struct mpdclient *c, const gchar *host, gint port,
- unsigned timeout_ms, const gchar *password);
+mpdclient_connect(struct mpdclient *c);
void
mpdclient_disconnect(struct mpdclient *c);
struct mpd_connection *
mpdclient_get_connection(struct mpdclient *c);
-void
-mpdclient_put_connection(struct mpdclient *c);
-
/*** MPD Commands **********************************************************/
bool