]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Remove the "XMMS" plugin. 3556/head
authorFlorian Forster <octo@google.com>
Tue, 1 Sep 2020 08:45:19 +0000 (10:45 +0200)
committerFlorian Forster <octo@google.com>
Wed, 2 Sep 2020 15:00:48 +0000 (17:00 +0200)
Makefile.am
README
configure.ac
src/collectd.conf.in
src/xmms.c [deleted file]

index e49b1059b5482138dbe0fe6ace541637ac65919a..b03026415df782d28d227a801b22208b67b09955 100644 (file)
@@ -2316,14 +2316,6 @@ xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
 xencpu_la_LIBADD = -lxenctrl
 endif
 
-if BUILD_PLUGIN_XMMS
-pkglib_LTLIBRARIES += xmms.la
-xmms_la_SOURCES = src/xmms.c
-xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
-xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
-xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
-endif
-
 if BUILD_PLUGIN_ZFS_ARC
 pkglib_LTLIBRARIES += zfs_arc.la
 zfs_arc_la_SOURCES = src/zfs_arc.c
diff --git a/README b/README
index a130cbbef8e677d05a8e0715778ef0b4460bee24..5715619c59a969cca490d21ba94e84b460a89afe 100644 (file)
--- a/README
+++ b/README
@@ -487,9 +487,6 @@ Features
     - xencpu
       XEN Hypervisor CPU stats.
 
-    - xmms
-      Bitrate and frequency of music played with XMMS.
-
     - zfs_arc
       Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
 
index cbe1970e17f1128f3170e91e6dffc28bc9b04e24..bdbbc79011ab3f71f9984c28fe31b23102cbdf2e 100644 (file)
@@ -5855,72 +5855,6 @@ AC_SUBST([LIBXENCTL_CPPFLAGS])
 AC_SUBST([LIBXENCTL_LDFLAGS])
 # }}}
 
-# --with-libxmms {{{
-with_xmms_config="xmms-config"
-AC_ARG_WITH([libxmms],
-  [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
-  [
-    if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
-      with_libxmms="$withval"
-    else
-      if test -f "$withval" && test -x "$withval"; then
-        with_xmms_config="$withval"
-      else if test -x "$withval/bin/xmms-config"; then
-        with_xmms_config="$withval/bin/xmms-config"
-      fi; fi
-      with_libxmms="yes"
-    fi
-  ],
-  [with_libxmms="yes"]
-)
-
-if test "x$with_libxmms" = "xyes"; then
-  with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
-  if test $? -ne 0; then
-    with_libxmms="no"
-  fi
-fi
-
-if test "x$with_libxmms" = "xyes"; then
-  with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
-  if test $? -ne 0; then
-    with_libxmms="no"
-  fi
-fi
-
-if test "x$with_libxmms" = "xyes"; then
-  SAVE_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$with_xmms_cflags"
-
-  AC_CHECK_HEADER([xmmsctrl.h],
-    [with_libxmms="yes"],
-    [with_libxmms="no"],
-  )
-
-  CPPFLAGS="$SAVE_CPPFLAGS"
-fi
-
-if test "x$with_libxmms" = "xyes"; then
-  SAVE_LIBS="$LIBS"
-  LIBS="$with_xmms_libs"
-
-  AC_CHECK_LIB([xmms], [xmms_remote_get_info],
-    [with_libxmss="yes"],
-    [with_libxmms="no"],
-    [$with_xmms_libs]
-
-  )
-
-  LIBS="$SAVE_LIBS"
-fi
-
-BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
-BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
-
-AC_SUBST([BUILD_WITH_LIBXMMS_CFLAGS])
-AC_SUBST([BUILD_WITH_LIBXMMS_LIBS])
-# }}}
-
 # --with-libyajl {{{
 AC_ARG_WITH([libyajl],
   [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
@@ -7172,7 +7106,6 @@ AC_PLUGIN([write_stackdriver],   [$plugin_write_stackdriver], [Google Stackdrive
 AC_PLUGIN([write_syslog],        [yes],                       [Syslog output plugin])
 AC_PLUGIN([write_tsdb],          [yes],                       [TSDB output plugin])
 AC_PLUGIN([xencpu],              [$plugin_xencpu],            [Xen Host CPU usage])
-AC_PLUGIN([xmms],                [$with_libxmms],             [XMMS statistics])
 AC_PLUGIN([zfs_arc],             [$plugin_zfs_arc],           [ZFS ARC statistics])
 AC_PLUGIN([zone],                [$plugin_zone],              [Solaris container statistics])
 AC_PLUGIN([zookeeper],           [yes],                       [Zookeeper statistics])
@@ -7433,7 +7366,6 @@ AC_MSG_RESULT([    libvarnish  . . . . . $with_libvarnish])
 AC_MSG_RESULT([    libvirt . . . . . . . $with_libvirt])
 AC_MSG_RESULT([    libxenctrl  . . . . . $with_libxenctrl])
 AC_MSG_RESULT([    libxml2 . . . . . . . $with_libxml2])
-AC_MSG_RESULT([    libxmms . . . . . . . $with_libxmms])
 AC_MSG_RESULT([    libyajl . . . . . . . $with_libyajl])
 AC_MSG_RESULT([    oracle  . . . . . . . $with_oracle])
 AC_MSG_RESULT([    protobuf-c  . . . . . $have_protoc_c])
@@ -7615,7 +7547,6 @@ AC_MSG_RESULT([    write_stackdriver . . $enable_write_stackdriver])
 AC_MSG_RESULT([    write_syslog . .  . . $enable_write_syslog])
 AC_MSG_RESULT([    write_tsdb  . . . . . $enable_write_tsdb])
 AC_MSG_RESULT([    xencpu  . . . . . . . $enable_xencpu])
-AC_MSG_RESULT([    xmms  . . . . . . . . $enable_xmms])
 AC_MSG_RESULT([    zfs_arc . . . . . . . $enable_zfs_arc])
 AC_MSG_RESULT([    zone  . . . . . . . . $enable_zone])
 AC_MSG_RESULT([    zookeeper . . . . . . $enable_zookeeper])
index 6406291f86a7055f8505ce35075500af26551e8b..9d0629db5394ac53a195188102602faa349fdb03 100644 (file)
 #@BUILD_PLUGIN_WRITE_SYSLOG_TRUE@LoadPlugin write_syslog
 #@BUILD_PLUGIN_WRITE_TSDB_TRUE@LoadPlugin write_tsdb
 #@BUILD_PLUGIN_XENCPU_TRUE@LoadPlugin xencpu
-#@BUILD_PLUGIN_XMMS_TRUE@LoadPlugin xmms
 #@BUILD_PLUGIN_ZFS_ARC_TRUE@LoadPlugin zfs_arc
 #@BUILD_PLUGIN_ZONE_TRUE@LoadPlugin zone
 #@BUILD_PLUGIN_ZOOKEEPER_TRUE@LoadPlugin zookeeper
diff --git a/src/xmms.c b/src/xmms.c
deleted file mode 100644 (file)
index 2d550b4..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * collectd - src/xmms.c
- * Copyright (C) 2007       Florian octo Forster
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *   Florian octo Forster <octo at collectd.org>
- **/
-
-#include "collectd.h"
-
-#include "plugin.h"
-#include "utils/common/common.h"
-
-#include <xmms/xmmsctrl.h>
-
-static gint xmms_session;
-
-static void cxmms_submit(const char *type, gauge_t value) {
-  value_list_t vl = VALUE_LIST_INIT;
-
-  vl.values = &(value_t){.gauge = value};
-  vl.values_len = 1;
-  sstrncpy(vl.plugin, "xmms", sizeof(vl.plugin));
-  sstrncpy(vl.type, type, sizeof(vl.type));
-
-  plugin_dispatch_values(&vl);
-} /* void cxmms_submit */
-
-static int cxmms_read(void) {
-  gint rate;
-  gint freq;
-  gint nch;
-
-  if (!xmms_remote_is_running(xmms_session))
-    return 0;
-
-  xmms_remote_get_info(xmms_session, &rate, &freq, &nch);
-
-  if ((freq == 0) || (nch == 0))
-    return -1;
-
-  cxmms_submit("bitrate", rate);
-  cxmms_submit("frequency", freq);
-
-  return 0;
-} /* int read */
-
-void module_register(void) {
-  plugin_register_read("xmms", cxmms_read);
-} /* void module_register */