summaryrefslogtreecommitdiffstats
path: root/polyp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-29 19:13:55 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-29 19:13:55 +0000
commitd09240118ce0170c2fc5f504589646746902eb96 (patch)
treea9028255331ec92347c734869ef708ac527c475f /polyp
parent6dfab4ec7b8d8702d425b2ec9b5f1aff5c8290cd (diff)
really fix API version API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@249 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp')
-rw-r--r--polyp/pacat.c7
-rw-r--r--polyp/pactl.c2
-rw-r--r--polyp/paplay.c2
-rw-r--r--polyp/polyplib-context.c9
-rw-r--r--polyp/polyplib-version.h.in10
5 files changed, 21 insertions, 9 deletions
diff --git a/polyp/pacat.c b/polyp/pacat.c
index 1eb37d4d..67242b26 100644
--- a/polyp/pacat.c
+++ b/polyp/pacat.c
@@ -36,8 +36,9 @@
#include <polyp/polyplib-error.h>
#include <polyp/mainloop.h>
#include <polyp/mainloop-signal.h>
+#include <polyp/polyplib-version.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
@@ -107,7 +108,7 @@ static void stream_read_callback(struct pa_stream *s, const void*data, size_t le
mainloop_api->io_enable(stdio_event, PA_IO_EVENT_OUTPUT);
if (buffer) {
- fprintf(stderr, "Buffer overrrun, dropping incoming data\n");
+ fprintf(stderr, "Buffer overrun, dropping incoming data\n");
return;
}
@@ -133,7 +134,7 @@ static void stream_state_callback(struct pa_stream *s, void *userdata) {
case PA_STREAM_FAILED:
default:
- fprintf(stderr, "Stream errror: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
quit(1);
}
}
diff --git a/polyp/pactl.c b/polyp/pactl.c
index cf2f51c3..fbedc6fa 100644
--- a/polyp/pactl.c
+++ b/polyp/pactl.c
@@ -41,7 +41,7 @@
#include <polyp/mainloop-signal.h>
#include <polyp/sample.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
diff --git a/polyp/paplay.c b/polyp/paplay.c
index 89358a51..cc466e12 100644
--- a/polyp/paplay.c
+++ b/polyp/paplay.c
@@ -40,7 +40,7 @@
#include <polyp/mainloop-signal.h>
#include <polyp/polyplib-version.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
diff --git a/polyp/polyplib-context.c b/polyp/polyplib-context.c
index d2fae0af..b736daa7 100644
--- a/polyp/polyplib-context.c
+++ b/polyp/polyplib-context.c
@@ -676,10 +676,6 @@ struct pa_operation* pa_context_send_simple_command(struct pa_context *c, uint32
return pa_operation_ref(o);
}
-const char* pa_get_library_version(void) {
- return PACKAGE_VERSION;
-}
-
struct pa_operation* pa_context_set_default_sink(struct pa_context *c, const char *name, void(*cb)(struct pa_context*c, int success, void *userdata), void *userdata) {
struct pa_tagstruct *t;
struct pa_operation *o;
@@ -744,3 +740,8 @@ struct pa_operation* pa_context_set_name(struct pa_context *c, const char *name,
return pa_operation_ref(o);
}
+
+const char* pa_get_library_version(void) {
+ return PACKAGE_VERSION;
+}
+
diff --git a/polyp/polyplib-version.h.in b/polyp/polyplib-version.h.in
index b44dc008..75798693 100644
--- a/polyp/polyplib-version.h.in
+++ b/polyp/polyplib-version.h.in
@@ -22,6 +22,8 @@
USA.
***/
+/* WARNING: Make sure to edit the real source file polyplib-version.h.in! */
+
/** \file
* Define header version */
@@ -30,4 +32,12 @@ a macro and not a function, so it is impossible to get the pointer of
it. */
#define pa_get_headers_version() ("@PACKAGE_VERSION@")
+/** Return the version of the library the current application is linked to. */
+const char* pa_get_library_version(void);
+
+/** The current API version. Version 6 relates to polypaudio
+ * 0.6. Prior versions (i.e. Polypaudio 0.5.1 and older) have
+ * PA_API_VERSION undefined. */
+#define PA_API_VERSION @PA_API_VERSION@
+
#endif