/* XMMS2 - X Music Multiplexer System * Copyright (C) 2003-2007 XMMS2 Team * * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. */ #include "xmms/xmms_xformplugin.h" #include "xmms/xmms_log.h" #include #define BUFFER_SIZE 4096 static gboolean xmms_xml_plugin_setup (xmms_xform_plugin_t *xform_plugin); static gboolean xmms_xml_init (xmms_xform_t *xform); static gint xmms_xml_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, xmms_error_t *err); static gint64 xmms_xml_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t whence, xmms_error_t *err); XMMS_XFORM_PLUGIN ("xml", "XML plugin", XMMS_VERSION, "XML plugin", xmms_xml_plugin_setup); static gboolean xmms_xml_plugin_setup (xmms_xform_plugin_t *xform_plugin) { xmms_xform_methods_t methods; XMMS_XFORM_METHODS_INIT (methods); methods.init = xmms_xml_init; methods.read = xmms_xml_read; methods.seek = xmms_xml_seek; xmms_xform_plugin_methods_set (xform_plugin, &methods); xmms_xform_plugin_indata_add (xform_plugin, XMMS_STREAM_TYPE_MIMETYPE, "application/xml", NULL); xmms_magic_add ("xml header", "application/xml", "0 string