Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 134382 | Differences between
and this patch

Collapse All | Expand All

(-)xmms-infopipe-1.3.orig/applications/xmms-info.php (-1 / +1 lines)
Lines 11-17 Link Here
11
11
12
  $info = fopen ("/tmp/xmms-info", "r");
12
  $info = fopen ("/tmp/xmms-info", "r");
13
13
14
  $input = fread ($info, 261);
14
  $input = fread ($info, 2048);
15
  $parse = split ("\n", $input);
15
  $parse = split ("\n", $input);
16
16
17
  fclose ($info);
17
  fclose ($info);
(-)xmms-infopipe-1.3.orig/configure.in (-25 / +3 lines)
Lines 1-12 Link Here
1
divert(-1)
2
3
The configurescriptbuilding kewl fewl for xmms-webinfo plugin...
4
Copyright (c) Weyfour WWWWolf Dec 9 2000
5
6
$Id: configure.in,v 1.5 2002/02/20 15:06:37 wwwwolf Exp $
7
8
9
divert
10
1
11
AC_INIT(src/infopipe.c)
2
AC_INIT(src/infopipe.c)
12
AM_INIT_AUTOMAKE(xmms-infopipe, 1.3)
3
AM_INIT_AUTOMAKE(xmms-infopipe, 1.3)
Lines 25-46 Link Here
25
16
26
dnl *** checks for libraries
17
dnl *** checks for libraries
27
18
28
AM_PATH_GLIB(1.2.0,
19
PKG_CHECK_MODULES(MYLIBS, audacious >= 0.0.1 glib-2.0 >= 2.4,
29
	    [LIBS="$LIBS $GLIB_LIBS"
20
	[LIBS="$LIBS $MYLIBS_LIBS" CFLAGS="$CFLAGS $MYLIBS_CFLAGS"],
30
             CFLAGS="$CFLAGS $GLIB_CFLAGS"],
21
	AC_MSG_ERROR(You need Audacious dev files, as well as GLib dev files.))
31
             AC_MSG_ERROR(You need glib 1.2 or later to build this plug-in.))
32
33
dnl *** This mostly in anticipation of next release, but it *may* be needed
34
dnl     now, too...
35
AM_PATH_GTK(1.2.0,
36
	    [LIBS="$LIBS $GTK_LIBS"
37
             CFLAGS="$CFLAGS $GTK_CFLAGS"],
38
             AC_MSG_ERROR(You need GTK+ 1.2 or later to build this plug-in.))
39
40
AM_PATH_XMMS(1.0.0,
41
	    [LIBS="$LIBS $XMMS_LIBS"
42
             CFLAGS="$CFLAGS $XMMS_CFLAGS"],
43
             AC_MSG_ERROR(You need XMMS version >= 1.0.0, naturally.))
44
22
45
dnl *** checks for header files
23
dnl *** checks for header files
46
24
(-)xmms-infopipe-1.3.orig/src/infopipe.c (-7 / +14 lines)
Lines 26-34 Link Here
26
#include <sys/stat.h>
26
#include <sys/stat.h>
27
#include <sys/types.h>
27
#include <sys/types.h>
28
#include <sys/time.h>
28
#include <sys/time.h>
29
#include <xmms/plugin.h>
29
#include <audacious/plugin.h>
30
#include <xmms/util.h>
30
#include <audacious/util.h>
31
#include <xmms/xmmsctrl.h>
31
#include <audacious/beepctrl.h>
32
32
33
#include "infopipe.h"
33
#include "infopipe.h"
34
#include "../config.h"
34
#include "../config.h"
Lines 228-243 Link Here
228
  fd_set fds;
228
  fd_set fds;
229
  FILE *p;  /* the pipe */
229
  FILE *p;  /* the pipe */
230
  int fd; /* File descriptor for pipe, and its flags. */
230
  int fd; /* File descriptor for pipe, and its flags. */
231
  struct timespec tv;
231
232
232
  for(;;) {
233
  for(;;) {
234
    /* This is a thread, fill the structure early */
235
    tv.tv_sec = 0;
236
    tv.tv_nsec = 100000000; /* 1/10th of a second */
237
233
    /* Open the pipe as file descriptor. */
238
    /* Open the pipe as file descriptor. */
234
    /* (O_RDONLY seems to be enough in Linux, but FreeBSDites seemed to
239
    /* (O_RDONLY seems to be enough in Linux, but FreeBSDites seemed to
235
       demand O_RDWR.) */
240
       demand O_RDWR.) */
236
    fd = open(fifo_file, O_RDWR);
241
    /* (Actually, we need to write to the pipe, not read it, so O_WRONLY) */
242
    fd = open(fifo_file, O_WRONLY);
237
    
243
    
238
    if(fd == -1) {
244
    if(fd == -1) {
239
      perror("xmms_infopipe: Pipe open failed");
245
      perror("xmms_infopipe: Pipe open failed");
240
      xmms_quit();
246
      xmms_quit();
247
      /* exit the function, don't give the chance to fill with invalid data */
248
      return;  
241
    }
249
    }
242
250
243
    /* Set the file handle to use non-blocking I/O */
251
    /* Set the file handle to use non-blocking I/O */
Lines 262-270 Link Here
262
    /* Changed to 1 second after request... report if you have problems.
270
    /* Changed to 1 second after request... report if you have problems.
263
       FIXME: Should use XMMS configfile facility & config dialog???
271
       FIXME: Should use XMMS configfile facility & config dialog???
264
    */
272
    */
265
    sleep(1); /* Umm, or non-blockingness still doesn't work without this!
273
266
		 Is there some nicer way of saying this, like "wait
274
    nanosleep(&tv, NULL);
267
		 until no reader?" select()? */
268
  }
275
  }
269
}
276
}
270
277
(-)xmms-infopipe-1.3.orig/src/infopipe_config.c (-1 / +4 lines)
Lines 21-27 Link Here
21
#include <glib.h>
21
#include <glib.h>
22
#include <unistd.h>
22
#include <unistd.h>
23
#include <sys/types.h>
23
#include <sys/types.h>
24
#include <xmms/configfile.h>
24
25
/* Refer to audacious/configfile.h - I am not a real programmer! */
26
#define I_AM_A_THIRD_PARTY_DEVELOPER_WHO_NEEDS_TO_BE_KICKED_IN_THE_HEAD_BY_CHUCK_NORRIS
27
#include <audacious/configfile.h>
25
28
26
#include "infopipe_config.h"
29
#include "infopipe_config.h"
27
#include "infopipe.h"
30
#include "infopipe.h"
(-)xmms-infopipe-1.3.orig/src/infopipe.h (-1 / +1 lines)
Lines 14-20 Link Here
14
#define INFOPIPE_PLUGIN_INFOPIPE_H
14
#define INFOPIPE_PLUGIN_INFOPIPE_H
15
15
16
#include <stdio.h>
16
#include <stdio.h>
17
#include <xmms/plugin.h>
17
#include <audacious/plugin.h>
18
18
19
/* infopipe.c */
19
/* infopipe.c */
20
GeneralPlugin *get_gplugin_info(void);
20
GeneralPlugin *get_gplugin_info(void);
(-)xmms-infopipe-1.3.orig/src/infopipe_senddata.c (-6 / +11 lines)
Lines 4-10 Link Here
4
4
5
#include <stdio.h>
5
#include <stdio.h>
6
#include <glib.h>
6
#include <glib.h>
7
#include <xmms/util.h>
7
#include <audacious/util.h>
8
#include <audacious/beepctrl.h>
8
#include "infopipe.h"
9
#include "infopipe.h"
9
#include "../config.h"
10
#include "../config.h"
10
11
Lines 14-20 Link Here
14
  This will get the XMMS information and print them out to the pipe.
15
  This will get the XMMS information and print them out to the pipe.
15
 */
16
 */
16
void blast_info(FILE *pipe) {
17
void blast_info(FILE *pipe) {
17
  gchar *play_status;
18
  gchar *play_status, *s1, *s2;
18
  gint tunes = xmms_remote_get_playlist_length(SESSIONID);
19
  gint tunes = xmms_remote_get_playlist_length(SESSIONID);
19
  gint current = xmms_remote_get_playlist_pos(SESSIONID);
20
  gint current = xmms_remote_get_playlist_pos(SESSIONID);
20
21
Lines 81-90 Link Here
81
  fprintf(pipe, "Channels: %d\n",nch);
82
  fprintf(pipe, "Channels: %d\n",nch);
82
83
83
  /* The basicest of the basic information. Title string and file name. */
84
  /* The basicest of the basic information. Title string and file name. */
84
  fprintf(pipe, "Title: %s\n",
85
  s1 = xmms_remote_get_playlist_title(SESSIONID,current);
85
	  xmms_remote_get_playlist_title(SESSIONID,current));
86
  s2 = xmms_remote_get_playlist_file(SESSIONID,current);
86
  fprintf(pipe, "File: %s\n",
87
  
87
	  xmms_remote_get_playlist_file(SESSIONID,current));
88
  fprintf(pipe, "Title: %s\n", s1);
89
  fprintf(pipe, "File: %s\n", s2);
90
91
  g_free(s1); /* xmms_remote_get_playlist_* require we call g_free on the returned string */
92
  g_free(s2); /* xmms_remote_get_playlist_* require we call g_free on the returned string */
88
93
89
  g_free(play_status);
94
  g_free(play_status);
90
}
95
}
(-)xmms-infopipe-1.3.orig/src/infopipe_ui.c (-2 / +2 lines)
Lines 14-21 Link Here
14
#include <string.h>
14
#include <string.h>
15
#include <gtk/gtk.h>
15
#include <gtk/gtk.h>
16
#include <glib.h>
16
#include <glib.h>
17
#include <xmms/plugin.h>
17
#include <audacious/plugin.h>
18
#include <xmms/util.h>
18
#include <audacious/util.h>
19
19
20
#include "../config.h"
20
#include "../config.h"
21
#include "infopipe.h"
21
#include "infopipe.h"
(-)xmms-infopipe-1.3.orig/src/Makefile.am (-1 / +1 lines)
Lines 6-12 Link Here
6
INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS)
6
INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS)
7
7
8
lib_LTLIBRARIES = libinfopipe.la
8
lib_LTLIBRARIES = libinfopipe.la
9
libdir = $(XMMS_GENERAL_PLUGIN_DIR)
9
libdir = `pkg-config audacious --variable general_plugin_dir`
10
10
11
# Somehow, infopipe.h wasn't included...
11
# Somehow, infopipe.h wasn't included...
12
EXTRA_DIST = infopipe.h infopipe_config.h
12
EXTRA_DIST = infopipe.h infopipe_config.h

Return to bug 134382