From: Daniel Caujolle-B. <f1...@us...> - 2003-01-24 13:22:42
|
Update of /cvsroot/xine/xine-ui/src/xitk In directory sc8-pr-cvs1:/tmp/cvs-serv20884 Modified Files: Makefile.am common.h main.c playlist.c playlist.h Added Files: session.c session.h Removed Files: ctrlsock.c ctrlsock.h Log Message: final session management implementation. More features can be added. I will update the man pages (en/fr) soon. --- NEW FILE: session.c --- /* * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a unix video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * $Id: session.c,v 1.1 2003/01/24 13:22:39 f1rmb Exp $ * */ /* Largely inspired of xmms control socket stuff */ /* required for getsubopt(); the __sun test gives us strncasecmp() on solaris */ #ifndef __sun #define _XOPEN_SOURCE 500 #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <strings.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> #include <sys/un.h> #include <errno.h> #include "common.h" extern gGui_t *gGui; #define CTRL_PROTO_VERSION 0x1 typedef struct { uint16_t version; /* client/server version */ ctrl_commands_t command; /* ctrl_commands_t */ uint32_t data_length; /* data */ } ctrl_header_packet_t; typedef struct { ctrl_header_packet_t hdr; int fd; void *data; } serv_header_packet_t; static int ctrl_fd, session_id; static int going; static pthread_t thread_server; static char *socket_name; static void send_packet(int fd, ctrl_commands_t command, void *data, uint32_t data_length); static int connect_to_session(int session) { int fd; if((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { struct sockaddr_un saddr; uid_t stored_uid, euid; saddr.sun_family = AF_UNIX; stored_uid = getuid(); euid = geteuid(); setuid(euid); snprintf(saddr.sun_path, 108, "%s/.xine/session.%d", (xine_get_homedir()), session); setreuid(stored_uid, euid); if((connect(fd,(struct sockaddr *) &saddr, sizeof(saddr))) != -1) return fd; } close(fd); return -1; } static void *read_packet(int fd, ctrl_header_packet_t *hdr) { void *data = NULL; if((read(fd, hdr, sizeof(ctrl_header_packet_t))) == sizeof(ctrl_header_packet_t)) { if(hdr->data_length) { data = xine_xmalloc(hdr->data_length); read(fd, data, hdr->data_length); } } return data; } static void read_ack(int fd) { ctrl_header_packet_t hdr; void *data; data = read_packet(fd, &hdr); SAFE_FREE(data); } static void _send_packet(int fd, void *data, ctrl_header_packet_t *hdr) { write(fd, hdr, sizeof(ctrl_header_packet_t)); if(hdr->data_length && data) write(fd, data, hdr->data_length); } static void send_packet(int fd, ctrl_commands_t command, void *data, uint32_t data_length) { ctrl_header_packet_t hdr; hdr.version = CTRL_PROTO_VERSION; hdr.command = command; hdr.data_length = data_length; _send_packet(fd, data, &hdr); } static void ssend_packet(int fd, void *data, uint32_t data_length) { ctrl_header_packet_t hdr; hdr.version = CTRL_PROTO_VERSION; hdr.command = 0; hdr.data_length = data_length; _send_packet(fd, data, &hdr); } static void send_ack(serv_header_packet_t *shdr) { ssend_packet(shdr->fd, NULL, 0); close(shdr->fd); } void send_uint32(int session, ctrl_commands_t command, uint32_t value) { int fd; if((fd = connect_to_session(session)) == -1) return; send_packet(fd, command, &value, sizeof(uint32_t)); read_ack(fd); close(fd); } uint32_t get_uint32(int session, ctrl_commands_t command) { ctrl_header_packet_t hdr; void *data; int fd, ret = 0; if((fd = connect_to_session(session)) == -1) return ret; send_packet(fd, command, NULL, 0); data = read_packet(fd, &hdr); if(data) { ret = *((uint32_t *) data); free(data); } read_ack(fd); close(fd); return ret; } void send_boolean(int session, ctrl_commands_t command, uint8_t value) { int fd; uint8_t bvalue = (value > 0) ? 1 : 0; if((fd = connect_to_session(session)) == -1) return; send_packet(fd, command, &bvalue, sizeof(uint8_t)); read_ack(fd); close(fd); } uint8_t get_boolean(int session, ctrl_commands_t command) { ctrl_header_packet_t hdr; uint8_t ret = 0; void *data; int fd; if((fd = connect_to_session(session)) == -1) return ret; send_packet(fd, command, NULL, 0); data = read_packet(fd, &hdr); if(data) { ret = *((uint8_t *) data); free(data); } read_ack(fd); close(fd); return ret; } void send_string(int session, ctrl_commands_t command, char *string) { int fd; if((fd = connect_to_session(session)) == -1) return; send_packet(fd, command, string, string ? strlen(string) + 1 : 0); read_ack(fd); close(fd); } char *get_string(int session, ctrl_commands_t command) { ctrl_header_packet_t hdr; char *data = NULL; int fd; if((fd = connect_to_session(session)) == -1) return data; send_packet(fd, command, NULL, 0); data = (char *)read_packet(fd, &hdr); read_ack(fd); close(fd); return data; } static int remote_cmd(int session, ctrl_commands_t command) { int fd; if((fd = connect_to_session(session)) == -1) return 0; send_packet(fd, command, NULL, 0); read_ack(fd); close(fd); return 1; } int is_remote_running(int session) { return remote_cmd(session, CMD_PING); } #ifndef CTRL_TEST void *ctrlsocket_func(void *data) { fd_set set; struct timeval tv; struct sockaddr_un saddr; serv_header_packet_t *shdr; int len, fd; while(!going) xine_usec_sleep(10000); while(going) { FD_ZERO(&set); FD_SET(ctrl_fd, &set); tv.tv_sec = 0; tv.tv_usec = 100000; len = sizeof(saddr); if(((select(ctrl_fd + 1, &set, NULL, NULL, &tv)) <= 0) || ((fd = accept(ctrl_fd, (struct sockaddr *) &saddr, &len)) == -1)) continue; shdr = (serv_header_packet_t *) xine_xmalloc((sizeof(serv_header_packet_t))); (void) read(fd, &(shdr->hdr), sizeof(ctrl_header_packet_t)); if(shdr->hdr.data_length) { shdr->data = xine_xmalloc(shdr->hdr.data_length); read(fd, shdr->data, shdr->hdr.data_length); } shdr->fd = fd; switch(shdr->hdr.command) { case CMD_PLAY: gui_play(NULL, NULL); send_ack(shdr); break; case CMD_SLOW_2: xine_set_param(gGui->stream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_2); send_ack(shdr); break; case CMD_SLOW_4: xine_set_param(gGui->stream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_4); send_ack(shdr); break; case CMD_PAUSE: xine_set_param(gGui->stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE); send_ack(shdr); break; case CMD_FAST_2: xine_set_param(gGui->stream, XINE_PARAM_SPEED, XINE_SPEED_FAST_2); send_ack(shdr); break; case CMD_FAST_4: xine_set_param(gGui->stream, XINE_PARAM_SPEED, XINE_SPEED_FAST_4); send_ack(shdr); break; case CMD_STOP: gui_stop(NULL, NULL); send_ack(shdr); break; case CMD_QUIT: gui_exit(NULL, NULL); send_ack(shdr); break; case CMD_FULLSCREEN: gui_set_fullscreen_mode(NULL, NULL); send_ack(shdr); break; case CMD_EJECT: gui_eject(NULL, NULL); send_ack(shdr); break; case CMD_AUDIO_NEXT: gui_change_audio_channel(NULL, (void *) GUI_NEXT); send_ack(shdr); break; case CMD_AUDIO_PREV: gui_change_audio_channel(NULL, (void *) GUI_PREV); send_ack(shdr); break; case CMD_SPU_NEXT: gui_change_spu_channel(NULL, (void *) GUI_NEXT); send_ack(shdr); break; case CMD_SPU_PREV: gui_change_spu_channel(NULL, (void *) GUI_PREV); send_ack(shdr); break; case CMD_PLAYLIST_FLUSH: playlist_delete_all(NULL, NULL); send_ack(shdr); break; case CMD_PLAYLIST_ADD: gui_dndcallback((char *)shdr->data); send_ack(shdr); break; case CMD_PLAYLIST_NEXT: gui_direct_nextprev(NULL, (void *) GUI_NEXT, 1); send_ack(shdr); break; case CMD_PLAYLIST_PREV: gui_direct_nextprev(NULL, (void *) GUI_PREV, 1); send_ack(shdr); break; case CMD_PLAYLIST_LOAD: printf("load: '%s'\n", (char *)shdr->data); mediamark_load_mediamarks((const char *)shdr->data); gui_set_current_mrl((mediamark_t *)mediamark_get_current_mmk()); if((!is_playback_widgets_enabled()) && gGui->playlist.num) enable_playback_controls(1); send_ack(shdr); break; case CMD_GET_VERSION: send_packet(shdr->fd, CMD_GET_VERSION, VERSION, strlen(VERSION)); send_ack(shdr); break; case CMD_PING: send_ack(shdr); break; } SAFE_FREE(shdr->data); SAFE_FREE(shdr); } pthread_exit(NULL); } int setup_ctrlsocket(void) { struct sockaddr_un saddr; int retval = 0; int i; if((ctrl_fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { for(i = 0;; i++) { saddr.sun_family = AF_UNIX; snprintf(saddr.sun_path, 108, "%s/.xine/session.%d", (xine_get_homedir()), i); if(!is_remote_running(i)) { if((unlink(saddr.sun_path) == -1) && errno != ENOENT) { printf("setup_ctrlsocket(): Failed to unlink %s (Error: %s)", saddr.sun_path, strerror(errno)); } } if((bind(ctrl_fd, (struct sockaddr *) &saddr, sizeof (saddr))) != -1) { session_id = i; listen(ctrl_fd, 100); going = 1; pthread_create(&thread_server, NULL, ctrlsocket_func, NULL); socket_name = strdup(saddr.sun_path); retval = 1; break; } else { printf("setup_ctrlsocket(): Failed to assign %s to a socket (Error: %s)", saddr.sun_path, strerror(errno)); break; } } } else printf("setup_ctrlsocket(): Failed to open socket: %s", strerror(errno)); if(!retval) { if(ctrl_fd != -1) close(ctrl_fd); ctrl_fd = 0; } return retval; } void session_handle_subopt(char *suboptarg, int *session) { char *sopts = suboptarg; int optsess = -1; int playlist_clear, playlist_next, playlist_prev = 0; int audio_next, audio_prev, spu_next, spu_prev; char *playlist_load = NULL; int fullscreen, s, c; uint32_t state; char *optstr; char **mrls = NULL; int num_mrls = 0; const char *tokens[] = { /* Don't change order */ "play", "slow2", "slow4", "pause", "fast2", "fast4", "stop", "quit", "fullscreen", "eject", "audio", "spu", "session", "mrl", "playlist", "pl", NULL }; playlist_clear = playlist_next = playlist_prev = fullscreen = 0; audio_next = audio_prev = spu_next = spu_prev = 0; state = 0; while((c = getsubopt(&sopts, (char *const *)tokens, &optstr)) != -1) { switch(c) { /* play -> eject */ case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: state |= 0x80000000 >> c; break; /* audio */ case 10: if(!strcasecmp(optstr, "next")) audio_next++; else if(!strcasecmp(optstr, "prev")) audio_prev++; break; /* spu */ case 11: if(!strcasecmp(optstr, "next")) spu_next++; else if(!strcasecmp(optstr, "prev")) spu_prev++; break; /* session */ case 12: if((atoi(optstr)) >= 0) optsess = atoi(optstr); break; /* mrl */ case 13: if(num_mrls == 0) mrls = (char **) xine_xmalloc(sizeof(char *) * 2); else mrls = (char **) realloc(mrls, sizeof(char *) * (num_mrls + 2)); mrls[num_mrls++] = strdup(optstr); mrls[num_mrls] = NULL; break; /* playlist */ case 14: case 15: if(!strcasecmp(optstr, "clear")) playlist_clear = 1; else if(!strcasecmp(optstr, "next")) playlist_next++; else if(!strcasecmp(optstr, "prev")) playlist_prev++; else if(!strncasecmp(optstr, "load:", 5)) playlist_load = strdup(optstr + 5); break; } } *session = (optsess >= 0) ? optsess : 0; if(is_remote_running(*session)) { if((state << (CMD_QUIT - 1)) & 0x80000000) remote_cmd(*session, CMD_QUIT); if(playlist_clear) remote_cmd(*session, CMD_PLAYLIST_FLUSH); if(playlist_load) { send_string(*session, CMD_PLAYLIST_LOAD, playlist_load); free(playlist_load); } while(playlist_next) { remote_cmd(*session, CMD_PLAYLIST_NEXT); playlist_next--; } while(playlist_prev) { remote_cmd(*session, CMD_PLAYLIST_PREV); playlist_prev--; } if(num_mrls) { int i; for(i = 0; i < num_mrls; i++) send_string(*session, CMD_PLAYLIST_ADD, mrls[i]); for(i = 0; i < num_mrls; i++) free(mrls[i]); free(mrls); } /* * CMD_PLAY, CMD_SLOW_4, CMD_SLOW_2, CMD_PAUSE, CMD_FAST_2, * CMD_FAST_4, CMD_STOP, CMD_FULLSCREEN, CMD_EJECT */ if(state) { for(s = 0; s < 9; s++) { if(((state << s) & 0x80000000) && ((s + 1) != CMD_QUIT)) remote_cmd(*session, (s + 1)); } } while(audio_next) { remote_cmd(*session, CMD_AUDIO_NEXT); playlist_next--; } while(audio_prev) { remote_cmd(*session, CMD_AUDIO_PREV); playlist_next--; } while(spu_next) { remote_cmd(*session, CMD_SPU_NEXT); spu_next--; } while(spu_prev) { remote_cmd(*session, CMD_SPU_PREV); spu_prev--; } } else printf(_("Session %d isn't running.\n"), *session); } #else /* CTRL_TEST */ int main(int argc, char **argv) { int session = 0; int fd; if(argc > 1) session = atoi(argv[1]); if(is_remote_running(session)) { printf("session %d is running\n", session); send_string(session, CMD_PLAYLIST_ADD, "azertyuiopqsdfghjklmwxcvbn"); printf("GET_VERSION: '%s'\n", get_string(session, CMD_GET_VERSION)); } else printf("Session %d isn't running\n"); return 1; } #endif --- NEW FILE: session.h --- /* * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a unix video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * xine is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * $Id: session.h,v 1.1 2003/01/24 13:22:39 f1rmb Exp $ * */ #ifndef CTRLSOCK_H #define CTRLSOCKS_H typedef enum { /* Don't change order */ CMD_PLAY = 1, CMD_SLOW_4, CMD_SLOW_2, CMD_PAUSE, CMD_FAST_2, CMD_FAST_4, CMD_STOP, CMD_QUIT, CMD_FULLSCREEN, CMD_EJECT, CMD_AUDIO_NEXT, CMD_AUDIO_PREV, CMD_SPU_NEXT, CMD_SPU_PREV, CMD_PLAYLIST_FLUSH, CMD_PLAYLIST_ADD, CMD_PLAYLIST_NEXT, CMD_PLAYLIST_PREV, CMD_PLAYLIST_LOAD, CMD_GET_VERSION, CMD_PING } ctrl_commands_t; void send_uint32(int session, ctrl_commands_t command, uint32_t value); uint32_t get_uint32(int session, ctrl_commands_t command); void send_boolean(int session, ctrl_commands_t command, uint8_t value); uint8_t get_boolean(int session, ctrl_commands_t command); void send_string(int session, ctrl_commands_t command, char *string); char *get_string(int session, ctrl_commands_t command); int is_remote_running(int session); int setup_ctrlsocket(void); void session_handle_subopt(char *optarg, int *session); #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/Makefile.am,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- Makefile.am 23 Jan 2003 15:16:31 -0000 1.59 +++ Makefile.am 24 Jan 2003 13:22:39 -0000 1.60 @@ -7,14 +7,13 @@ endif bin_PROGRAMS = xine $(remote) -EXTRA_PROGRAMS = ctrl +EXTRA_PROGRAMS = session_ctrl ## xscreensaver-remote.c xine_SOURCES = \ actions.c \ config_wrapper.c \ control.c \ - ctrlsock.c \ download.c \ errors.c \ event.c \ @@ -27,6 +26,7 @@ mrl_browser.c \ network.c \ osd.c \ + session.c \ setup.c \ skins.c \ snapshot.c \ @@ -54,14 +54,13 @@ $(top_builddir)/readline/libreadline.la $(TERMCAP_LIB) \ $(top_builddir)/src/common/libcommon.la -ctrl_LDADD = @XINE_LIBS@ $(top_builddir)/src/common/libcommon.la +session_ctrl_LDADD = @XINE_LIBS@ $(top_builddir)/src/common/libcommon.la noinst_HEADERS = \ common.h \ actions.h \ config_wrapper.h \ control.h \ - ctrlsock.h \ download.h \ errors.h \ event.h \ @@ -78,6 +77,7 @@ playlist.h \ post.h \ mediamark.h \ + session.h \ setup.h \ skins.h \ stream_infos.h \ @@ -97,18 +97,12 @@ xine-remote.o: xine-remote.c $(COMPILE) -DNETWORK_CLIENT -c `test -f $< || echo '$(srcdir)/'`$< -ctrl.c: $(srcdir)/ctrlsock.c - $(LN_S) $(srcdir)/ctrlsock.c ./ctrl.c - -DEBUG_COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(DEBUG_CFLAGS) -ctrl.o: ctrl.c - $(DEBUG_COMPILE) -DCTRL_TEST -c `test -f $< || echo '$(srcdir)/'`$< - -##xscreensaver-remote.c: -## $(LN_S) $(top_srcdir)/src/common/xscreensaver-remote.c \ -## ./xscreensaver-remote.c +session_ctrl.c: $(srcdir)/session.c + $(LN_S) $(srcdir)/session.c ./session_ctrl.c +session_ctrl.o: session_ctrl.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(DEBUG_CFLAGS) -DCTRL_TEST -c `test -f $< || echo '$(srcdir)/'`$< debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) -Ixine-toolkit/" Index: common.h =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/common.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- common.h 23 Jan 2003 15:16:32 -0000 1.29 +++ common.h 24 Jan 2003 13:22:39 -0000 1.30 @@ -41,7 +41,6 @@ #include "actions.h" #include "config_wrapper.h" #include "control.h" -#include "ctrlsock.h" #include "errors.h" #include "event.h" #include "event_sender.h" @@ -52,6 +51,7 @@ #include "network.h" #include "panel.h" #include "playlist.h" +#include "session.h" #include "setup.h" #include "skins.h" #include "snapshot.h" Index: main.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/main.c,v retrieving revision 1.200 retrieving revision 1.201 diff -u -r1.200 -r1.201 --- main.c 23 Jan 2003 15:16:34 -0000 1.200 +++ main.c 24 Jan 2003 13:22:39 -0000 1.201 @@ -107,7 +107,8 @@ #ifdef DEBUG "d:" #endif - "u:a:V:A:p::s:RG:BN:P:l::"; + "u:a:V:A:p::s:RG:BN:P:l::S:"; + static struct option long_options[] = { {"help" , no_argument , 0, 'h' }, #ifdef HAVE_LIRC @@ -140,6 +141,7 @@ {"loop" , optional_argument, 0, 'l' }, {"skin-server-url", required_argument, 0, OPTION_SK_SERVER }, {"enqueue" , required_argument, 0, OPTION_ENQUEUE }, + {"session" , required_argument, 0, 'S' }, {"version" , no_argument , 0, 'v' }, {0 , no_argument , 0, 0 } }; @@ -858,9 +860,7 @@ char **_argv; int _argc; int driver_num; - int session; - int enqueue = 0; - char *enq_mrls[4096]; + int session = -1; #ifdef HAVE_SETLOCALE if((xitk_set_locale()) != NULL) @@ -1103,7 +1103,19 @@ break; case OPTION_ENQUEUE: - enq_mrls[enqueue++] = strdup(optarg); + { + char eqmrl[strlen(optarg) + 256]; + + if(session >= 0) + sprintf(eqmrl, "session=%d,mrl=%s", session, optarg); + else + sprintf(eqmrl, "mrl=%s", optarg); + session_handle_subopt(eqmrl, &session); + } + break; + + case 'S': + session_handle_subopt(optarg, &session); break; case 'v': /* Display version and exit*/ @@ -1124,20 +1136,9 @@ } } - if(enqueue) { - int p; - - if(is_remote_running(session)) { - for(p = 0; p < enqueue; p++) { - printf(_("Enqueue '%s'\n"), enq_mrls[p]); - send_string(session, CMD_PLAYLIST_ADD, enq_mrls[p]); - } - } - else - printf(_("Session %d isn't running. Aborted.\n"), session); - + /* Session feature was used, say good bye */ + if(session >= 0) return 0; - } /* * Using root window mode don't allow Index: playlist.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/playlist.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -r1.110 -r1.111 --- playlist.c 15 Jan 2003 00:36:30 -0000 1.110 +++ playlist.c 24 Jan 2003 13:22:39 -0000 1.111 @@ -281,7 +281,7 @@ /* * Delete all MRLs */ -static void _playlist_delete_all(xitk_widget_t *w, void *data) { +void playlist_delete_all(xitk_widget_t *w, void *data) { mmk_editor_end(); @@ -290,8 +290,10 @@ if(xine_get_status(gGui->stream) != XINE_STATUS_STOP) gui_stop(NULL, NULL); - - xitk_inputtext_change_text(playlist->winput, NULL); + + if(playlist && playlist->winput) + xitk_inputtext_change_text(playlist->winput, NULL); + gui_set_current_mrl(NULL); enable_playback_controls(0); } @@ -1125,7 +1127,7 @@ xitk_set_widget_tips(playlist->delete, _("Delete selected MRL from playlist")); b.skin_element_name = "PlDeleteAll"; - b.callback = _playlist_delete_all; + b.callback = playlist_delete_all; b.userdata = NULL; xitk_list_append_content ((XITK_WIDGET_LIST_LIST(playlist->widget_list)), (playlist->delete_all = xitk_button_create (playlist->widget_list, gGui->skin_config, &b))); Index: playlist.h =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/playlist.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- playlist.h 5 Jan 2003 00:24:34 -0000 1.14 +++ playlist.h 24 Jan 2003 13:22:39 -0000 1.15 @@ -43,6 +43,7 @@ void playlist_toggle_visibility(xitk_widget_t *, void *); void playlist_update_focused_entry(void); void playlist_change_skins(void); +void playlist_delete_all(xitk_widget_t *w, void *data); void playlist_editor(void); #endif --- ctrlsock.c DELETED --- --- ctrlsock.h DELETED --- |