#include "util.h"
#include "modargs.h"
-#ifdef USE_PROTOCOL_SIMPLE
+#if defined(USE_PROTOCOL_SIMPLE)
#include "protocol-simple.h"
#define protocol_new pa_protocol_simple_new
#define protocol_free pa_protocol_simple_free
#define IPV4_PORT 4711
#define UNIX_SOCKET "/tmp/polypaudio/simple"
#define MODULE_ARGUMENTS "rate", "format", "channels", "sink", "source", "playback", "record",
+#elif defined(USE_PROTOCOL_CLI)
+ #include "protocol-cli.h"
+ #define protocol_new pa_protocol_cli_new
+ #define protocol_free pa_protocol_cli_free
+ #define IPV4_PORT 4712
+ #define UNIX_SOCKET "/tmp/polypaudio/cli"
+ #define MODULE_ARGUMENTS
+#elif defined(USE_PROTOCOL_NATIVE)
+ #include "protocol-native.h"
+ #define protocol_new pa_protocol_native_new
+ #define protocol_free pa_protocol_native_free
+ #define IPV4_PORT 4713
+ #define UNIX_SOCKET "/tmp/polypaudio/native"
+ #define MODULE_ARGUMENTS "public", "cookie",
+#elif defined(USE_PROTOCOL_ESOUND)
+ #include "protocol-esound.h"
+ #include "esound.h"
+ #define protocol_new pa_protocol_esound_new
+ #define protocol_free pa_protocol_esound_free
+ #define IPV4_PORT ESD_DEFAULT_PORT
+ #define UNIX_SOCKET ESD_UNIX_SOCKET_NAME
+ #define MODULE_ARGUMENTS "sink", "source", "public", "cookie",
#else
- #ifdef USE_PROTOCOL_CLI
- #include "protocol-cli.h"
- #define protocol_new pa_protocol_cli_new
- #define protocol_free pa_protocol_cli_free
- #define IPV4_PORT 4712
- #define UNIX_SOCKET "/tmp/polypaudio/cli"
- #define MODULE_ARGUMENTS
- #else
- #ifdef USE_PROTOCOL_NATIVE
- #include "protocol-native.h"
- #define protocol_new pa_protocol_native_new
- #define protocol_free pa_protocol_native_free
- #define IPV4_PORT 4713
- #define UNIX_SOCKET "/tmp/polypaudio/native"
- #define MODULE_ARGUMENTS "public", "cookie",
- #else
- #ifdef USE_PROTOCOL_ESOUND
- #include "protocol-esound.h"
- #include "esound.h"
- #define protocol_new pa_protocol_esound_new
- #define protocol_free pa_protocol_esound_free
- #define IPV4_PORT ESD_DEFAULT_PORT
- #define UNIX_SOCKET ESD_UNIX_SOCKET_NAME
- #define MODULE_ARGUMENTS "sink", "source", "public", "cookie",
- #else
- #error "Broken build system"
- #endif
- #endif
- #endif
+ #error "Broken build system"
#endif
static const char* const valid_modargs[] = {
--- /dev/null
+#ifndef foopolyplibversionhfoo /*-*-C-*-*/
+#define foopolyplibversionhfoo
+
+/* $Id$ */
+
+/***
+ This file is part of polypaudio.
+
+ polypaudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ polypaudio 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with polypaudio; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+/** \file
+ * Define header version */
+
+/** Return the version of the header files. Keep in mind that this is
+a macro and not a function, so it is impossible to get the pointer of
+it. */
+#define pa_get_headers_version() ("@PACKAGE_VERSION@")
+
+#endif
USA.
***/
+#include "cdecl.h"
#include "mainloop-api.h"
#include "sample.h"
#include "polyplib-def.h"
#include "polyplib-introspect.h"
#include "polyplib-subscribe.h"
#include "polyplib-scache.h"
+#include "polyplib-version.h"
/** \file
* Include all polyplib header file at once. The following files are included: \ref mainloop-api.h, \ref sample.h,
* \ref polyplib-def.h, \ref polyplib-context.h, \ref polyplib-stream.h,
- * \ref polyplib-introspect.h, \ref polyplib-subscribe.h and \ref polyplib-scache.h
+ * \ref polyplib-introspect.h, \ref polyplib-subscribe.h and \ref polyplib-scache.h \ref polyplib-version.h
* at once */
/** \mainpage
* synchronous API is available as "polyplib-simple".
*/
+PA_C_DECL_BEGIN
+
+/** Return the version of the library the current application is linked to */
+const char* pa_get_library_version(void);
+
+PA_C_DECL_END
+
#endif