/*
  This (simple) code was written by Iain Thomas, and is therefore Copyright 2000, Iain Thomas.
  This code may be used subject to the terms of the GNU General Public Licence.
  Visit http://www.gnu.org for more information, and a copy of the licence.
  This code is supplied in the hope that it might be useful to others, however, I provide NO WARRANTIES
  whatsoever, nor do I claim it actually does anything useful.
  It's not particularly clean, but seems to work.

  Notes: Only supports session 0. Only tested under Linux(x86) with XMMS 1.2.3.
  Purpose: Simple status (name of song playing) to stdout.
  Use: xmms_title
  Compile: gcc -o xmms_title xmms_title.c -I/path/to/xmms/source -lxmms
  Other info: /path/to/xmms/source/libxmms/xmmsctrl.h
              /path/to/xmms/source/gnomexmms/gnomexmms.c
              Extending this can be your project- it does what I need, namely printing the current track title to
stdout, useful for automated .signature generators.
*/

#include "libxmms/xmmsctrl.h"

int main(argc, argv)
  int argc;
  char ** argv;
{
if(xmms_remote_is_playing(0))
  printf("XMMS now playing: %s\n",xmms_remote_get_playlist_title(0, xmms_remote_get_playlist_pos(0)));
if(xmms_remote_is_paused(0) || !xmms_remote_is_playing(0))
  printf("XMMS not playing\n");

}
