libmpd-database.h   libmpd-database.h 
skipping to change at line 31 skipping to change at line 31
#define __MPD_LIB_DATABASE__ #define __MPD_LIB_DATABASE__
/** \defgroup database Database /** \defgroup database Database
*/ */
/*@{*/ /*@{*/
/** /**
* @param mi A #MpdObj * @param mi A #MpdObj
* @param artist an artist name * @param artist an artist name
* *
* Grab's a list of albums of a certain artist from mpd. * Grabs a list of albums of a certain artist from mpd.
* if artist is %NULL it grabs all albums * if artist is %NULL it grabs all albums
* *
* @returns A #MpdData list. * @returns A #MpdData list.
*/ */
MpdData * mpd_database_get_albums (MpdObj *mi, char *artist); MpdData * mpd_database_get_albums (MpdObj *mi, char *artist);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* returns a list of all availible artists. * returns a list of all available artists.
* *
* @returns a #MpdData list * @returns a #MpdData list
*/ */
MpdData * mpd_database_get_artists (MpdObj *mi); MpdData * mpd_database_get_artists (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Get's the complete datababse, only returns songs * Gets the complete datababse, only returns songs
* *
* @returns a #MpdData list with songs * @returns a #MpdData list with songs
*/ */
MpdData * mpd_database_get_complete(MpdObj *mi); MpdData * mpd_database_get_complete(MpdObj *mi);
/** /**
*@param mi A #MpdObj *@param mi A #MpdObj
*@param path The path mpd should update. *@param path The path mpd should update.
* *
* Force mpd to update (parts of )the database. * Force mpd to update (parts of) the database.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_database_update_dir (MpdObj *mi, char *path); int mpd_database_update_dir (MpdObj *mi, char *path);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param table table * @param table table
* @param string string to search for * @param string string to search for
* @param exact if #TRUE only return exact matches * @param exact if #TRUE only return exact matches
skipping to change at line 101 skipping to change at line 101
* Recursively list all the songs directory path * Recursively list all the songs directory path
* *
* returns a #MpdData * returns a #MpdData
*/ */
MpdData * mpd_database_get_directory_recursive(MpdObj *mi, const char *path ); MpdData * mpd_database_get_directory_recursive(MpdObj *mi, const char *path );
/** /**
* @param mi A #MpdObj * @param mi A #MpdObj
* @param path an Path to a file * @param path an Path to a file
* *
* Grabs the song info for a single file. Make sure you pass an url to a so * Grabs the song info for a single file. Make sure you pass a url to a son
ng g
* and not a directory, that might result in strange behauviour. * and not a directory, that might result in strange behaviour.
* *
* @returns a #mpd_Song * @returns a #mpd_Song
*/ */
mpd_Song * mpd_database_get_fileinfo(MpdObj *mi,const char *path); mpd_Song * mpd_database_get_fileinfo(MpdObj *mi,const char *path);
/*@}*/ /*@}*/
/** \defgroup advsearch Database Advanced Search /** \defgroup advsearch Database Advanced Search
* \ingroup database * \ingroup database
* The following functions provide an interface to the improved search capa bilities of mpd 0.12.0. * The following functions provide an interface to the improved search capa bilities of mpd 0.12.0.
skipping to change at line 156 skipping to change at line 156
* *
* This function requires mpd 0.12.0 or higher * This function requires mpd 0.12.0 or higher
*/ */
void mpd_database_search_start(MpdObj *mi, int exact); void mpd_database_search_start(MpdObj *mi, int exact);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param field a #mpd_TagItems * @param field a #mpd_TagItems
* *
* Starts a field search, f.e. if you want a list of all albums, you do; * Starts a field search, eg. if you want a list of all albums, you do;
* *
* @code * @code
* mpd_database_search_field_start(mi, MPD_TAG_ITEM_ALBUM); * mpd_database_search_field_start(mi, MPD_TAG_ITEM_ALBUM);
* data = mpd_database_search_commit(mi); * data = mpd_database_search_commit(mi);
* @endcode * @endcode
* *
* You can add constraints using mpd_database_search_add_constraint, for ex ample if you want * You can add constraints using mpd_database_search_add_constraint, for ex ample if you want
* all albums by eric clapton: * all albums by eric clapton:
* *
* @code * @code
skipping to change at line 179 skipping to change at line 179
* data = mpd_database_search_commit(mi); * data = mpd_database_search_commit(mi);
* @endcode * @endcode
*/ */
void mpd_database_search_field_start(MpdObj *mi, mpd_TagItems field); void mpd_database_search_field_start(MpdObj *mi, mpd_TagItems field);
/** /**
* @param mi A #MpdObj * @param mi A #MpdObj
* *
* Commits the search and gathers the result in a #MpdData list. * Commits the search and gathers the result in a #MpdData list.
* *
* @returns a #MpdData list with the search result,or NULL when nothing is found * @returns a #MpdData list with the search result, or NULL when nothing is found
*/ */
MpdData * mpd_database_search_commit(MpdObj *mi); MpdData * mpd_database_search_commit(MpdObj *mi);
/*@}*/ /*@}*/
/** \defgroup databaseSearchStats Database Search Statistics /** \defgroup databaseSearchStats Database Search Statistics
* \ingroup database * \ingroup database
* A extention to the database search, that instead of returning the full r esults. * A extention to the database search, that instead of returning the full r esults.
* Only reports back a few statistics about the result. * Only reports back a few statistics about the result.
* For now Number of Songs are reported and total playtime. * For now Number of Songs are reported and total playtime.
*/ */
skipping to change at line 223 skipping to change at line 223
* *
* Gets statistics results of a search. * Gets statistics results of a search.
* *
* return a #MpdDBStats * return a #MpdDBStats
*/ */
MpdDBStats * mpd_database_search_stats_commit(MpdObj *mi); MpdDBStats * mpd_database_search_stats_commit(MpdObj *mi);
/** /**
* @param data a #MpdDBStats * @param data a #MpdDBStats
* *
* free's the #MpdDBStats structure. * frees the #MpdDBStats structure.
*/ */
void mpd_database_search_free_stats(MpdDBStats *data); void mpd_database_search_free_stats(MpdDBStats *data);
/*@}*/ /*@}*/
/** \defgroup databasePlaylist Database Playlist /** \defgroup databasePlaylist Database Playlist
* \ingroup database * \ingroup database
*/ */
/*@{*/ /*@{*/
skipping to change at line 277 skipping to change at line 277
* @param path a string contains the path of the playlist * @param path a string contains the path of the playlist
* @param file a string contains the path of the song to add * @param file a string contains the path of the song to add
* *
* Add a path to a stored playlist. * Add a path to a stored playlist.
* Needs 0.13.0 * Needs 0.13.0
*/ */
void mpd_database_playlist_list_add(MpdObj *mi, const char *path, const cha r *file); void mpd_database_playlist_list_add(MpdObj *mi, const char *path, const cha r *file);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path a string contains the path of the playlist * @param path a string containing the path of the playlist
* @param pos a int representing the position of a song * @param pos an int representing the position of a song
* *
* Deletes the song at position pos from a playlist. * Deletes the song at position pos from a playlist.
* Needs mpd 0.13.0 * Needs mpd 0.13.0
* *
*/ */
void mpd_database_playlist_list_delete(MpdObj *mi, const char *path, int po s); void mpd_database_playlist_list_delete(MpdObj *mi, const char *path, int po s);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path a string contains the path of the playlist * @param path a string containing the path of the playlist
* *
* Clears the content of a stored playlist, also used to create an empty pl aylist * Clears the content of a stored playlist, also used to create an empty pl aylist
* Needs mpd 0.13.0 * Needs mpd 0.13.0
*/ */
void mpd_database_playlist_clear(MpdObj *mi,const char *path); void mpd_database_playlist_clear(MpdObj *mi,const char *path);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param old a string, old playlist name * @param old a string, old playlist name
* @param new a string, new playlist name * @param new a string, new playlist name
* *
* Renames a stored playlist * Renames a stored playlist
* Needs mpd 0.13.0 * Needs mpd 0.13.0
*/ */
void mpd_database_playlist_rename(MpdObj *mi, const char *old_name, const c har *new_name); void mpd_database_playlist_rename(MpdObj *mi, const char *old_name, const c har *new_name);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param playlist a string contains the path of the playlist * @param playlist a string containing the path of the playlist
* @param old_pos integer representing old position * @param old_pos an integer representing old position
* @param new_pos integer representing the position to move old_pos to. * @param new_pos an integer representing the position to move old_pos to.
* *
* Moves songs in a stored playlists * Moves songs in a stored playlist
* Needs mpd 0.13.0 * Needs mpd 0.13.0
*/ */
int mpd_database_playlist_move(MpdObj *mi, const char *playlist, int old_po s, int new_pos); int mpd_database_playlist_move(MpdObj *mi, const char *playlist, int old_po s, int new_pos);
MpdData * mpd_database_playlist_list(MpdObj *mi);
/*@}*/ /*@}*/
#endif #endif
 End of changes. 13 change blocks. 
17 lines changed or deleted 18 lines changed or added


 libmpd-internal.h   libmpd-internal.h 
skipping to change at line 17 skipping to change at line 17
typedef struct _MpdData_real { typedef struct _MpdData_real {
/* MpdDataType */ /* MpdDataType */
MpdDataType type; MpdDataType type;
union { union {
struct { struct {
int tag_type; int tag_type;
char *tag; char *tag;
}; };
char *directory; char *directory;
char *playlist; /*is a path*/ mpd_PlaylistFile *playlist;
mpd_Song *song; mpd_Song *song;
mpd_OutputEntity *output_dev; /* from devices */ mpd_OutputEntity *output_dev; /* from devices */
}; };
void *userdata; void *userdata;
void (*freefunc)(void *userdata); void (*freefunc)(void *userdata);
struct _MpdData_real *next; struct _MpdData_real *next;
/* Previous MpdData in the list */ /* Previous MpdData in the list */
struct _MpdData_real *prev; struct _MpdData_real *prev;
struct _MpdData_real *first; struct _MpdData_real *first;
skipping to change at line 123 skipping to change at line 123
int search_type; int search_type;
int search_field; int search_field;
/** /**
* For tracking changed outputs. * For tracking changed outputs.
* A hack for retarted mpd * A hack for retarted mpd
*/ */
int num_outputs; int num_outputs;
int *output_states; int *output_states;
int has_idle;
}_MpdObj; }_MpdObj;
typedef enum MpdQueueType { typedef enum MpdQueueType {
MPD_QUEUE_ADD, MPD_QUEUE_ADD,
MPD_QUEUE_LOAD, MPD_QUEUE_LOAD,
MPD_QUEUE_DELETE_ID, MPD_QUEUE_DELETE_ID,
MPD_QUEUE_DELETE_POS, MPD_QUEUE_DELETE_POS,
MPD_QUEUE_COMMAND /* abuse!!! */ MPD_QUEUE_COMMAND /* abuse!!! */
} MpdQueueType; } MpdQueueType;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 libmpd-playlist.h   libmpd-playlist.h 
skipping to change at line 73 skipping to change at line 73
* @returns a mpd_Song * @returns a mpd_Song
*/ */
mpd_Song * mpd_playlist_get_song_from_pos(MpdObj *mi, int songpos); mpd_Song * mpd_playlist_get_song_from_pos(MpdObj *mi, int songpos);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* returns the mpd_Song for the currently playing song * returns the mpd_Song for the currently playing song
* *
* @returns a mpd_Song, this is an internally cached version, and should no t be free'ed. It's also not guaranteed to stay valid (it will be inside the same function if no other mpd_* function gets called.) * @returns a mpd_Song, this is an internally cached version, and should no t be freed. It's also not guaranteed to stay valid (it will be inside the s ame function if no other mpd_* function gets called.)
* if you need to keep it around, make a copy. * if you need to keep it around, make a copy.
*/ */
mpd_Song * mpd_playlist_get_current_song (MpdObj *mi); mpd_Song * mpd_playlist_get_current_song (MpdObj *mi);
/** /**
* mpd_playlist_clear * mpd_playlist_clear
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Clears the playlist * Clears the playlist
* *
* @returns * @returns
*/ */
int mpd_playlist_clear (MpdObj *mi); int mpd_playlist_clear (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Shuffle's the order of the playlist, this is different then playing rand om * Shuffles the order of the playlist, this is different than playing rando m
* *
* @returns * @returns
*/ */
int mpd_playlist_shuffle (MpdObj *mi); int mpd_playlist_shuffle (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param old_pos The current position in the playlist * @param old_pos The current position in the playlist
* @param new_pos The new position in the playlist. * @param new_pos The new position in the playlist.
* *
skipping to change at line 121 skipping to change at line 121
* *
* Moves a song in the playlist. This uses the id of the song, not the posi tion * Moves a song in the playlist. This uses the id of the song, not the posi tion
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_move_id (MpdObj *mi, int old_id, int new_id); int mpd_playlist_move_id (MpdObj *mi, int old_id, int new_id);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param old_playlist_id The id of the old playlist you want to get the ch anges with. * @param old_playlist_id The id of the old playlist you want to get the ch anges with.
* *
* Get's a list of the song that changed between the current and the old pl aylist * Gets a list of songs that changed between the current and the old playli st
* *
* @returns a #MpdData list * @returns a #MpdData list
*/ */
MpdData * mpd_playlist_get_changes (MpdObj *mi,int old_ playlist_id); MpdData * mpd_playlist_get_changes (MpdObj *mi,int old_ playlist_id);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param old_playlist_id The id of the old playlist you want to get the ch anges with. * @param old_playlist_id The id of the old playlist you want to get the ch anges with.
* *
* Get's a list of the song id/pos that changed between the current and the * Gets a list of the song id/pos that changed between the current and the
old playlist old playlist
* Check if this command is availible. * Check if this command is available.
* *
* @returns a #MpdData list * @returns a #MpdData list
*/ */
MpdData * mpd_playlist_get_changes_posid(MpdObj *mi,int old_playlist_id); MpdData * mpd_playlist_get_changes_posid(MpdObj *mi,int old_playlist_id);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* @returns The number of songs in the current playlist. * @returns The number of songs in the current playlist.
*/ */
int mpd_playlist_get_playlist_length (MpdObj *mi); int mpd_playlist_get_playlist_length (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path the path of the song to be added. * @param path the path of the song to be added.
* *
* Add's a song to the playlist, use #mpd_playlist_queue_add to add multipl e songs. * Adds a song to the playlist, use #mpd_playlist_queue_add to add multiple songs.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_add (MpdObj *mi, char *p ath); int mpd_playlist_add (MpdObj *mi, char *p ath);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param songid a song id. * @param songid a song id.
* *
* Delete's a single song by it's id. * Deletes a single song by it's id.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_delete_id(MpdObj *mi, int songid); int mpd_playlist_delete_id(MpdObj *mi, int songid);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param songpos a song pos. * @param songpos a song pos.
* *
* Delete's a single song by it's position. * Deletes a single song by it's position.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_delete_pos(MpdObj *mi, int songpos); int mpd_playlist_delete_pos(MpdObj *mi, int songpos);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path a path to a song * @param path a path to a song
* *
* Add a single path and return the id * Add a single path and return the id
* Only use this to add a single list, if you need to add multiple songs, * Only use this to add a single song, if you need to add multiple songs,
* use the #mpd_playlist_queue_add for improved performance * use the #mpd_playlist_queue_add for improved performance
* *
* @returns a #MpdError or the songid of the added song * @returns a #MpdError or the songid of the added song
*/ */
int mpd_playlist_add_get_id(MpdObj *mi, char *path); int mpd_playlist_add_get_id(MpdObj *mi, char *path);
/*@}*/ /*@}*/
/** \defgroup comqueue Command Queue /** \defgroup comqueue Command Queue
* \ingroup Playlist * \ingroup Playlist
* These functions allow you to queue commands, and send them * These functions allow you to queue commands, and send them
* in one command list to mpd. This is very efficient. * in one command list to mpd. This is very efficient.
* It's adviced to use these for large deletes and add's. * It's advised to use these for large deletions and additions.
* These functions doesn't cause an extra overhead compared to the non_queu * These functions don't cause an extra overhead compared to the non_queue
e functions. functions.
* Because the non_queue functions just wrap the following. * Because the non_queue functions just wrap the following.
*/ */
/*@{*/ /*@{*/
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path The path to a song to add * @param path The path to a song to add
* *
* This queue's an add command. The actuall add isn't done until #mpd_playl ist_queue_commit is called * This queues an add command. The actual add isn't done until #mpd_playlis t_queue_commit is called
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_queue_add (MpdObj *mi,char *path); int mpd_playlist_queue_add (MpdObj *mi,char *path);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param path The path to a playlist to load * @param path The path to a playlist to load
* *
* This queue's an load command. The actuall load isn't done until #mpd_pla ylist_queue_commit is called * This queues a load command. The actual load isn't done until #mpd_playli st_queue_commit is called
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_queue_load (MpdObj *mi,char *path); int mpd_playlist_queue_load (MpdObj *mi,char *path);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param id The songid of the song you want to delete * @param id The songid of the song you want to delete
* *
* This queue's an delete song from playlist command. The actually delete i sn't done until #mpd_playlist_queue_commit is called * This queues a delete song from playlist command. The actually delete isn 't done until #mpd_playlist_queue_commit is called
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_queue_delete_id (MpdObj *mi,int id); int mpd_playlist_queue_delete_id (MpdObj *mi,int id);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param songpos a song pos. * @param songpos a song pos.
* *
* Queue's the deletion of a single song by it's position. * Queues the deletion of a single song by it's position.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_queue_delete_pos (MpdObj *mi,int songpos); int mpd_playlist_queue_delete_pos (MpdObj *mi,int songpos);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Commits the queue'd commands in a command list. This is an efficient way of doing alot of add's/removes. * Commits the queue'd commands in a command list. This is an efficient way of doing a lot of adds/removes.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_queue_commit (MpdObj *mi); int mpd_playlist_queue_commit (MpdObj *mi);
/*@}*/ /*@}*/
/** \defgroup playlistsearch Playlist Search /** \defgroup playlistsearch Playlist Search
* \ingroup Playlist * \ingroup Playlist
* Allow server side search of the current playlist. * Allow server side search of the current playlist.
skipping to change at line 296 skipping to change at line 296
/** \defgroup playlistqueue Playlist Queue /** \defgroup playlistqueue Playlist Queue
* \ingroup Playlist * \ingroup Playlist
* Allow control of MPD new queue system * Allow control of MPD new queue system
*/ */
/*@{*/ /*@{*/
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param songid the id of the song to add * @param songid the id of the song to add
* *
* Add the song from the playlist with id id. * Add the song from the playlist with id songid.
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_mpd_queue_add(MpdObj *mi, int songid); int mpd_playlist_mpd_queue_add(MpdObj *mi, int songid);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param songpos the pos of the song to remove * @param songpos the pos of the song to remove
* *
* Removes the song from the queue at position pos * Removes the song from the queue at position songpos
* *
* @returns a #MpdError * @returns a #MpdError
*/ */
int mpd_playlist_mpd_queue_remove(MpdObj *mi, int songpos); int mpd_playlist_mpd_queue_remove(MpdObj *mi, int songpos);
/*@}*/ /*@}*/
#endif #endif
 End of changes. 16 change blocks. 
20 lines changed or deleted 20 lines changed or added


 libmpd-status.h   libmpd-status.h 
skipping to change at line 30 skipping to change at line 30
#ifndef __MPD_LIB_STATUS__ #ifndef __MPD_LIB_STATUS__
#define __MPD_LIB_STATUS__ #define __MPD_LIB_STATUS__
/**\defgroup 20status Status /**\defgroup 20status Status
* Functions to get and modify the status/state of mpd. * Functions to get and modify the status/state of mpd.
*/ */
/*@{*/ /*@{*/
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Checks if there is status information is availibe, if not availible it t ries to fetch it. * Checks if there is status information availibe. if not availible, it tri es to fetch it.
* This function is called from within libmpd, and shouldn't be called from the program. * This function is called from within libmpd, and shouldn't be called from the program.
* *
* @returns 0 when successful * @returns 0 when successful
*/ */
int mpd_status_check (MpdObj *mi); int mpd_status_check (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Marks the current status invalid, the next time status is needed it will be fetched from mpd. * Marks the current status invalid, the next time status is needed it will be fetched from mpd.
* *
* @returns 0 when successful * @returns 0 when successful
*/ */
int mpd_status_queue_update (MpdObj *mi); int mpd_status_queue_update (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Updates the status field from mpd. * Updates the status field from mpd.
* Call this function ever 0.x seconds from the program's main-loop to reci eve signals when mpd's status has changed. * Call this function every 0.x seconds from the program's main-loop to rec ieve signals when mpd's status has changed.
* *
* @returns 0 when succesfull * @returns 0 when succesfull
*/ */
int mpd_status_update (MpdObj *mi); int mpd_status_update (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param fvol an float between 0.0 and 1.0 * @param fvol an float between 0.0 and 1.0
* *
* Set the output volume * Set the output volume
skipping to change at line 78 skipping to change at line 78
* *
* Set the output volume * Set the output volume
* *
* @returns the new volume or < 0 when failed. * @returns the new volume or < 0 when failed.
*/ */
int mpd_status_set_volume (MpdObj *mi,int volu me); int mpd_status_set_volume (MpdObj *mi,int volu me);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Set the audio output volume. * Get the audio output volume.
* *
* @returns the volume between 0 and 100 or < 0 when failed * @returns the audio output volume between 0 and 100 or < 0 when failed
*/ */
int mpd_status_get_volume (MpdObj *mi); int mpd_status_get_volume (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* get the bitrate of the current playing song in kbs. This is a constantly updating value. (for vbr songs) * get the bitrate of the currently playing song in kbs. This is a constant ly updating value. (for vbr songs)
* *
* @returns bitrate in kbs * @returns bitrate in kbs
*/ */
int mpd_status_get_bitrate (MpdObj *mi); int mpd_status_get_bitrate (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* get the samplerate of the current playing song in bps. * get the samplerate of the currently playing song in bps.
* *
* @returns samplerate in bps * @returns samplerate in bps
*/ */
unsigned int mpd_status_get_samplerate (MpdObj *mi) ; unsigned int mpd_status_get_samplerate (MpdObj *mi) ;
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* get the number of channels in the current playing song. This is usually only 1(mono) or 2(stereo), but this might change in the future. * get the number of channels in the currently playing song. This is usuall y only 1(mono) or 2(stereo), but this might change in the future.
* *
* @returns number of channels * @returns number of channels
*/ */
int mpd_status_get_channels (MpdObj *mi); int mpd_status_get_channels (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* get the number of bits per sample of the current playing song. * get the number of bits per sample of the currently playing song.
* *
* @returns bits per sample * @returns bits per sample
*/ */
int mpd_status_get_bits (MpdObj *mi); int mpd_status_get_bits (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* get the total length of the currently playing song. * get the total length of the currently playing song.
* *
skipping to change at line 151 skipping to change at line 151
* Get the crossfade time. 0 is disabled. * Get the crossfade time. 0 is disabled.
* *
* @returns The crossfade time in seconds * @returns The crossfade time in seconds
*/ */
int mpd_status_get_crossfade (MpdObj *mi); int mpd_status_get_crossfade (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param crossfade_time the time to crossfade in seconds * @param crossfade_time the time to crossfade in seconds
* *
* Sets the crossfade time. 0 is disabled * Sets the crossfade time. 0 to disable crossfade.
* *
* @returns * @returns
*/ */
int mpd_status_set_crossfade (MpdObj *mi, int cro ssfade_time); int mpd_status_set_crossfade (MpdObj *mi, int cro ssfade_time);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Checks if mpd is updating it's music db. * Checks if mpd is updating it's music db.
* *
* @returns TRUE if mpd is still updating, FALSE if not. * @returns TRUE if mpd is still updating, FALSE if not.
*/ */
int mpd_status_db_is_updating (MpdObj *mi); int mpd_status_db_is_updating (MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* @returns the error message that mpd last reported, on NULL. Needs to be free'ed. * @returns the error message that mpd last reported, on NULL. Needs to be freed.
*/ */
char * mpd_status_get_mpd_error(MpdObj *mi); char * mpd_status_get_mpd_error(MpdObj *mi);
/*@}*/ /*@}*/
/**\defgroup 20stats Stats /**\defgroup 20stats Stats
* Functions to get mpd statistics * Functions to get mpd statistics
*/ */
/*@{*/ /*@{*/
 End of changes. 10 change blocks. 
10 lines changed or deleted 10 lines changed or added


 libmpd-version.h   libmpd-version.h 
#ifndef LIBMPD_VERSION #ifndef LIBMPD_VERSION
#define LIBMPD_VERSION "0.16.1" #define LIBMPD_VERSION "0.16.5"
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 libmpd.h   libmpd.h 
skipping to change at line 76 skipping to change at line 76
MPD_STATUS_FAILED = -20, MPD_STATUS_FAILED = -20,
/** Connection is still locked */ /** Connection is still locked */
MPD_LOCK_FAILED = -30, MPD_LOCK_FAILED = -30,
/** Failed to grab status */ /** Failed to grab status */
MPD_STATS_FAILED = -40, MPD_STATS_FAILED = -40,
/** Mpd server returned an error */ /** Mpd server returned an error */
MPD_SERVER_ERROR = -50, MPD_SERVER_ERROR = -50,
/** Mpd doesn't support this feature */ /** Mpd doesn't support this feature */
MPD_SERVER_NOT_SUPPORTED = -51, MPD_SERVER_NOT_SUPPORTED = -51,
/** The playlist allready extists */ /** The playlist already exists */
MPD_DATABASE_PLAYLIST_EXIST = -60, MPD_DATABASE_PLAYLIST_EXIST = -60,
/** Playlist is empty */ /** Playlist is empty */
MPD_PLAYLIST_EMPTY = -70, MPD_PLAYLIST_EMPTY = -70,
/** Playlist queue is empty */ /** Playlist queue is empty */
MPD_PLAYLIST_QUEUE_EMPTY = -75, MPD_PLAYLIST_QUEUE_EMPTY = -75,
/** Player isn't Playing */ /** Player isn't Playing */
MPD_PLAYER_NOT_PLAYING = -80, MPD_PLAYER_NOT_PLAYING = -80,
/** Tag ITem not found */ /** Tag Item not found */
MPD_TAG_NOT_FOUND = -90, MPD_TAG_NOT_FOUND = -90,
/** Fatal error, something I am not sure what todo with */ /** Fatal error, something I am not sure what todo with */
MPD_FATAL_ERROR = -1000 MPD_FATAL_ERROR = -1000
}MpdError; }MpdError;
/** /**
* The Main Mpd Object. Don't access any of the internal values directly, but use the provided functions. * The Main Mpd Object. Don't access any of the internal values directly, but use the provided functions.
*/ */
typedef struct _MpdObj MpdObj; typedef struct _MpdObj MpdObj;
skipping to change at line 147 skipping to change at line 147
union { union {
struct { struct {
/** a #mpd_TagItems defining what #tag contains */ /** a #mpd_TagItems defining what #tag contains */
int tag_type; int tag_type;
/** a string containing the tag*/ /** a string containing the tag*/
char *tag; char *tag;
}; };
/** a directory */ /** a directory */
char *directory; char *directory;
/** a path to a playlist */ /** a path to a playlist */
char *playlist; mpd_PlaylistFile *playlist;
/** a mpd_Song */ /** a mpd_Song */
mpd_Song *song; mpd_Song *song;
/** an output device entity */ /** an output device entity */
mpd_OutputEntity *output_dev; mpd_OutputEntity *output_dev;
}; };
void *userdata; void *userdata;
void (*freefunc)(void *userdata); void (*freefunc)(void *userdata);
} MpdData; } MpdData;
#include "libmpd-player.h" #include "libmpd-player.h"
#include "libmpd-status.h" #include "libmpd-status.h"
#include "libmpd-database.h" #include "libmpd-database.h"
#include "libmpd-playlist.h" #include "libmpd-playlist.h"
#include "libmpd-strfsong.h" #include "libmpd-strfsong.h"
/** /**
* mpd_new_default * mpd_new_default
* *
* Create an new #MpdObj with default settings. * Create a new #MpdObj with default settings.
* Hostname will be set to "localhost". * Hostname will be set to "localhost".
* Port will be 6600. * Port will be 6600.
* *
* same as calling: * same as calling:
* @code * @code
* mpd_new("localhost",6600,NULL); * mpd_new("localhost",6600,NULL);
* @endcode * @endcode
* *
* @returns the new #MpdObj * @returns the new #MpdObj
*/ */
skipping to change at line 247 skipping to change at line 247
* *
* @returns a #MpdError. (MPD_OK if everything went ok) * @returns a #MpdError. (MPD_OK if everything went ok)
*/ */
int mpd_set_connection_timeout(MpdObj * mi, float timeout); int mpd_set_connection_timeout(MpdObj * mi, float timeout);
int mpd_connect_real(MpdObj *mi,mpd_Connection *connection); int mpd_connect_real(MpdObj *mi,mpd_Connection *connection);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Connect to the mpd daemon. * Connect to the mpd daemon.
* Warning: mpd_connect connects anonymous, to authentificate use #mpd_send _password * Warning: mpd_connect connects anonymous, to authenticate use #mpd_send_p assword
* *
* @returns returns a #MpdError, MPD_OK when successful * @returns returns a #MpdError, MPD_OK when successful
*/ */
int mpd_connect(MpdObj * mi); int mpd_connect(MpdObj * mi);
/** /**
* @param mi The #MpdObj to disconnect * @param mi The #MpdObj to disconnect
* *
* Disconnect the current connection * Disconnect the current connection
* @returns MPD_OK (always) * @returns MPD_OK (always)
skipping to change at line 365 skipping to change at line 365
/** output changed */ /** output changed */
MPD_CST_OUTPUT = 0x80000 MPD_CST_OUTPUT = 0x80000
} ChangedStatusType; } ChangedStatusType;
/* callback typedef's */ /* callback typedef's */
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param what a #ChangedStatusType that determines what changed triggered the signal. This is a bitmask. * @param what a #ChangedStatusType that determines what changed triggered the signal. This is a bitmask.
* @param userdata user data set when the signal handler was connected. * @param userdata user data set when the signal handler was connected.
* *
* Signal that get's called when the state of mpd changed. Look #ChangedSta tusType to see the possible events. * Signal that get's called when the state of mpd has changed. Look #Change dStatusType to see the possible events.
*/ */
typedef void (*StatusChangedCallback) (MpdObj * mi, ChangedStatusType what, void *userdata); typedef void (*StatusChangedCallback) (MpdObj * mi, ChangedStatusType what, void *userdata);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param id The error Code. * @param id The error Code.
* @param msg human-readable informative error message. * @param msg human-readable informative error message.
* @param userdata user data set when the signal handler was connected. * @param userdata user data set when the signal handler was connected.
* This signal is called when an error has occured in the communication wit h mpd. * This signal is called when an error has occured in the communication wit h mpd.
* *
* return: TRUE if libmpd should disconnect. * return: TRUE if libmpd should disconnect.
*/ */
typedef int (*ErrorCallback) (MpdObj * mi, int id, char *msg, void *userdat a); typedef int (*ErrorCallback) (MpdObj * mi, int id, char *msg, void *userdat a);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param connect 1 if you are now connect, 0 if you are disconnect. * @param connect 1 if you are now connected, 0 if you are disconnected.
* @param userdata user data set when the signal handler was connected. * @param userdata user data set when the signal handler was connected.
* Signal is triggered when the connection state changes. * Signal is triggered when the connection state changes.
*/ */
typedef void (*ConnectionChangedCallback) (MpdObj * mi, int connect, void * userdata); typedef void (*ConnectionChangedCallback) (MpdObj * mi, int connect, void * userdata);
/* new style signal connectors */ /* new style signal connectors */
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param status_changed a #StatusChangedCallback * @param status_changed a #StatusChangedCallback
skipping to change at line 425 skipping to change at line 425
/**\defgroup MpdData Data Object /**\defgroup MpdData Data Object
* This is a fast linked list implementation where data returned from mpd i s stored in. * This is a fast linked list implementation where data returned from mpd i s stored in.
*/ */
/*@{*/ /*@{*/
/** /**
* @param data a #MpdData * @param data a #MpdData
* *
* Check's if the passed #MpdData is the last in a list * Checks if the passed #MpdData is the last in a list
* @returns TRUE when data is the last in the list. * @returns TRUE when data is the last in the list.
*/ */
int mpd_data_is_last(MpdData const *data); int mpd_data_is_last(MpdData const *data);
/** /**
* @param data a #MpdData * @param data a #MpdData
* *
* Free's a #MpdData List * Free's a #MpdData List
*/ */
void mpd_data_free(MpdData * data); void mpd_data_free(MpdData * data);
/** /**
* @param data a #MpdData * @param data a #MpdData
* *
* Returns the next #MpdData in the list. * Returns the next #MpdData in the list.
* If it's the last item in the list, it will free the list. * If it's the last item in the list, it will free the list.
* *
* You can itterate through a list like this and have it free'ed afterwards . * You can iterate through a list like this and have it freed afterwards.
* @code * @code
* for(data = mpd_database_get_albums(mi);data != NULL; data = mpd_data _get_next(data)) * for(data = mpd_database_get_albums(mi);data != NULL; data = mpd_data _get_next(data))
* { * {
* // do your thing * // do your thing
* } * }
* @endcode * @endcode
* @returns The next #MpdData or %NULL * @returns The next #MpdData or %NULL
*/ */
MpdData *mpd_data_get_next(MpdData * data); MpdData *mpd_data_get_next(MpdData * data);
skipping to change at line 502 skipping to change at line 502
* *
* Enable or Disable an audio output device * Enable or Disable an audio output device
* *
* @returns 0 if successful * @returns 0 if successful
*/ */
int mpd_server_set_output_device(MpdObj * mi, int device_id, int state); int mpd_server_set_output_device(MpdObj * mi, int device_id, int state);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* Get's a unix timestamp of the last time the database was updated. * Gets a unix timestamp of the last time the database was updated.
* *
* @returns unix Timestamp * @returns unix Timestamp
*/ */
long unsigned mpd_server_get_database_update_time(MpdObj * mi); long unsigned mpd_server_get_database_update_time(MpdObj * mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* @param major the major version number * @param major the major version number
* @param minor the minor version number * @param minor the minor version number
* @param micro the micro version number * @param micro the micro version number
skipping to change at line 540 skipping to change at line 540
* *
* Checks if the user is allowed to execute the command and if the server s upports it * Checks if the user is allowed to execute the command and if the server s upports it
* *
* @returns Returns #MpdServerCommand * @returns Returns #MpdServerCommand
*/ */
int mpd_server_check_command_allowed(MpdObj * mi, const char *command); int mpd_server_check_command_allowed(MpdObj * mi, const char *command);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* @returns an array with urlhandlers (NULL terminated). Result must be fre e-ed. * @returns an array with urlhandlers (NULL terminated). Result must be fre ed.
*/ */
char ** mpd_server_get_url_handlers(MpdObj *mi); char ** mpd_server_get_url_handlers(MpdObj *mi);
/** /**
* @param mi a #MpdObj * @param mi a #MpdObj
* *
* @returns an array with supported tag types. (NULL Terminated). Result mu st be free-ed. * @returns an array with supported tag types. (NULL Terminated). Result mu st be freed.
*/ */
char ** mpd_server_get_tag_types(MpdObj *mi); char ** mpd_server_get_tag_types(MpdObj *mi);
/*@}*/ /*@}*/
/** \defgroup Misc Misc /** \defgroup Misc Misc
* Helper functions. * Helper functions.
*/ */
/*@{*/ /*@{*/
/** /**
* @param name a NULL terminated string * @param name a NULL terminated string
* *
* gets the Matching #MpdDataType matching at the string * gets the Matching #MpdDataType matching at the string
* *
* @returns a #MpdDataType * @returns a #MpdDataType
*/ */
int mpd_misc_get_tag_by_name(char *name); int mpd_misc_get_tag_by_name(char *name);
/*@}*/ /*@}*/
/**
* @param mi a #MpdObj
*
* Reports if the connected mpd supports the idle command.
*
* @returns a boolean, TRUE if it has idle support
*/
int mpd_server_has_idle(MpdObj *mi);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 13 change blocks. 
12 lines changed or deleted 22 lines changed or added


 libmpdclient.h   libmpdclient.h 
skipping to change at line 348 skipping to change at line 348
*/ */
mpd_Directory * mpd_directoryDup(mpd_Directory * directory); mpd_Directory * mpd_directoryDup(mpd_Directory * directory);
/* PLAYLISTFILE STUFF */ /* PLAYLISTFILE STUFF */
/* mpd_PlaylistFile /* mpd_PlaylistFile
* stores info about playlist file returned by lsinfo * stores info about playlist file returned by lsinfo
*/ */
typedef struct _mpd_PlaylistFile { typedef struct _mpd_PlaylistFile {
char * path; char * path;
char * mtime;
} mpd_PlaylistFile; } mpd_PlaylistFile;
/* mpd_newPlaylistFile /* mpd_newPlaylistFile
* allocates memory for new mpd_PlaylistFile, path is set to NULL * allocates memory for new mpd_PlaylistFile, path is set to NULL
* free this memory with mpd_freePlaylistFile * free this memory with mpd_freePlaylistFile
*/ */
mpd_PlaylistFile * mpd_newPlaylistFile(void); mpd_PlaylistFile * mpd_newPlaylistFile(void);
/* mpd_freePlaylist /* mpd_freePlaylist
* free memory allocated for freePlaylistFile, will also free * free memory allocated for freePlaylistFile, will also free
skipping to change at line 670 skipping to change at line 671
void mpd_sendPlaylistAddCommand(mpd_Connection *connection, void mpd_sendPlaylistAddCommand(mpd_Connection *connection,
char *playlist, char *path); char *playlist, char *path);
void mpd_sendPlaylistMoveCommand(mpd_Connection *connection, void mpd_sendPlaylistMoveCommand(mpd_Connection *connection,
char *playlist, int from, int to); char *playlist, int from, int to);
void mpd_sendPlaylistDeleteCommand(mpd_Connection *connection, void mpd_sendPlaylistDeleteCommand(mpd_Connection *connection,
char *playlist, int pos); char *playlist, int pos);
void mpd_sendClearErrorCommand(mpd_Connection * connection); void mpd_sendClearErrorCommand(mpd_Connection * connection);
void mpd_sendGetEventsCommand(mpd_Connection *connection);
char * mpd_getNextEvent(mpd_Connection *connection);
void mpd_sendListPlaylistsCommand(mpd_Connection * connection);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/