libmpd-database.h | libmpd-database.h | |||
---|---|---|---|---|
skipping to change at line 303 | skipping to change at line 303 | |||
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, const char * c_new); | 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 contains the path of the playlist | |||
* @param old_pos integer representing old position | * @param old_pos integer representing old position | |||
* @param new_pos integer representing the position to move old_pos to. | * @param new_pos integer representing the position to move old_pos to. | |||
* | * | |||
* Moves songs in a stored playlists | * Moves songs in a stored playlists | |||
* Needs mpd 0.13.0 | * Needs mpd 0.13.0 | |||
*/ | */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
libmpd-internal.h | libmpd-internal.h | |||
---|---|---|---|---|
skipping to change at line 21 | skipping to change at line 21 | |||
union { | union { | |||
struct { | struct { | |||
int tag_type; | int tag_type; | |||
char *tag; | char *tag; | |||
}; | }; | |||
char *directory; | char *directory; | |||
char *playlist; /*is a path*/ | char *playlist; /*is a path*/ | |||
mpd_Song *song; | mpd_Song *song; | |||
mpd_OutputEntity *output_dev; /* from devices */ | mpd_OutputEntity *output_dev; /* from devices */ | |||
}; | }; | |||
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; | |||
}MpdData_real; | }MpdData_real; | |||
/* queue struct */ | /* queue struct */ | |||
typedef struct _MpdQueue MpdQueue; | typedef struct _MpdQueue MpdQueue; | |||
typedef struct _MpdServerState { | typedef struct _MpdServerState { | |||
/* information needed to detect changes on mpd's side */ | /* information needed to detect changes on mpd's side */ | |||
long long playlistid; | long long playlistid; | |||
long long queueid; | ||||
long long storedplaylistid; | long long storedplaylistid; | |||
int songid; | int songid; | |||
int songpos; | int songpos; | |||
int state; | int state; | |||
unsigned long dbUpdateTime; | unsigned long dbUpdateTime; | |||
int updatingDb; | int updatingDb; | |||
int random; | int random; | |||
int repeat; | int repeat; | |||
int volume; | int volume; | |||
int xfade; | int xfade; | |||
skipping to change at line 113 | skipping to change at line 115 | |||
/* TODO: this is a temporary implementation, I want something nice w ith commands that are and aren't allowed to use. | /* TODO: this is a temporary implementation, I want something nice w ith commands that are and aren't allowed to use. | |||
* so use commands and notcommands functions | * so use commands and notcommands functions | |||
*TODO: Make a callback when a commando isn't allowed, so the client application can actually offer the user to enter password | *TODO: Make a callback when a commando isn't allowed, so the client application can actually offer the user to enter password | |||
*/ | */ | |||
MpdCommand * commands; | MpdCommand * commands; | |||
/** | /** | |||
* tag type for a search | * tag type for a search | |||
*/ | */ | |||
int search_type; | int search_type; | |||
int search_field; | int search_field; | |||
/** | ||||
* For tracking changed outputs. | ||||
* A hack for retarted mpd | ||||
*/ | ||||
int num_outputs; | ||||
int *output_states; | ||||
}_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!!! */ | |||
MPD_QUEUE_MPD_QUEUE_ADD, | ||||
MPD_QUEUE_MPD_QUEUE_REMOVE | ||||
} MpdQueueType; | } MpdQueueType; | |||
typedef struct _MpdQueue { | typedef struct _MpdQueue { | |||
struct _MpdQueue *next; | struct _MpdQueue *next; | |||
struct _MpdQueue *prev; | struct _MpdQueue *prev; | |||
struct _MpdQueue *first; | struct _MpdQueue *first; | |||
/* what item to queue, (add/load/remove)*/ | /* what item to queue, (add/load/remove)*/ | |||
int type; | int type; | |||
/* for adding files/load playlist/adding streams */ | /* for adding files/load playlist/adding streams */ | |||
char *path; | char *path; | |||
/* for removing */ | /* for removing */ | |||
int id; | int id; | |||
}_MpdQueue; | }_MpdQueue; | |||
/* Internal Queue struct functions */ | /* Internal Queue struct functions */ | |||
MpdQueue * mpd_new_queue_struct (); | MpdQueue * mpd_new_queue_struct (); | |||
void mpd_queue_get_next (MpdObj *mi); | void mpd_queue_get_next (MpdObj *mi); | |||
/* Internal Data struct functions */ | /* Internal Data struct functions */ | |||
inline MpdData * mpd_new_data_struct (void); | MpdData * mpd_new_data_struct (void); | |||
inline MpdData * mpd_new_data_struct_append (MpdData * d | MpdData * mpd_new_data_struct_append (MpdData * data); | |||
ata); | MpdData * mpd_data_concatenate (MpdData * const fir | |||
inline MpdData * mpd_data_concatenate (MpdData * c | st, MpdData * const second); | |||
onst first, MpdData * const second); | MpdData * mpd_data_get_next_real (MpdData * const dat | |||
inline MpdData * mpd_data_get_next_real (MpdData * c | a, int kill_list); | |||
onst data, int kill_list); | ||||
/* more internal stuff*/ | /* more internal stuff*/ | |||
/** | /** | |||
* @param mi a #MpdObj | * @param mi a #MpdObj | |||
* | * | |||
* Checks if mpd_stats is availible, and updates when needed. | * Checks if mpd_stats is availible, and updates when needed. | |||
* | * | |||
* @returns a #MpdError | * @returns a #MpdError | |||
*/ | */ | |||
int mpd_stats_check(MpdObj *mi); | int mpd_stats_check(MpdObj *mi); | |||
skipping to change at line 177 | skipping to change at line 185 | |||
int mpd_server_get_allowed_commands(MpdObj *mi); | int mpd_server_get_allowed_commands(MpdObj *mi); | |||
typedef enum _MpdSearchType { | typedef enum _MpdSearchType { | |||
MPD_SEARCH_TYPE_NONE, | MPD_SEARCH_TYPE_NONE, | |||
MPD_SEARCH_TYPE_FIND, | MPD_SEARCH_TYPE_FIND, | |||
MPD_SEARCH_TYPE_SEARCH, | MPD_SEARCH_TYPE_SEARCH, | |||
MPD_SEARCH_TYPE_LIST, | MPD_SEARCH_TYPE_LIST, | |||
MPD_SEARCH_TYPE_PLAYLIST_FIND, | MPD_SEARCH_TYPE_PLAYLIST_FIND, | |||
MPD_SEARCH_TYPE_PLAYLIST_SEARCH, | MPD_SEARCH_TYPE_PLAYLIST_SEARCH, | |||
MPD_SEARCH_TYPE_STATS | MPD_SEARCH_TYPE_STATS | |||
}MpdSearchType; | }MpdSearchType; | |||
int mpd_server_update_outputs(MpdObj *mi); | ||||
#endif | #endif | |||
End of changes. 6 change blocks. | ||||
11 lines changed or deleted | 19 lines changed or added | |||
libmpd-playlist.h | libmpd-playlist.h | |||
---|---|---|---|---|
skipping to change at line 294 | skipping to change at line 294 | |||
/*@}*/ | /*@}*/ | |||
/** \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 | |||
* | ||||
* Lists the playlist queue of mpd | ||||
* | ||||
* @returns a #MpdData list | ||||
*/ | ||||
MpdData *mpd_playlist_get_mpd_queue(MpdObj *mi); | ||||
/** | ||||
* @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 id. | |||
* | * | |||
* @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 pos | |||
* | * | |||
* @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); | |||
/** | ||||
* | ||||
* @param mi a #MpdObj | ||||
* @param id Add the song with id to the queue | ||||
* | ||||
* This only queues the add, use #mpd_playlist_queue_commit to actually com | ||||
mit it. | ||||
* | ||||
* @returns a #MpdError | ||||
*/ | ||||
int mpd_playlist_queue_mpd_queue_add(MpdObj *mi,int id); | ||||
/** | ||||
* @param mi a #MpdObj | ||||
* @param pos the pos of the song to remove | ||||
* | ||||
* This only queues the remove, use #mpd_playlist_queue_commit to actually | ||||
commit it. | ||||
* | ||||
* @returns a #MpdError | ||||
*/ | ||||
int mpd_playlist_queue_mpd_queue_remove(MpdObj *mi,int pos); | ||||
/*@}*/ | /*@}*/ | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
30 lines changed or deleted | 0 lines changed or added | |||
libmpd-version.h | libmpd-version.h | |||
---|---|---|---|---|
#ifndef LIBMPD_VERSION | #ifndef LIBMPD_VERSION | |||
#define LIBMPD_VERSION "0.15.0" | #define LIBMPD_VERSION "0.15.3" | |||
#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 41 | skipping to change at line 41 | |||
#endif | #endif | |||
#ifndef __MPD_LIB__ | #ifndef __MPD_LIB__ | |||
#define __MPD_LIB__ | #define __MPD_LIB__ | |||
#ifdef WIN32 | #ifdef WIN32 | |||
#define __REGEX_IMPORT__ 1 | #define __REGEX_IMPORT__ 1 | |||
#define __W32API_USE_DLLIMPORT__ 1 | #define __W32API_USE_DLLIMPORT__ 1 | |||
#endif | #endif | |||
#include "libmpdclient.h" | #include "libmpdclient.h" | |||
#include <regex.h> | ||||
#ifndef TRUE | #ifndef TRUE | |||
/** Defined for readability: True is 1. */ | /** Defined for readability: True is 1. */ | |||
#define TRUE 1 | #define TRUE 1 | |||
#endif | #endif | |||
#ifndef FALSE | #ifndef FALSE | |||
/** Defined for readability: False is 0. */ | /** Defined for readability: False is 0. */ | |||
#define FALSE 0 | #define FALSE 0 | |||
#endif | #endif | |||
skipping to change at line 154 | skipping to change at line 153 | |||
}; | }; | |||
/** a directory */ | /** a directory */ | |||
char *directory; | char *directory; | |||
/** a path to a playlist */ | /** a path to a playlist */ | |||
char *playlist; | char *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 (*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 | |||
skipping to change at line 350 | skipping to change at line 352 | |||
MPD_CST_AUDIO = 0x0800, | MPD_CST_AUDIO = 0x0800, | |||
/** The state of the player has changed.*/ | /** The state of the player has changed.*/ | |||
MPD_CST_STATE = 0x1000, | MPD_CST_STATE = 0x1000, | |||
/** The permissions the client has, has changed.*/ | /** The permissions the client has, has changed.*/ | |||
MPD_CST_PERMISSION = 0x2000, | MPD_CST_PERMISSION = 0x2000, | |||
/** The bitrate of the playing song has changed. */ | /** The bitrate of the playing song has changed. */ | |||
MPD_CST_BITRATE = 0x4000, | MPD_CST_BITRATE = 0x4000, | |||
/** the audio format of the playing song changed.*/ | /** the audio format of the playing song changed.*/ | |||
MPD_CST_AUDIOFORMAT = 0x8000, | MPD_CST_AUDIOFORMAT = 0x8000, | |||
/** the queue has changed */ | /** the queue has changed */ | |||
MPD_CST_QUEUE = 0x10000, | ||||
/** the queue has changed */ | ||||
MPD_CST_STORED_PLAYLIST = 0x20000, | MPD_CST_STORED_PLAYLIST = 0x20000, | |||
/** server error */ | /** server error */ | |||
MPD_CST_SERVER_ERROR = 0x30000 | MPD_CST_SERVER_ERROR = 0x40000, | |||
/** output changed */ | ||||
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 changed. Look #ChangedSta tusType to see the possible events. | |||
*/ | */ | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 6 lines changed or added | |||
libmpdclient.h | libmpdclient.h | |||
---|---|---|---|---|
skipping to change at line 176 | skipping to change at line 176 | |||
/* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */ | /* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */ | |||
int volume; | int volume; | |||
/* 1 if repeat is on, 0 otherwise */ | /* 1 if repeat is on, 0 otherwise */ | |||
int repeat; | int repeat; | |||
/* 1 if random is on, 0 otherwise */ | /* 1 if random is on, 0 otherwise */ | |||
int random; | int random; | |||
/* playlist length */ | /* playlist length */ | |||
int playlistLength; | int playlistLength; | |||
/* playlist, use this to determine when the playlist has changed */ | /* playlist, use this to determine when the playlist has changed */ | |||
long long playlist; | long long playlist; | |||
/* playlistqueue, use this to determine when the queue has changed * | ||||
/ | ||||
long long playlistqueue; | ||||
/* The id, used to determine is one of the playlists are changed */ | /* The id, used to determine is one of the playlists are changed */ | |||
long long storedplaylist; | long long storedplaylist; | |||
/* use with MPD_STATUS_STATE_* to determine state of player */ | /* use with MPD_STATUS_STATE_* to determine state of player */ | |||
int state; | int state; | |||
/* crossfade setting in seconds */ | /* crossfade setting in seconds */ | |||
int crossfade; | int crossfade; | |||
/* if a song is currently selected (always the case when state is | /* if a song is currently selected (always the case when state is | |||
* PLAY or PAUSE), this is the position of the currently | * PLAY or PAUSE), this is the position of the currently | |||
* playing song in the playlist, beginning with 0 | * playing song in the playlist, beginning with 0 | |||
*/ | */ | |||
skipping to change at line 671 | skipping to change at line 669 | |||
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); | |||
/* | ||||
* List the content of the queue | ||||
*/ | ||||
void mpd_sendQueueInfoCommand(mpd_Connection * connection); | ||||
/* | ||||
* Dequeue a song from the queue | ||||
* SongPos is the position in the queue | ||||
*/ | ||||
void mpd_sendDequeueCommand(mpd_Connection * connection, int songPos); | ||||
/* | ||||
* Queue a song from the playlist | ||||
* Id is the songid of the song to queue | ||||
*/ | ||||
void mpd_sendQueueIdCommand(mpd_Connection * connection, int songId); | ||||
void mpd_sendClearErrorCommand(mpd_Connection * connection); | void mpd_sendClearErrorCommand(mpd_Connection * connection); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
19 lines changed or deleted | 0 lines changed or added | |||