Code

mpdclient: add struct names, for forward declarations
authorMax Kellermann <max@duempel.org>
Tue, 16 Sep 2008 17:11:39 +0000 (19:11 +0200)
committerMax Kellermann <max@duempel.org>
Tue, 16 Sep 2008 17:11:39 +0000 (19:11 +0200)
To relax the include dependencies, give all structs real names, in
addition to the typedef names.  This way, other headers can
forward-declare them, and do not need to include mpdclient.h.  In the
future, the typedefs will be removed.

src/mpdclient.h

index 6da4d0f3b1e28e662b9853e869ab4294b0c1d201..02ff92581686636351ccbe625982a49c66bc7544 100644 (file)
@@ -20,7 +20,7 @@
 /* Playlist */
 /****************************************************************************/
 
-typedef struct {
+typedef struct mpdclient_playlist {
        /* playlist id */
        long long id;
        /* true if the list is updated */
@@ -30,12 +30,12 @@ typedef struct {
 
 } mpdclient_playlist_t;
 
-typedef struct {
+typedef struct filelist_entry {
        guint flags;
        mpd_InfoEntity *entity;
 } filelist_entry_t;
 
-typedef struct {
+typedef struct mpdclient_filelist {
        /* path */
        gchar *path;
        /* list length */
@@ -47,7 +47,7 @@ typedef struct {
 
 } mpdclient_filelist_t;
 
-typedef struct {
+typedef struct mpdclient {
        /* playlist */
        mpdclient_playlist_t playlist;