summaryrefslogtreecommitdiffstats
path: root/src/module-simple-protocol.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-06-19 18:51:30 +0000
committerLennart Poettering <lennart@poettering.net>2004-06-19 18:51:30 +0000
commit787bf6cb64efaa502dfcc8c2631a8d577d591a23 (patch)
treeb963801fa3327e1da59611400259f3e69e8aef8f /src/module-simple-protocol.c
parentb4e3f5c5c5fb1cb0ddb10d123d69c211516c4ac7 (diff)
minor work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@26 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/module-simple-protocol.c')
-rw-r--r--src/module-simple-protocol.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/module-simple-protocol.c b/src/module-simple-protocol.c
index c25ff06a..905594c6 100644
--- a/src/module-simple-protocol.c
+++ b/src/module-simple-protocol.c
@@ -3,7 +3,19 @@
#include "module.h"
#include "socket-server.h"
-#include "protocol-simple.h"
+
+#ifdef USE_PROTOCOL_SIMPLE
+ #include "protocol-simple.h"
+ #define protocol_free protcol_simple_free
+#else
+ #ifdef USE_PROTOCOL_CLI
+ #include "protocol-cli.h"
+ #define protocol_new protocol_cli_new
+ #define protocol_free protocol_cli_free
+ #else
+ #error "Broken build system"
+ #endif
+#endif
int module_init(struct core *c, struct module*m) {
struct socket_server *s;
@@ -17,7 +29,12 @@ int module_init(struct core *c, struct module*m) {
return -1;
#endif
+#ifdef USE_PROTOCOL_SIMPLE
m->userdata = protocol_simple_new(c, s, PROTOCOL_SIMPLE_PLAYBACK);
+#else
+ m->userdata = protocol_new(c, s);
+#endif
+
assert(m->userdata);
return 0;
}