Skip to content

Commit

Permalink
Rationalise all the native dbus intefaces files down to just three.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrady committed Mar 20, 2018
1 parent c47e939 commit c0b1dc5
Show file tree
Hide file tree
Showing 10 changed files with 321 additions and 533 deletions.
24 changes: 0 additions & 24 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,6 @@ dbus-interface.h dbus-interface.c: org.gnome.ShairportSync.xml
gdbus-codegen --interface-prefix org.gnome --generate-c-code dbus-interface org.gnome.ShairportSync.xml
endif

if USE_DBUS_DIAGNOSTICS
shairport_sync_SOURCES += dbus-diagnostics.c dbus-diagnostics-interface.c
BUILT_SOURCES += dbus-diagnostics-interface.h dbus-diagnostics-interface.c
# We don't want to install this header
noinst_HEADERS += $(BUILT_SOURCES)
# Correctly clean the generated headers, but keep the xml description
CLEANFILES += $(BUILT_SOURCES)

dbus-diagnostics-interface.h dbus-diagnostics-interface.c: org.gnome.ShairportSync.Diagnostics.xml
gdbus-codegen --interface-prefix org.gnome --generate-c-code dbus-diagnostics-interface org.gnome.ShairportSync.Diagnostics.xml
endif

if USE_DBUS_BASIC_REMOTE_CONTROL
shairport_sync_SOURCES += dbus-basic-remote-control.c dbus-basic-remote-control-interface.c
BUILT_SOURCES += dbus-basic-remote-control-interface.h dbus-basic-remote-control-interface.c
# We don't want to install this header
noinst_HEADERS += $(BUILT_SOURCES)
# Correctly clean the generated headers, but keep the xml description
CLEANFILES += $(BUILT_SOURCES)

dbus-basic-remote-control-interface.h dbus-basic-remote-control-interface.c: org.gnome.ShairportSync.Basic.Remote.Control.xml
gdbus-codegen --interface-prefix org.gnome --generate-c-code dbus-basic-remote-control-interface org.gnome.ShairportSync.Basic.Remote.Control.xml
endif

if USE_MPRIS
shairport_sync_SOURCES += mpris-service.c mpris-interface.c mpris-player-interface.c
BUILT_SOURCES += mpris-interface.h mpris-interface.c mpris-player-interface.h mpris-player-interface.c
Expand Down
8 changes: 1 addition & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,13 @@ AC_ARG_WITH(dns_sd, [ --with-dns_sd = choose dns_sd mDNS support], [
AM_CONDITIONAL([USE_DNS_SD], [test "x$HAS_DNS_SD" = "x1"])

# Look for dbus flag
AC_ARG_WITH(dbus, [ --with-dbus-interface = include support for a native Shairport Sync D-Bus interface], [
AC_ARG_WITH(dbus, [ --with-dbus-interface = include support for the native Shairport Sync D-Bus interface], [
AC_MSG_RESULT(>>Including dbus support)
HAS_DBUS=1
AC_DEFINE([HAVE_DBUS], 1, [Needed by the compiler.])
AC_DEFINE([HAVE_DBUS_DIAGNOSTICS], 1, [Needed by the compiler.])
AC_DEFINE([HAVE_DBUS_BASIC_REMOTE_CONTROL], 1, [Needed by the compiler.])
PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0 >= 2.30.0],[CFLAGS="${GIO_UNIX_CFLAGS} ${CFLAGS}" LIBS="${GIO_UNIX_LIBS} ${LIBS}"],[AC_MSG_ERROR(dbus messaging support requires the glib 2.0 library -- libglib2.0-dev suggested!)])
], )
AM_CONDITIONAL([USE_DBUS], [test "x$HAS_DBUS" = "x1"])
# Automatically include the diagnostics interface
AM_CONDITIONAL([USE_DBUS_DIAGNOSTICS], [test "x$HAS_DBUS" = "x1"])
# Automatically include the basic remote control interface
AM_CONDITIONAL([USE_DBUS_BASIC_REMOTE_CONTROL], [test "x$HAS_DBUS" = "x1"])

# Look for dbus test client flag
AC_ARG_WITH(dbus-test-client, [ --with-dbus-test-client = compile dbus test client], [
Expand Down
315 changes: 0 additions & 315 deletions dbus-basic-remote-control.c

This file was deleted.

10 changes: 0 additions & 10 deletions dbus-basic-remote-control.h

This file was deleted.

Loading

0 comments on commit c0b1dc5

Please sign in to comment.