summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorMike Brady <mikebrady@eircom.net>2018-03-23 21:28:28 +0000
committerMike Brady <mikebrady@eircom.net>2018-03-23 21:28:28 +0000
commit6dc30c6ca943e33dc96039491ae701166db3cc5b (patch)
treee9bf77ba1bf97cfbac708cea4d7022cc3715af08 /common.c
parent8453778a133f00ca8f4dd17edf8c4af1f79f2a50 (diff)
Add a few new elements ot the native dbus interface
Diffstat (limited to 'common.c')
-rw-r--r--common.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/common.c b/common.c
index 1c4acd0..3ac689c 100644
--- a/common.c
+++ b/common.c
@@ -1004,3 +1004,71 @@ int ss_pthread_mutex_timedlock(pthread_mutex_t *mutex, useconds_t dally_time,
}
return r;
}
+
+char *get_version_string() {
+ char *version_string = malloc(200);
+ if (version_string) {
+ strcpy(version_string, PACKAGE_VERSION);
+#ifdef HAVE_LIBMBEDTLS
+ strcat(version_string, "-mbedTLS");
+#endif
+#ifdef HAVE_LIBPOLARSSL
+ strcat(version_string, "-PolarSSL");
+#endif
+#ifdef HAVE_LIBSSL
+ strcat(version_string, "-OpenSSL");
+#endif
+#ifdef CONFIG_TINYSVCMDNS
+ strcat(version_string, "-tinysvcmdns");
+#endif
+#ifdef CONFIG_AVAHI
+ strcat(version_string, "-Avahi");
+#endif
+#ifdef CONFIG_DNS_SD
+ strcat(version_string, "-dns_sd");
+#endif
+#ifdef CONFIG_ALSA
+ strcat(version_string, "-ALSA");
+#endif
+#ifdef CONFIG_SNDIO
+ strcat(version_string, "-sndio");
+#endif
+#ifdef CONFIG_AO
+ strcat(version_string, "-ao");
+#endif
+#ifdef CONFIG_PA
+ strcat(version_string, "-pa");
+#endif
+#ifdef CONFIG_SOUNDIO
+ strcat(version_string, "-soundio");
+#endif
+#ifdef CONFIG_DUMMY
+ strcat(version_string, "-dummy");
+#endif
+#ifdef CONFIG_STDOUT
+ strcat(version_string, "-stdout");
+#endif
+#ifdef CONFIG_PIPE
+ strcat(version_string, "-pipe");
+#endif
+#ifdef HAVE_LIBSOXR
+ strcat(version_string, "-soxr");
+#endif
+#ifdef CONFIG_CONVOLUTION
+ strcat(version_string, "-convolution");
+#endif
+#ifdef CONFIG_METADATA
+ strcat(version_string, "-metadata");
+#endif
+#ifdef HAVE_DBUS
+ strcat(version_string, "-dbus");
+#endif
+#ifdef HAVE_MPRIS
+ strcat(version_string, "-mpris");
+#endif
+ strcat(version_string, "-sysconfdir:");
+ strcat(version_string, SYSCONFDIR);
+ }
+ return version_string;
+}
+