# HG changeset patch # User kiyoshi # Date 1165841169 28800 # Node ID b89947411061af681541cfd3fc7e226a5eadae95 # Parent ef095eb43578618704601c5b080db26d05114678 [svn] Make controlsocket.c happier. Still a ton of warnings, but it compiles now. diff -r ef095eb43578 -r b89947411061 ChangeLog --- a/ChangeLog Mon Dec 11 04:36:50 2006 -0800 +++ b/ChangeLog Mon Dec 11 04:46:09 2006 -0800 @@ -1,3 +1,10 @@ +2006-12-11 12:36:50 +0000 Tony Vroon + revision [3183] + Add playlist_get_active where required. + trunk/audacious/output.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + + 2006-12-11 12:34:17 +0000 William Pitcock revision [3181] - update main.c to new API diff -r ef095eb43578 -r b89947411061 audacious/controlsocket.c --- a/audacious/controlsocket.c Mon Dec 11 04:36:50 2006 -0800 +++ b/audacious/controlsocket.c Mon Dec 11 04:46:09 2006 -0800 @@ -373,28 +373,27 @@ ctrl_ack_packet(pkt); break; case CMD_GET_PLAYLIST_POS: - ctrl_write_gint(pkt->fd, playlist_get_position()); + ctrl_write_gint(pkt->fd, playlist_get_position(playlist_get_active())); ctrl_ack_packet(pkt); break; case CMD_GET_PLAYLIST_LENGTH: - ctrl_write_gint(pkt->fd, playlist_get_length()); + ctrl_write_gint(pkt->fd, playlist_get_length(playlist_get_active())); ctrl_ack_packet(pkt); break; case CMD_GET_PLAYQUEUE_LENGTH: - ctrl_write_gint(pkt->fd, playlist_queue_get_length()); + ctrl_write_gint(pkt->fd, playlist_queue_get_length(playlist_get_active())); ctrl_ack_packet(pkt); break; case CMD_PLAYQUEUE_IS_QUEUED: ctrl_write_gboolean(pkt->fd, - playlist_is_position_queued(*((guint32 *) pkt->data))); + playlist_is_position_queued(* ((guint32 *) pkt->data), playlist_get_active())); ctrl_ack_packet(pkt); break; case CMD_PLAYQUEUE_GET_POS: if (pkt->data) ctrl_write_gint(pkt->fd, - playlist_get_queue_position_number(* - ((guint32 *) pkt-> - data))); + playlist_get_queue_position_number(* ((guint32 *) pkt->data), + playlist_get_active())); else ctrl_write_gint(pkt->fd, 0); @@ -403,9 +402,8 @@ case CMD_PLAYQUEUE_GET_QPOS: if (pkt->data) ctrl_write_gint(pkt->fd, - playlist_get_queue_qposition_number(* - ((guint32 *) pkt-> - data))); + playlist_get_queue_qposition_number(* ((guint32 *) pkt->data), + playlist_get_active())); else ctrl_write_gint(pkt->fd, 0); @@ -443,7 +441,7 @@ case CMD_GET_PLAYLIST_FILE: if (pkt->data) { gchar *filename; - filename = playlist_get_filename(*((guint32 *) pkt->data)); + filename = playlist_get_filename(*((guint32 *) pkt->data), playlist_get_active()); ctrl_write_string(pkt->fd, filename); g_free(filename); } @@ -454,7 +452,7 @@ case CMD_GET_PLAYLIST_TITLE: if (pkt->data) { gchar *title; - title = playlist_get_songtitle(*((guint32 *) pkt->data)); + title = playlist_get_songtitle(*((guint32 *) pkt->data), playlist_get_active()); ctrl_write_string(pkt->fd, title); g_free(title); } @@ -465,9 +463,8 @@ case CMD_GET_PLAYLIST_TIME: if (pkt->data) ctrl_write_gint(pkt->fd, - playlist_get_songtime(* - ((guint32 *) pkt-> - data))); + playlist_get_songtime(*((guint32 *) pkt->data), + playlist_get_active())); else ctrl_write_gint(pkt->fd, -1); @@ -497,7 +494,7 @@ memcpy(filename, dataptr, len); GDK_THREADS_ENTER(); - playlist_add_url(filename); + playlist_add_url(filename, playlist_get_active()); GDK_THREADS_LEAVE(); g_free(filename); @@ -508,7 +505,7 @@ break; case CMD_PLAYLIST_ADD_URL_STRING: GDK_THREADS_ENTER(); - playlist_add_url(pkt->data); + playlist_add_url(pkt->data, playlist_get_active()); GDK_THREADS_LEAVE(); ctrl_ack_packet(pkt); @@ -518,19 +515,19 @@ gint pos = *(gint *) pkt->data; gchar *ptr = pkt->data; ptr += sizeof(gint); - playlist_ins_url(ptr, pos); + playlist_ins_url(ptr, pos, playlist_get_active()); } ctrl_ack_packet(pkt); break; case CMD_PLAYLIST_DELETE: GDK_THREADS_ENTER(); - playlist_delete_index(*((guint32 *) pkt->data)); + playlist_delete_index(*((guint32 *) pkt->data), playlist_get_active()); GDK_THREADS_LEAVE(); ctrl_ack_packet(pkt); break; case CMD_PLAYLIST_CLEAR: GDK_THREADS_ENTER(); - playlist_clear(); + playlist_clear(playlist_get_active()); mainwin_clear_song_info(); mainwin_set_info_text(); GDK_THREADS_LEAVE(); @@ -611,7 +608,7 @@ case CMD_PLAY: if (bmp_playback_get_paused()) bmp_playback_pause(); - else if (playlist_get_length()) + else if (playlist_get_length(playlist_get_active())) bmp_playback_initiate(); else mainwin_eject_pushed(); @@ -633,26 +630,26 @@ break; case CMD_PLAYQUEUE_ADD: num = *((guint32 *) data); - if (num < (guint)playlist_get_length()) - playlist_queue_position(num); + if (num < (guint)playlist_get_length(playlist_get_active())) + playlist_queue_position(num, playlist_get_active()); break; case CMD_PLAYQUEUE_REMOVE: num = *((guint32 *) data); - if (num < (guint)playlist_get_length()) - playlist_queue_remove(num); + if (num < (guint)playlist_get_length(playlist_get_active())) + playlist_queue_remove(num, playlist_get_active()); break; case CMD_PLAYQUEUE_CLEAR: - playlist_clear_queue(); + playlist_clear_queue(playlist_get_active()); break; case CMD_SET_PLAYLIST_POS: num = *((guint32 *) data); - if (num < (guint)playlist_get_length()) - playlist_set_position(num); + if (num < (guint)playlist_get_length(playlist_get_active())) + playlist_set_position(num, playlist_get_active()); break; case CMD_JUMP_TO_TIME: num = *((guint32 *) data); - if (playlist_get_current_length() > 0 && - num < (guint)playlist_get_current_length()) + if (playlist_get_current_length(playlist_get_active()) > 0 && + num < (guint)playlist_get_current_length(playlist_get_active())) bmp_playback_seek(num / 1000); break; case CMD_SET_VOLUME: @@ -707,10 +704,10 @@ mainwin_eject_pushed(); break; case CMD_PLAYLIST_PREV: - playlist_prev(); + playlist_prev(playlist_get_active()); break; case CMD_PLAYLIST_NEXT: - playlist_next(); + playlist_next(playlist_get_active()); break; case CMD_TOGGLE_REPEAT: mainwin_repeat_pushed(!cfg.repeat); diff -r ef095eb43578 -r b89947411061 doc/libaudacious/libaudacious-decl-list.txt --- a/doc/libaudacious/libaudacious-decl-list.txt Mon Dec 11 04:36:50 2006 -0800 +++ b/doc/libaudacious/libaudacious-decl-list.txt Mon Dec 11 04:46:09 2006 -0800 @@ -1,8 +1,3 @@ -
-dirbrowser -xmms_create_dir_browser -
-
vfs VFSFile @@ -26,6 +21,83 @@
+configdb +ConfigDb +bmp_cfg_db_open +bmp_cfg_db_close +bmp_cfg_db_get_string +bmp_cfg_db_get_int +bmp_cfg_db_get_bool +bmp_cfg_db_get_float +bmp_cfg_db_get_double +bmp_cfg_db_set_string +bmp_cfg_db_set_int +bmp_cfg_db_set_bool +bmp_cfg_db_set_float +bmp_cfg_db_set_double +bmp_cfg_db_unset_key +
+ +
+rcfile +RcLine +RcSection +RcFile +bmp_rcfile_new +bmp_rcfile_free +bmp_rcfile_open +bmp_rcfile_write +bmp_rcfile_read_string +bmp_rcfile_read_int +bmp_rcfile_read_bool +bmp_rcfile_read_float +bmp_rcfile_read_double +bmp_rcfile_write_string +bmp_rcfile_write_int +bmp_rcfile_write_boolean +bmp_rcfile_write_float +bmp_rcfile_write_double +bmp_rcfile_remove_key +
+ +
+formatter +Formatter +xmms_formatter_new +xmms_formatter_destroy +xmms_formatter_associate +xmms_formatter_dissociate +xmms_formatter_format +
+ +
+titlestring +TitleInput +BmpTitleInput +XMMS_TITLEINPUT_SIZE +XMMS_TITLEINPUT_VERSION +XMMS_NEW_TITLEINPUT +bmp_title_input_new +bmp_title_input_free +xmms_get_titlestring +xmms_titlestring_descriptions +
+ +
+xconvert +xmms_convert_buffers +
+ +
+dirbrowser +xmms_create_dir_browser +
+ +
+util +
+ +
beepctrl xmms_connect_to_session xmms_remote_playlist @@ -100,74 +172,15 @@
-formatter -Formatter -xmms_formatter_new -xmms_formatter_destroy -xmms_formatter_associate -xmms_formatter_dissociate -xmms_formatter_format -
- -
-rcfile -RcLine -RcSection -RcFile -bmp_rcfile_new -bmp_rcfile_free -bmp_rcfile_open -bmp_rcfile_write -bmp_rcfile_read_string -bmp_rcfile_read_int -bmp_rcfile_read_bool -bmp_rcfile_read_float -bmp_rcfile_read_double -bmp_rcfile_write_string -bmp_rcfile_write_int -bmp_rcfile_write_boolean -bmp_rcfile_write_float -bmp_rcfile_write_double -bmp_rcfile_remove_key +urldecode +xmms_urldecode_path +xmms_urldecode_plain
-titlestring -TitleInput -BmpTitleInput -XMMS_TITLEINPUT_SIZE -XMMS_TITLEINPUT_VERSION -XMMS_NEW_TITLEINPUT -bmp_title_input_new -bmp_title_input_free -xmms_get_titlestring -xmms_titlestring_descriptions -
- -
-xconvert -xmms_convert_buffers +vfs_buffer +VFSBuffer +vfs_buffer_new +vfs_buffer_new_from_string
-
-configdb -ConfigDb -bmp_cfg_db_open -bmp_cfg_db_close -bmp_cfg_db_get_string -bmp_cfg_db_get_int -bmp_cfg_db_get_bool -bmp_cfg_db_get_float -bmp_cfg_db_get_double -bmp_cfg_db_set_string -bmp_cfg_db_set_int -bmp_cfg_db_set_bool -bmp_cfg_db_set_float -bmp_cfg_db_set_double -bmp_cfg_db_unset_key -
- -
-util -
- diff -r ef095eb43578 -r b89947411061 doc/libaudacious/libaudacious-decl.txt --- a/doc/libaudacious/libaudacious-decl.txt Mon Dec 11 04:36:50 2006 -0800 +++ b/doc/libaudacious/libaudacious-decl.txt Mon Dec 11 04:46:09 2006 -0800 @@ -1,8 +1,3 @@ - -xmms_create_dir_browser -GtkWidget * -gchar * title, gchar * current_path,GtkSelectionMode mode,void (*handler) (gchar *) - VFSFile @@ -117,6 +112,267 @@ gboolean VFSConstructor *vtable + +ConfigDb + + +bmp_cfg_db_open +ConfigDb * + + + +bmp_cfg_db_close +void +ConfigDb *db + + +bmp_cfg_db_get_string +gboolean +ConfigDb *db,const gchar *section,const gchar *key,gchar **value + + +bmp_cfg_db_get_int +gboolean +ConfigDb *db,const gchar *section,const gchar *key,gint *value + + +bmp_cfg_db_get_bool +gboolean +ConfigDb *db,const gchar *section,const gchar *key,gboolean *value + + +bmp_cfg_db_get_float +gboolean +ConfigDb *db,const gchar *section,const gchar *key,gfloat *value + + +bmp_cfg_db_get_double +gboolean +ConfigDb *db,const gchar *section,const gchar *key,gdouble *value + + +bmp_cfg_db_set_string +void +ConfigDb *db,const gchar *section,const gchar *key,gchar *value + + +bmp_cfg_db_set_int +void +ConfigDb *db,const gchar *section,const gchar *key,gint value + + +bmp_cfg_db_set_bool +void +ConfigDb *db,const gchar *section,const gchar *key,gboolean value + + +bmp_cfg_db_set_float +void +ConfigDb *db,const gchar *section,const gchar *key,gfloat value + + +bmp_cfg_db_set_double +void +ConfigDb *db,const gchar *section,const gchar *key,gdouble value + + +bmp_cfg_db_unset_key +void +ConfigDb *db,const gchar *section,const gchar *key + + +RcLine +typedef struct { + gchar *key; + gchar *value; +} RcLine; + + +RcSection +typedef struct { + gchar *name; + GList *lines; +} RcSection; + + +RcFile +typedef struct { + GList *sections; +} RcFile; + + +bmp_rcfile_new +RcFile * +void + + +bmp_rcfile_free +void +RcFile * file + + +bmp_rcfile_open +RcFile * +const gchar * filename + + +bmp_rcfile_write +gboolean +RcFile * file, const gchar * filename + + +bmp_rcfile_read_string +gboolean +RcFile * file, const gchar * section,const gchar * key, gchar ** value + + +bmp_rcfile_read_int +gboolean +RcFile * file, const gchar * section,const gchar * key, gint * value + + +bmp_rcfile_read_bool +gboolean +RcFile * file, const gchar * section,const gchar * key, gboolean * value + + +bmp_rcfile_read_float +gboolean +RcFile * file, const gchar * section,const gchar * key, gfloat * value + + +bmp_rcfile_read_double +gboolean +RcFile * file, const gchar * section,const gchar * key, gdouble * value + + +bmp_rcfile_write_string +void +RcFile * file, const gchar * section,const gchar * key, const gchar * value + + +bmp_rcfile_write_int +void +RcFile * file, const gchar * section,const gchar * key, gint value + + +bmp_rcfile_write_boolean +void +RcFile * file, const gchar * section,const gchar * key, gboolean value + + +bmp_rcfile_write_float +void +RcFile * file, const gchar * section,const gchar * key, gfloat value + + +bmp_rcfile_write_double +void +RcFile * file, const gchar * section,const gchar * key, gdouble value + + +bmp_rcfile_remove_key +void +RcFile * file, const gchar * section,const gchar * key + + +Formatter +typedef struct { + gchar *values[256]; +} Formatter; + + +xmms_formatter_new +Formatter * +void + + +xmms_formatter_destroy +void +Formatter * formatter + + +xmms_formatter_associate +void +Formatter * formatter, guchar id,gchar * value + + +xmms_formatter_dissociate +void +Formatter * formatter, guchar id + + +xmms_formatter_format +gchar * +Formatter * formatter, gchar * format + + +TitleInput +typedef struct { + gint __size; /* Set by bmp_title_input_new() */ + gint __version; /* Ditto */ + + gchar *performer; /* %p */ + gchar *album_name; /* %a */ + gchar *track_name; /* %t */ + gint track_number; /* %n */ + gint year; /* %y */ + gchar *date; /* %d */ + gchar *genre; /* %g */ + gchar *comment; /* %c */ + gchar *file_name; /* %f */ + const gchar *file_ext; /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */ + gchar *file_path; /* %F */ + gint length; /* not displayable */ + gchar *formatter; /* not displayable */ + time_t mtime; +} TitleInput; + + +BmpTitleInput +typedef TitleInput BmpTitleInput; + + +XMMS_TITLEINPUT_SIZE +#define XMMS_TITLEINPUT_SIZE sizeof(TitleInput) + + +XMMS_TITLEINPUT_VERSION +#define XMMS_TITLEINPUT_VERSION (1) + + +XMMS_NEW_TITLEINPUT +#define XMMS_NEW_TITLEINPUT(input) input = bmp_title_input_new(); + + +bmp_title_input_new +TitleInput * +void + + +bmp_title_input_free +void +BmpTitleInput * input + + +xmms_get_titlestring +gchar * +const gchar * fmt, TitleInput * input + + +xmms_titlestring_descriptions +GtkWidget * +gchar * tags, gint columns + + +xmms_convert_buffers +struct xmms_convert_buffers; + + +xmms_create_dir_browser +GtkWidget * +gchar * title, gchar * current_path,GtkSelectionMode mode,void (*handler) (gchar *) + xmms_connect_to_session gint @@ -467,259 +723,32 @@ #define xmms_remote_add_files(session,list) \ xmms_remote_playlist_add(session,list) - -Formatter -typedef struct { - gchar *values[256]; -} Formatter; - -xmms_formatter_new -Formatter * -void - - -xmms_formatter_destroy -void -Formatter * formatter - - -xmms_formatter_associate -void -Formatter * formatter, guchar id,gchar * value - - -xmms_formatter_dissociate -void -Formatter * formatter, guchar id - - -xmms_formatter_format +xmms_urldecode_path gchar * -Formatter * formatter, gchar * format - - -RcLine -typedef struct { - gchar *key; - gchar *value; -} RcLine; - - -RcSection -typedef struct { - gchar *name; - GList *lines; -} RcSection; - - -RcFile -typedef struct { - GList *sections; -} RcFile; - - -bmp_rcfile_new -RcFile * -void - - -bmp_rcfile_free -void -RcFile * file +const gchar * -bmp_rcfile_open -RcFile * -const gchar * filename - - -bmp_rcfile_write -gboolean -RcFile * file, const gchar * filename - - -bmp_rcfile_read_string -gboolean -RcFile * file, const gchar * section,const gchar * key, gchar ** value - - -bmp_rcfile_read_int -gboolean -RcFile * file, const gchar * section,const gchar * key, gint * value - - -bmp_rcfile_read_bool -gboolean -RcFile * file, const gchar * section,const gchar * key, gboolean * value - - -bmp_rcfile_read_float -gboolean -RcFile * file, const gchar * section,const gchar * key, gfloat * value - - -bmp_rcfile_read_double -gboolean -RcFile * file, const gchar * section,const gchar * key, gdouble * value - - -bmp_rcfile_write_string -void -RcFile * file, const gchar * section,const gchar * key, const gchar * value - - -bmp_rcfile_write_int -void -RcFile * file, const gchar * section,const gchar * key, gint value - - -bmp_rcfile_write_boolean -void -RcFile * file, const gchar * section,const gchar * key, gboolean value - - -bmp_rcfile_write_float -void -RcFile * file, const gchar * section,const gchar * key, gfloat value - - -bmp_rcfile_write_double -void -RcFile * file, const gchar * section,const gchar * key, gdouble value - - -bmp_rcfile_remove_key -void -RcFile * file, const gchar * section,const gchar * key +xmms_urldecode_plain +gchar * +const gchar * -TitleInput +VFSBuffer typedef struct { - gint __size; /* Set by bmp_title_input_new() */ - gint __version; /* Ditto */ - - gchar *performer; /* %p */ - gchar *album_name; /* %a */ - gchar *track_name; /* %t */ - gint track_number; /* %n */ - gint year; /* %y */ - gchar *date; /* %d */ - gchar *genre; /* %g */ - gchar *comment; /* %c */ - gchar *file_name; /* %f */ - const gchar *file_ext; /* %e *//* is not always strdup'ed, see xmms_input_get_song_info and plugins! */ - gchar *file_path; /* %F */ - gint length; /* not displayable */ - gchar *formatter; /* not displayable */ - time_t mtime; -} TitleInput; - - -BmpTitleInput -typedef TitleInput BmpTitleInput; - - -XMMS_TITLEINPUT_SIZE -#define XMMS_TITLEINPUT_SIZE sizeof(TitleInput) - - -XMMS_TITLEINPUT_VERSION -#define XMMS_TITLEINPUT_VERSION (1) - - -XMMS_NEW_TITLEINPUT -#define XMMS_NEW_TITLEINPUT(input) input = bmp_title_input_new(); - - -bmp_title_input_new -TitleInput * -void - - -bmp_title_input_free -void -BmpTitleInput * input - - -xmms_get_titlestring -gchar * -const gchar * fmt, TitleInput * input - - -xmms_titlestring_descriptions -GtkWidget * -gchar * tags, gint columns - - -xmms_convert_buffers -struct xmms_convert_buffers; - - -ConfigDb + guchar *data; + guchar *iter; + guchar *end; + gsize size; +} VFSBuffer; -bmp_cfg_db_open -ConfigDb * - - - -bmp_cfg_db_close -void -ConfigDb *db - - -bmp_cfg_db_get_string -gboolean -ConfigDb *db,const gchar *section,const gchar *key,gchar **value - - -bmp_cfg_db_get_int -gboolean -ConfigDb *db,const gchar *section,const gchar *key,gint *value - - -bmp_cfg_db_get_bool -gboolean -ConfigDb *db,const gchar *section,const gchar *key,gboolean *value - - -bmp_cfg_db_get_float -gboolean -ConfigDb *db,const gchar *section,const gchar *key,gfloat *value +vfs_buffer_new +VFSFile * +gpointer data, gsize size -bmp_cfg_db_get_double -gboolean -ConfigDb *db,const gchar *section,const gchar *key,gdouble *value - - -bmp_cfg_db_set_string -void -ConfigDb *db,const gchar *section,const gchar *key,gchar *value - - -bmp_cfg_db_set_int -void -ConfigDb *db,const gchar *section,const gchar *key,gint value +vfs_buffer_new_from_string +VFSFile * +gchar *str - -bmp_cfg_db_set_bool -void -ConfigDb *db,const gchar *section,const gchar *key,gboolean value - - -bmp_cfg_db_set_float -void -ConfigDb *db,const gchar *section,const gchar *key,gfloat value - - -bmp_cfg_db_set_double -void -ConfigDb *db,const gchar *section,const gchar *key,gdouble value - - -bmp_cfg_db_unset_key -void -ConfigDb *db,const gchar *section,const gchar *key - diff -r ef095eb43578 -r b89947411061 doc/libaudacious/libaudacious-unused.txt --- a/doc/libaudacious/libaudacious-unused.txt Mon Dec 11 04:36:50 2006 -0800 +++ b/doc/libaudacious/libaudacious-unused.txt Mon Dec 11 04:46:09 2006 -0800 @@ -0,0 +1,5 @@ +VFSBuffer +vfs_buffer_new +vfs_buffer_new_from_string +xmms_urldecode_path +xmms_urldecode_plain