Code

Documentation update.
[ncmpc.git] / mpc.h
2 typedef struct
3 {
4   char selected;
5   mpd_InfoEntity *entity;
6 } filelist_entry_t;
8 typedef struct
9 {
10   mpd_Connection *connection;
11   mpd_Status     *status;
13   mpd_Song       *song;
14   int            song_id;
15   int            song_updated;
17   int            seek_song_id;
18   int            seek_target_time;
20   GList         *playlist;
21   int            playlist_length;
22   long long      playlist_id;
23   int            playlist_updated;
25   char           *cwd;
26   GList          *filelist;
27   int            filelist_length;
28   int            filelist_updated;
30 } mpd_client_t;
33 int mpc_close(mpd_client_t *c);
35 mpd_client_t *mpc_connect(char *host, int port, char *passwd);
36 int mpc_reconnect(mpd_client_t *c, char *host, int port, char *passwd);
38 int mpc_update(mpd_client_t *c);
39 int mpc_update_playlist(mpd_client_t *c);
41 int mpc_update_filelist(mpd_client_t *c);
42 int mpc_filelist_set_selected(mpd_client_t *c);
43 int mpc_set_cwd(mpd_client_t *c, char *dir);
45 mpd_Song *mpc_playlist_get_song(mpd_client_t *c, int n);
46 char *mpc_get_song_name(mpd_Song *song);
47 int mpc_playlist_get_song_index(mpd_client_t *c, char *filename);
49 int   mpc_error(mpd_client_t *c);
50 char *mpc_error_str(mpd_client_t *c);