summaryrefslogtreecommitdiffstats
path: root/src/polypcore
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-02-17 12:10:58 +0000
committerPierre Ossman <ossman@cendio.se>2006-02-17 12:10:58 +0000
commit5eda18bf608a325c136a450e58fa154eb0b270f4 (patch)
tree3db3ea2b05d0870dd9fef63a9f929a07437af765 /src/polypcore
parentc278bc6c370faa5f38de0dcdffee4e301b5f9f1a (diff)
Cleaned up the includes after the restructuring. Indicate which headers are
public and which are internal through <> vs "". git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@500 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polypcore')
-rw-r--r--src/polypcore/authkey-prop.c7
-rw-r--r--src/polypcore/authkey-prop.h2
-rw-r--r--src/polypcore/authkey.c7
-rw-r--r--src/polypcore/autoload.c15
-rw-r--r--src/polypcore/autoload.h2
-rw-r--r--src/polypcore/cli-command.c39
-rw-r--r--src/polypcore/cli-command.h4
-rw-r--r--src/polypcore/cli-text.c25
-rw-r--r--src/polypcore/cli-text.h2
-rw-r--r--src/polypcore/cli.c29
-rw-r--r--src/polypcore/cli.h6
-rw-r--r--src/polypcore/client.c7
-rw-r--r--src/polypcore/client.h4
-rw-r--r--src/polypcore/conf-parser.c7
-rw-r--r--src/polypcore/core-scache.c21
-rw-r--r--src/polypcore/core-scache.h6
-rw-r--r--src/polypcore/core-subscribe.c7
-rw-r--r--src/polypcore/core-subscribe.h4
-rw-r--r--src/polypcore/core.c23
-rw-r--r--src/polypcore/core.h12
-rw-r--r--src/polypcore/dynarray.c3
-rw-r--r--src/polypcore/hashmap.c7
-rw-r--r--src/polypcore/idxset.c3
-rw-r--r--src/polypcore/iochannel.c7
-rw-r--r--src/polypcore/ioline.c5
-rw-r--r--src/polypcore/ioline.h4
-rw-r--r--src/polypcore/log.c5
-rw-r--r--src/polypcore/log.h2
-rw-r--r--src/polypcore/mcalign.c3
-rw-r--r--src/polypcore/mcalign.h4
-rw-r--r--src/polypcore/memblock.c3
-rw-r--r--src/polypcore/memblockq.c7
-rw-r--r--src/polypcore/memblockq.h4
-rw-r--r--src/polypcore/memchunk.c3
-rw-r--r--src/polypcore/memchunk.h2
-rw-r--r--src/polypcore/modargs.c17
-rw-r--r--src/polypcore/modargs.h2
-rw-r--r--src/polypcore/modinfo.c7
-rw-r--r--src/polypcore/module.c9
-rw-r--r--src/polypcore/module.h4
-rw-r--r--src/polypcore/namereg.c13
-rw-r--r--src/polypcore/namereg.h2
-rw-r--r--src/polypcore/packet.c3
-rw-r--r--src/polypcore/parseaddr.c5
-rw-r--r--src/polypcore/pdispatch.c11
-rw-r--r--src/polypcore/pdispatch.h4
-rw-r--r--src/polypcore/pid.c5
-rw-r--r--src/polypcore/play-memchunk.c7
-rw-r--r--src/polypcore/play-memchunk.h4
-rw-r--r--src/polypcore/poll.c3
-rw-r--r--src/polypcore/props.c5
-rw-r--r--src/polypcore/props.h4
-rw-r--r--src/polypcore/protocol-cli.c7
-rw-r--r--src/polypcore/protocol-cli.h8
-rw-r--r--src/polypcore/protocol-esound.c32
-rw-r--r--src/polypcore/protocol-esound.h8
-rw-r--r--src/polypcore/protocol-http.c11
-rw-r--r--src/polypcore/protocol-http.h8
-rw-r--r--src/polypcore/protocol-native.c41
-rw-r--r--src/polypcore/protocol-native.h8
-rw-r--r--src/polypcore/protocol-simple.c15
-rw-r--r--src/polypcore/protocol-simple.h8
-rw-r--r--src/polypcore/pstream-util.c3
-rw-r--r--src/polypcore/pstream-util.h4
-rw-r--r--src/polypcore/pstream.c7
-rw-r--r--src/polypcore/pstream.h8
-rw-r--r--src/polypcore/queue.c3
-rw-r--r--src/polypcore/random.c5
-rw-r--r--src/polypcore/resampler.c7
-rw-r--r--src/polypcore/resampler.h4
-rw-r--r--src/polypcore/sample-util.c3
-rw-r--r--src/polypcore/sample-util.h4
-rw-r--r--src/polypcore/sconv-s16le.c6
-rw-r--r--src/polypcore/sconv.c7
-rw-r--r--src/polypcore/sink-input.c9
-rw-r--r--src/polypcore/sink-input.h10
-rw-r--r--src/polypcore/sink.c17
-rw-r--r--src/polypcore/sink.h8
-rw-r--r--src/polypcore/sioman.c1
-rw-r--r--src/polypcore/socket-client.c11
-rw-r--r--src/polypcore/socket-client.h2
-rw-r--r--src/polypcore/socket-server.c9
-rw-r--r--src/polypcore/socket-server.h2
-rw-r--r--src/polypcore/socket-util.c7
-rw-r--r--src/polypcore/sound-file-stream.c7
-rw-r--r--src/polypcore/sound-file-stream.h2
-rw-r--r--src/polypcore/sound-file.c5
-rw-r--r--src/polypcore/sound-file.h2
-rw-r--r--src/polypcore/source-output.c7
-rw-r--r--src/polypcore/source-output.h10
-rw-r--r--src/polypcore/source.c11
-rw-r--r--src/polypcore/source.h13
-rw-r--r--src/polypcore/strbuf.h2
-rw-r--r--src/polypcore/strlist.c7
-rw-r--r--src/polypcore/tagstruct.c3
-rw-r--r--src/polypcore/tokenizer.c7
-rw-r--r--src/polypcore/util.c5
-rw-r--r--src/polypcore/util.h2
-rw-r--r--src/polypcore/x11wrap.c9
-rw-r--r--src/polypcore/x11wrap.h2
-rw-r--r--src/polypcore/xmalloc.c7
101 files changed, 422 insertions, 358 deletions
diff --git a/src/polypcore/authkey-prop.c b/src/polypcore/authkey-prop.c
index 8657f5a5..3faf0ef1 100644
--- a/src/polypcore/authkey-prop.c
+++ b/src/polypcore/authkey-prop.c
@@ -22,10 +22,11 @@
#include <assert.h>
#include <string.h>
-#include "xmalloc.h"
+#include <polypcore/xmalloc.h>
+#include <polypcore/props.h>
+#include <polypcore/log.h>
+
#include "authkey-prop.h"
-#include "props.h"
-#include "log.h"
struct authkey_data {
int ref;
diff --git a/src/polypcore/authkey-prop.h b/src/polypcore/authkey-prop.h
index 29b40bb2..63fde5d8 100644
--- a/src/polypcore/authkey-prop.h
+++ b/src/polypcore/authkey-prop.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "core.h"
+#include <polypcore/core.h>
/* The authkey-prop uses a central property to store a previously
* loaded cookie in memory. Useful for sharing the same cookie between
diff --git a/src/polypcore/authkey.c b/src/polypcore/authkey.c
index 969f09d9..e3fc9f60 100644
--- a/src/polypcore/authkey.c
+++ b/src/polypcore/authkey.c
@@ -35,10 +35,11 @@
#include <limits.h>
#include <sys/stat.h>
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+#include <polypcore/random.h>
+
#include "authkey.h"
-#include "util.h"
-#include "log.h"
-#include "random.h"
/* Generate a new authorization key, store it in file fd and return it in *data */
static int generate(int fd, void *ret_data, size_t length) {
diff --git a/src/polypcore/autoload.c b/src/polypcore/autoload.c
index 83df8ef7..8d2dca30 100644
--- a/src/polypcore/autoload.c
+++ b/src/polypcore/autoload.c
@@ -27,14 +27,15 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/module.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/memchunk.h>
+#include <polypcore/sound-file.h>
+#include <polypcore/log.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/core-subscribe.h>
+
#include "autoload.h"
-#include "module.h"
-#include "xmalloc.h"
-#include "memchunk.h"
-#include "sound-file.h"
-#include "log.h"
-#include "core-scache.h"
-#include "core-subscribe.h"
static void entry_free(pa_autoload_entry *e) {
assert(e);
diff --git a/src/polypcore/autoload.h b/src/polypcore/autoload.h
index 7350c16a..a8931fc7 100644
--- a/src/polypcore/autoload.h
+++ b/src/polypcore/autoload.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "namereg.h"
+#include <polypcore/namereg.h>
/* Using the autoloading facility, modules by be loaded on-demand and
* synchronously. The user may register a "ghost sink" or "ghost
diff --git a/src/polypcore/cli-command.c b/src/polypcore/cli-command.c
index dd4cbe46..6c9fc4b1 100644
--- a/src/polypcore/cli-command.c
+++ b/src/polypcore/cli-command.c
@@ -29,26 +29,27 @@
#include <stdlib.h>
#include <errno.h>
+#include <polypcore/module.h>
+#include <polypcore/sink.h>
+#include <polypcore/source.h>
+#include <polypcore/client.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/source-output.h>
+#include <polypcore/tokenizer.h>
+#include <polypcore/strbuf.h>
+#include <polypcore/namereg.h>
+#include <polypcore/cli-text.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/sound-file.h>
+#include <polypcore/play-memchunk.h>
+#include <polypcore/autoload.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/sound-file-stream.h>
+#include <polypcore/props.h>
+#include <polypcore/util.h>
+
#include "cli-command.h"
-#include "module.h"
-#include "sink.h"
-#include "source.h"
-#include "client.h"
-#include "sink-input.h"
-#include "source-output.h"
-#include "tokenizer.h"
-#include "strbuf.h"
-#include "namereg.h"
-#include "cli-text.h"
-#include "core-scache.h"
-#include "sample-util.h"
-#include "sound-file.h"
-#include "play-memchunk.h"
-#include "autoload.h"
-#include "xmalloc.h"
-#include "sound-file-stream.h"
-#include "props.h"
-#include "util.h"
struct command {
const char *name;
diff --git a/src/polypcore/cli-command.h b/src/polypcore/cli-command.h
index 78b8d5c6..e7c70ecf 100644
--- a/src/polypcore/cli-command.h
+++ b/src/polypcore/cli-command.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "strbuf.h"
-#include "core.h"
+#include <polypcore/strbuf.h>
+#include <polypcore/core.h>
/* Execute a single CLI command. Write the results to the string
* buffer *buf. If *fail is non-zero the function will return -1 when
diff --git a/src/polypcore/cli-text.c b/src/polypcore/cli-text.c
index d8446b06..8bffd0a7 100644
--- a/src/polypcore/cli-text.c
+++ b/src/polypcore/cli-text.c
@@ -26,19 +26,20 @@
#include <assert.h>
#include <string.h>
-#include "cli-text.h"
-#include "module.h"
-#include "client.h"
-#include "sink.h"
-#include "source.h"
-#include "sink-input.h"
-#include "source-output.h"
-#include "strbuf.h"
-#include "sample-util.h"
-#include "core-scache.h"
-#include "autoload.h"
-#include "xmalloc.h"
#include <polyp/volume.h>
+#include <polypcore/module.h>
+#include <polypcore/client.h>
+#include <polypcore/sink.h>
+#include <polypcore/source.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/source-output.h>
+#include <polypcore/strbuf.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/autoload.h>
+#include <polypcore/xmalloc.h>
+
+#include "cli-text.h"
char *pa_module_list_to_string(pa_core *c) {
pa_strbuf *s;
diff --git a/src/polypcore/cli-text.h b/src/polypcore/cli-text.h
index 7a1a0361..a8f40003 100644
--- a/src/polypcore/cli-text.h
+++ b/src/polypcore/cli-text.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "core.h"
+#include <polypcore/core.h>
/* Some functions to generate pretty formatted listings of
* entities. The returned strings have to be freed manually. */
diff --git a/src/polypcore/cli.c b/src/polypcore/cli.c
index bc0c285d..295ce625 100644
--- a/src/polypcore/cli.c
+++ b/src/polypcore/cli.c
@@ -28,21 +28,22 @@
#include <assert.h>
#include <stdlib.h>
-#include "ioline.h"
+#include <polypcore/ioline.h>
+#include <polypcore/module.h>
+#include <polypcore/sink.h>
+#include <polypcore/source.h>
+#include <polypcore/client.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/source-output.h>
+#include <polypcore/tokenizer.h>
+#include <polypcore/strbuf.h>
+#include <polypcore/namereg.h>
+#include <polypcore/cli-text.h>
+#include <polypcore/cli-command.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "cli.h"
-#include "module.h"
-#include "sink.h"
-#include "source.h"
-#include "client.h"
-#include "sink-input.h"
-#include "source-output.h"
-#include "tokenizer.h"
-#include "strbuf.h"
-#include "namereg.h"
-#include "cli-text.h"
-#include "cli-command.h"
-#include "xmalloc.h"
-#include "log.h"
#define PROMPT ">>> "
diff --git a/src/polypcore/cli.h b/src/polypcore/cli.h
index 03f31c22..12ffd848 100644
--- a/src/polypcore/cli.h
+++ b/src/polypcore/cli.h
@@ -22,9 +22,9 @@
USA.
***/
-#include "iochannel.h"
-#include "core.h"
-#include "module.h"
+#include <polypcore/iochannel.h>
+#include <polypcore/core.h>
+#include <polypcore/module.h>
typedef struct pa_cli pa_cli;
diff --git a/src/polypcore/client.c b/src/polypcore/client.c
index 9b256794..7fe5a9fc 100644
--- a/src/polypcore/client.c
+++ b/src/polypcore/client.c
@@ -28,10 +28,11 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+
#include "client.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
pa_client *pa_client_new(pa_core *core, const char *name, const char *driver) {
pa_client *c;
diff --git a/src/polypcore/client.h b/src/polypcore/client.h
index 92430338..8ddc6d94 100644
--- a/src/polypcore/client.h
+++ b/src/polypcore/client.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "core.h"
-#include "module.h"
+#include <polypcore/core.h>
+#include <polypcore/module.h>
/* Every connection to the server should have a pa_client
* attached. That way the user may generate a listing of all connected
diff --git a/src/polypcore/conf-parser.c b/src/polypcore/conf-parser.c
index 507f2bf1..7eeda02b 100644
--- a/src/polypcore/conf-parser.c
+++ b/src/polypcore/conf-parser.c
@@ -28,10 +28,11 @@
#include <stdio.h>
#include <errno.h>
+#include <polypcore/log.h>
+#include <polypcore/util.h>
+#include <polypcore/xmalloc.h>
+
#include "conf-parser.h"
-#include "log.h"
-#include "util.h"
-#include "xmalloc.h"
#define WHITESPACE " \t\n"
#define COMMENTS "#;\n"
diff --git a/src/polypcore/core-scache.c b/src/polypcore/core-scache.c
index 0d926aba..69199a33 100644
--- a/src/polypcore/core-scache.c
+++ b/src/polypcore/core-scache.c
@@ -41,19 +41,20 @@
#include <windows.h>
#endif
-#include "core-scache.h"
-#include "sink-input.h"
#include <polyp/mainloop.h>
-#include "sample-util.h"
-#include "play-memchunk.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "namereg.h"
-#include "sound-file.h"
-#include "util.h"
-#include "log.h"
#include <polyp/channelmap.h>
#include <polyp/volume.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/play-memchunk.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/namereg.h>
+#include <polypcore/sound-file.h>
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+
+#include "core-scache.h"
#define UNLOAD_POLL_TIME 2
diff --git a/src/polypcore/core-scache.h b/src/polypcore/core-scache.h
index 0918ebe4..a383e50a 100644
--- a/src/polypcore/core-scache.h
+++ b/src/polypcore/core-scache.h
@@ -22,9 +22,9 @@
USA.
***/
-#include "core.h"
-#include "memchunk.h"
-#include "sink.h"
+#include <polypcore/core.h>
+#include <polypcore/memchunk.h>
+#include <polypcore/sink.h>
typedef struct pa_scache_entry {
pa_core *core;
diff --git a/src/polypcore/core-subscribe.c b/src/polypcore/core-subscribe.c
index 2a258604..4d792966 100644
--- a/src/polypcore/core-subscribe.c
+++ b/src/polypcore/core-subscribe.c
@@ -26,10 +26,11 @@
#include <stdio.h>
#include <assert.h>
-#include "queue.h"
+#include <polypcore/queue.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "core-subscribe.h"
-#include "xmalloc.h"
-#include "log.h"
/* The subscription subsystem may be used to be notified whenever an
* entity (sink, source, ...) is created or deleted. Modules may
diff --git a/src/polypcore/core-subscribe.h b/src/polypcore/core-subscribe.h
index bc9dcba3..7c856954 100644
--- a/src/polypcore/core-subscribe.h
+++ b/src/polypcore/core-subscribe.h
@@ -25,8 +25,8 @@
typedef struct pa_subscription pa_subscription;
typedef struct pa_subscription_event pa_subscription_event;
-#include "core.h"
-#include "native-common.h"
+#include <polypcore/core.h>
+#include <polypcore/native-common.h>
pa_subscription* pa_subscription_new(pa_core *c, pa_subscription_mask_t m, void (*callback)(pa_core *c, pa_subscription_event_type_t t, uint32_t index, void *userdata), void *userdata);
void pa_subscription_free(pa_subscription*s);
diff --git a/src/polypcore/core.c b/src/polypcore/core.c
index 9d040e68..0093aebd 100644
--- a/src/polypcore/core.c
+++ b/src/polypcore/core.c
@@ -28,18 +28,19 @@
#include <stdio.h>
#include <signal.h>
+#include <polypcore/module.h>
+#include <polypcore/sink.h>
+#include <polypcore/source.h>
+#include <polypcore/namereg.h>
+#include <polypcore/util.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/autoload.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/props.h>
+#include <polypcore/random.h>
+
#include "core.h"
-#include "module.h"
-#include "sink.h"
-#include "source.h"
-#include "namereg.h"
-#include "util.h"
-#include "core-scache.h"
-#include "autoload.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "props.h"
-#include "random.h"
pa_core* pa_core_new(pa_mainloop_api *m) {
pa_core* c;
diff --git a/src/polypcore/core.h b/src/polypcore/core.h
index 29329025..a323ae8e 100644
--- a/src/polypcore/core.h
+++ b/src/polypcore/core.h
@@ -24,14 +24,14 @@
typedef struct pa_core pa_core;
-#include "idxset.h"
-#include "hashmap.h"
+#include <polypcore/idxset.h>
+#include <polypcore/hashmap.h>
#include <polyp/mainloop-api.h>
#include <polyp/sample.h>
-#include "memblock.h"
-#include "resampler.h"
-#include "queue.h"
-#include "core-subscribe.h"
+#include <polypcore/memblock.h>
+#include <polypcore/resampler.h>
+#include <polypcore/queue.h>
+#include <polypcore/core-subscribe.h>
/* The core structure of polypaudio. Every polypaudio daemon contains
* exactly one of these. It is used for storing kind of global
diff --git a/src/polypcore/dynarray.c b/src/polypcore/dynarray.c
index 435fd768..1aff7f51 100644
--- a/src/polypcore/dynarray.c
+++ b/src/polypcore/dynarray.c
@@ -27,8 +27,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/xmalloc.h>
+
#include "dynarray.h"
-#include "xmalloc.h"
/* If the array becomes to small, increase its size by 100 entries */
#define INCREASE_BY 100
diff --git a/src/polypcore/hashmap.c b/src/polypcore/hashmap.c
index a37decb8..8861fd3d 100644
--- a/src/polypcore/hashmap.c
+++ b/src/polypcore/hashmap.c
@@ -27,10 +27,11 @@
#include <assert.h>
#include <string.h>
+#include <polypcore/idxset.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "hashmap.h"
-#include "idxset.h"
-#include "xmalloc.h"
-#include "log.h"
#define BUCKETS 1023
diff --git a/src/polypcore/idxset.c b/src/polypcore/idxset.c
index 409d1fab..8d3a2370 100644
--- a/src/polypcore/idxset.c
+++ b/src/polypcore/idxset.c
@@ -28,8 +28,9 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+
#include "idxset.h"
-#include "xmalloc.h"
typedef struct idxset_entry {
void *data;
diff --git a/src/polypcore/iochannel.c b/src/polypcore/iochannel.c
index 273d47e0..7fd09152 100644
--- a/src/polypcore/iochannel.c
+++ b/src/polypcore/iochannel.c
@@ -30,10 +30,11 @@
#include "winsock.h"
+#include <polypcore/util.h>
+#include <polypcore/socket-util.h>
+#include <polypcore/xmalloc.h>
+
#include "iochannel.h"
-#include "util.h"
-#include "socket-util.h"
-#include "xmalloc.h"
struct pa_iochannel {
int ifd, ofd;
diff --git a/src/polypcore/ioline.c b/src/polypcore/ioline.c
index 5b669f5c..3f2de5a2 100644
--- a/src/polypcore/ioline.c
+++ b/src/polypcore/ioline.c
@@ -29,9 +29,10 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "ioline.h"
-#include "xmalloc.h"
-#include "log.h"
#define BUFFER_LIMIT (64*1024)
#define READ_SIZE (1024)
diff --git a/src/polypcore/ioline.h b/src/polypcore/ioline.h
index 84ccb47a..e2dadf55 100644
--- a/src/polypcore/ioline.h
+++ b/src/polypcore/ioline.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "iochannel.h"
-#include "util.h"
+#include <polypcore/iochannel.h>
+#include <polypcore/util.h>
/* An ioline wraps an iochannel for line based communication. A
* callback function is called whenever a new line has been recieved
diff --git a/src/polypcore/log.c b/src/polypcore/log.c
index 97406f79..c7bf7be9 100644
--- a/src/polypcore/log.c
+++ b/src/polypcore/log.c
@@ -31,9 +31,10 @@
#include <syslog.h>
#endif
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+
#include "log.h"
-#include "xmalloc.h"
-#include "util.h"
#define ENV_LOGLEVEL "POLYP_LOG"
diff --git a/src/polypcore/log.h b/src/polypcore/log.h
index ce8aea98..c306acaf 100644
--- a/src/polypcore/log.h
+++ b/src/polypcore/log.h
@@ -23,7 +23,7 @@
***/
#include <stdarg.h>
-#include "gccmacro.h"
+#include <polypcore/gccmacro.h>
/* A simple logging subsystem */
diff --git a/src/polypcore/mcalign.c b/src/polypcore/mcalign.c
index 4d765625..0f229e28 100644
--- a/src/polypcore/mcalign.c
+++ b/src/polypcore/mcalign.c
@@ -28,8 +28,9 @@
#include <assert.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+
#include "mcalign.h"
-#include "xmalloc.h"
struct pa_mcalign {
size_t base;
diff --git a/src/polypcore/mcalign.h b/src/polypcore/mcalign.h
index 5de75bc7..a9107e0e 100644
--- a/src/polypcore/mcalign.h
+++ b/src/polypcore/mcalign.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "memblock.h"
-#include "memchunk.h"
+#include <polypcore/memblock.h>
+#include <polypcore/memchunk.h>
/* An alignment object, used for aligning memchunks to multiples of
* the frame size. */
diff --git a/src/polypcore/memblock.c b/src/polypcore/memblock.c
index 8da53525..2c0bef57 100644
--- a/src/polypcore/memblock.c
+++ b/src/polypcore/memblock.c
@@ -28,8 +28,9 @@
#include <assert.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+
#include "memblock.h"
-#include "xmalloc.h"
static void stat_add(pa_memblock*m, pa_memblock_stat *s) {
assert(m);
diff --git a/src/polypcore/memblockq.c b/src/polypcore/memblockq.c
index ba6b76ea..4a0225e5 100644
--- a/src/polypcore/memblockq.c
+++ b/src/polypcore/memblockq.c
@@ -30,10 +30,11 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+#include <polypcore/mcalign.h>
+
#include "memblockq.h"
-#include "xmalloc.h"
-#include "log.h"
-#include "mcalign.h"
struct memblock_list {
struct memblock_list *next, *prev;
diff --git a/src/polypcore/memblockq.h b/src/polypcore/memblockq.h
index 1695daba..7bb25f90 100644
--- a/src/polypcore/memblockq.h
+++ b/src/polypcore/memblockq.h
@@ -24,8 +24,8 @@
#include <sys/types.h>
-#include "memblock.h"
-#include "memchunk.h"
+#include <polypcore/memblock.h>
+#include <polypcore/memchunk.h>
/* A memblockq is a queue of pa_memchunks (yepp, the name is not
* perfect). It is similar to the ring buffers used by most other
diff --git a/src/polypcore/memchunk.c b/src/polypcore/memchunk.c
index bfd74f9e..d6856ab8 100644
--- a/src/polypcore/memchunk.c
+++ b/src/polypcore/memchunk.c
@@ -28,8 +28,9 @@
#include <assert.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+
#include "memchunk.h"
-#include "xmalloc.h"
void pa_memchunk_make_writable(pa_memchunk *c, pa_memblock_stat *s, size_t min) {
pa_memblock *n;
diff --git a/src/polypcore/memchunk.h b/src/polypcore/memchunk.h
index 4eefc8c1..3ddb28ee 100644
--- a/src/polypcore/memchunk.h
+++ b/src/polypcore/memchunk.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "memblock.h"
+#include <polypcore/memblock.h>
/* A memchunk describes a part of a memblock. In contrast to the memblock, a
* memchunk is not allocated dynamically or reference counted, instead
diff --git a/src/polypcore/modargs.c b/src/polypcore/modargs.c
index 07062946..6bd13c3b 100644
--- a/src/polypcore/modargs.c
+++ b/src/polypcore/modargs.c
@@ -28,15 +28,16 @@
#include <stdlib.h>
#include <string.h>
-#include "hashmap.h"
+#include <polypcore/hashmap.h>
+#include <polypcore/idxset.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/namereg.h>
+#include <polypcore/sink.h>
+#include <polypcore/source.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+
#include "modargs.h"
-#include "idxset.h"
-#include "sample-util.h"
-#include "namereg.h"
-#include "sink.h"
-#include "source.h"
-#include "xmalloc.h"
-#include "util.h"
struct entry {
char *key, *value;
diff --git a/src/polypcore/modargs.h b/src/polypcore/modargs.h
index 678ea1a7..47e2d522 100644
--- a/src/polypcore/modargs.h
+++ b/src/polypcore/modargs.h
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <polyp/sample.h>
-#include "core.h"
+#include <polypcore/core.h>
typedef struct pa_modargs pa_modargs;
diff --git a/src/polypcore/modinfo.c b/src/polypcore/modinfo.c
index 53440612..4204bb34 100644
--- a/src/polypcore/modinfo.c
+++ b/src/polypcore/modinfo.c
@@ -26,10 +26,11 @@
#include <ltdl.h>
#include <assert.h>
-#include "xmalloc.h"
-#include "util.h"
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+
#include "modinfo.h"
-#include "log.h"
#define PA_SYMBOL_AUTHOR "pa__get_author"
#define PA_SYMBOL_DESCRIPTION "pa__get_description"
diff --git a/src/polypcore/module.c b/src/polypcore/module.c
index 73ec5bd4..75385354 100644
--- a/src/polypcore/module.c
+++ b/src/polypcore/module.c
@@ -30,11 +30,12 @@
#include <string.h>
#include <errno.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+#include <polypcore/util.h>
+
#include "module.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
-#include "util.h"
#define PA_SYMBOL_INIT "pa__init"
#define PA_SYMBOL_DONE "pa__done"
diff --git a/src/polypcore/module.h b/src/polypcore/module.h
index 6f137c15..03b9bc87 100644
--- a/src/polypcore/module.h
+++ b/src/polypcore/module.h
@@ -25,8 +25,8 @@
#include <inttypes.h>
#include <ltdl.h>
-#include "core.h"
-#include "modinfo.h"
+#include <polypcore/core.h>
+#include <polypcore/modinfo.h>
typedef struct pa_module pa_module;
diff --git a/src/polypcore/namereg.c b/src/polypcore/namereg.c
index ca03c455..d4dbd14b 100644
--- a/src/polypcore/namereg.c
+++ b/src/polypcore/namereg.c
@@ -29,13 +29,14 @@
#include <string.h>
#include <stdio.h>
+#include <polypcore/autoload.h>
+#include <polypcore/source.h>
+#include <polypcore/sink.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/util.h>
+
#include "namereg.h"
-#include "autoload.h"
-#include "source.h"
-#include "sink.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "util.h"
struct namereg_entry {
pa_namereg_type_t type;
diff --git a/src/polypcore/namereg.h b/src/polypcore/namereg.h
index 961fd44b..a98295ff 100644
--- a/src/polypcore/namereg.h
+++ b/src/polypcore/namereg.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "core.h"
+#include <polypcore/core.h>
typedef enum pa_namereg_type {
PA_NAMEREG_SINK,
diff --git a/src/polypcore/packet.c b/src/polypcore/packet.c
index b3a2e074..41803cf9 100644
--- a/src/polypcore/packet.c
+++ b/src/polypcore/packet.c
@@ -26,8 +26,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/xmalloc.h>
+
#include "packet.h"
-#include "xmalloc.h"
pa_packet* pa_packet_new(size_t length) {
pa_packet *p;
diff --git a/src/polypcore/parseaddr.c b/src/polypcore/parseaddr.c
index 5e4c689c..c2b25c89 100644
--- a/src/polypcore/parseaddr.c
+++ b/src/polypcore/parseaddr.c
@@ -27,8 +27,9 @@
#include <assert.h>
#include <stdlib.h>
-#include "xmalloc.h"
-#include "util.h"
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+
#include "parseaddr.h"
/* Parse addresses in one of the following forms:
diff --git a/src/polypcore/pdispatch.c b/src/polypcore/pdispatch.c
index 5a50a0d5..7941e4a8 100644
--- a/src/polypcore/pdispatch.c
+++ b/src/polypcore/pdispatch.c
@@ -27,12 +27,13 @@
#include <stdlib.h>
#include <assert.h>
+#include <polypcore/native-common.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/llist.h>
+#include <polypcore/log.h>
+#include <polypcore/util.h>
+
#include "pdispatch.h"
-#include "native-common.h"
-#include "xmalloc.h"
-#include "llist.h"
-#include "log.h"
-#include "util.h"
/*#define DEBUG_OPCODES */
diff --git a/src/polypcore/pdispatch.h b/src/polypcore/pdispatch.h
index fdd4d7f5..57666259 100644
--- a/src/polypcore/pdispatch.h
+++ b/src/polypcore/pdispatch.h
@@ -23,9 +23,9 @@
***/
#include <inttypes.h>
-#include "tagstruct.h"
-#include "packet.h"
#include <polyp/mainloop-api.h>
+#include <polypcore/tagstruct.h>
+#include <polypcore/packet.h>
typedef struct pa_pdispatch pa_pdispatch;
diff --git a/src/polypcore/pid.c b/src/polypcore/pid.c
index ae3dc7f5..3f33365a 100644
--- a/src/polypcore/pid.c
+++ b/src/polypcore/pid.c
@@ -39,9 +39,10 @@
#include <windows.h>
#endif
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+
#include "pid.h"
-#include "util.h"
-#include "log.h"
/* Read the PID data from the file descriptor fd, and return it. If no
* pid could be read, return 0, on failure (pid_t) -1 */
diff --git a/src/polypcore/play-memchunk.c b/src/polypcore/play-memchunk.c
index e24d4427..ec79254b 100644
--- a/src/polypcore/play-memchunk.c
+++ b/src/polypcore/play-memchunk.c
@@ -28,10 +28,11 @@
#include <stdio.h>
#include <string.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/gccmacro.h>
+
#include "play-memchunk.h"
-#include "sink-input.h"
-#include "xmalloc.h"
-#include "gccmacro.h"
static void sink_input_kill(pa_sink_input *i) {
pa_memchunk *c;
diff --git a/src/polypcore/play-memchunk.h b/src/polypcore/play-memchunk.h
index fc0654a6..72aeda95 100644
--- a/src/polypcore/play-memchunk.h
+++ b/src/polypcore/play-memchunk.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "sink.h"
-#include "memchunk.h"
+#include <polypcore/sink.h>
+#include <polypcore/memchunk.h>
int pa_play_memchunk(
pa_sink *sink,
diff --git a/src/polypcore/poll.c b/src/polypcore/poll.c
index 193fc812..6a29a953 100644
--- a/src/polypcore/poll.c
+++ b/src/polypcore/poll.c
@@ -42,7 +42,8 @@
#ifndef HAVE_SYS_POLL_H
-#include "util.h"
+#include <polypcore/util.h>
+
#include "poll.h"
int poll (struct pollfd *fds, unsigned long int nfds, int timeout) {
diff --git a/src/polypcore/props.c b/src/polypcore/props.c
index df748c1e..96cdc4f2 100644
--- a/src/polypcore/props.c
+++ b/src/polypcore/props.c
@@ -21,9 +21,10 @@
#include <assert.h>
-#include "xmalloc.h"
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "props.h"
-#include "log.h"
typedef struct pa_property {
char *name; /* Points to memory allocated by the property subsystem */
diff --git a/src/polypcore/props.h b/src/polypcore/props.h
index 5abf8787..9430db5e 100644
--- a/src/polypcore/props.h
+++ b/src/polypcore/props.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "core.h"
-#include "strbuf.h"
+#include <polypcore/core.h>
+#include <polypcore/strbuf.h>
/* The property subsystem is to be used to share data between
* modules. Consider them to be kind of "global" variables for a
diff --git a/src/polypcore/protocol-cli.c b/src/polypcore/protocol-cli.c
index d2d73550..cb7e8f6f 100644
--- a/src/polypcore/protocol-cli.c
+++ b/src/polypcore/protocol-cli.c
@@ -26,10 +26,11 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/cli.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "protocol-cli.h"
-#include "cli.h"
-#include "xmalloc.h"
-#include "log.h"
/* Don't allow more than this many concurrent connections */
#define MAX_CONNECTIONS 25
diff --git a/src/polypcore/protocol-cli.h b/src/polypcore/protocol-cli.h
index aed733c1..c47b14d6 100644
--- a/src/polypcore/protocol-cli.h
+++ b/src/polypcore/protocol-cli.h
@@ -22,10 +22,10 @@
USA.
***/
-#include "core.h"
-#include "socket-server.h"
-#include "module.h"
-#include "modargs.h"
+#include <polypcore/core.h>
+#include <polypcore/socket-server.h>
+#include <polypcore/module.h>
+#include <polypcore/modargs.h>
typedef struct pa_protocol_cli pa_protocol_cli;
diff --git a/src/polypcore/protocol-esound.c b/src/polypcore/protocol-esound.c
index d2c0f354..a16ac280 100644
--- a/src/polypcore/protocol-esound.c
+++ b/src/polypcore/protocol-esound.c
@@ -30,24 +30,26 @@
#include <stdlib.h>
#include <limits.h>
-#include "protocol-esound.h"
-#include "esound.h"
-#include "memblock.h"
-#include "client.h"
-#include "sink-input.h"
-#include "sink.h"
-#include "source-output.h"
-#include "source.h"
#include <polyp/sample.h>
-#include "core-scache.h"
-#include "sample-util.h"
-#include "authkey.h"
-#include "namereg.h"
-#include "xmalloc.h"
-#include "log.h"
-#include "util.h"
+#include <polypcore/esound.h>
+#include <polypcore/memblock.h>
+#include <polypcore/client.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/sink.h>
+#include <polypcore/source-output.h>
+#include <polypcore/source.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/authkey.h>
+#include <polypcore/namereg.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+#include <polypcore/util.h>
+
#include "endianmacros.h"
+#include "protocol-esound.h"
+
/* Don't accept more connection than this */
#define MAX_CONNECTIONS 10
diff --git a/src/polypcore/protocol-esound.h b/src/polypcore/protocol-esound.h
index 71d58464..a94d1c72 100644
--- a/src/polypcore/protocol-esound.h
+++ b/src/polypcore/protocol-esound.h
@@ -22,10 +22,10 @@
USA.
***/
-#include "core.h"
-#include "socket-server.h"
-#include "module.h"
-#include "modargs.h"
+#include <polypcore/core.h>
+#include <polypcore/socket-server.h>
+#include <polypcore/module.h>
+#include <polypcore/modargs.h>
typedef struct pa_protocol_esound pa_protocol_esound;
diff --git a/src/polypcore/protocol-http.c b/src/polypcore/protocol-http.c
index 3e55df03..f0b78124 100644
--- a/src/polypcore/protocol-http.c
+++ b/src/polypcore/protocol-http.c
@@ -28,12 +28,13 @@
#include <stdio.h>
#include <string.h>
+#include <polypcore/ioline.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+#include <polypcore/namereg.h>
+#include <polypcore/cli-text.h>
+
#include "protocol-http.h"
-#include "ioline.h"
-#include "xmalloc.h"
-#include "log.h"
-#include "namereg.h"
-#include "cli-text.h"
/* Don't allow more than this many concurrent connections */
#define MAX_CONNECTIONS 10
diff --git a/src/polypcore/protocol-http.h b/src/polypcore/protocol-http.h
index 0a1855e9..10dd656b 100644
--- a/src/polypcore/protocol-http.h
+++ b/src/polypcore/protocol-http.h
@@ -22,10 +22,10 @@
USA.
***/
-#include "core.h"
-#include "socket-server.h"
-#include "module.h"
-#include "modargs.h"
+#include <polypcore/core.h>
+#include <polypcore/socket-server.h>
+#include <polypcore/module.h>
+#include <polypcore/modargs.h>
typedef struct pa_protocol_http pa_protocol_http;
diff --git a/src/polypcore/protocol-native.c b/src/polypcore/protocol-native.c
index 31983bc2..1362fdf2 100644
--- a/src/polypcore/protocol-native.c
+++ b/src/polypcore/protocol-native.c
@@ -28,27 +28,28 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/native-common.h>
+#include <polypcore/packet.h>
+#include <polypcore/client.h>
+#include <polypcore/source-output.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/pstream.h>
+#include <polypcore/tagstruct.h>
+#include <polypcore/pdispatch.h>
+#include <polypcore/pstream-util.h>
+#include <polypcore/authkey.h>
+#include <polypcore/namereg.h>
+#include <polypcore/core-scache.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+#include <polypcore/autoload.h>
+#include <polypcore/authkey-prop.h>
+#include <polypcore/strlist.h>
+#include <polypcore/props.h>
+
#include "protocol-native.h"
-#include "native-common.h"
-#include "packet.h"
-#include "client.h"
-#include "source-output.h"
-#include "sink-input.h"
-#include "pstream.h"
-#include "tagstruct.h"
-#include "pdispatch.h"
-#include "pstream-util.h"
-#include "authkey.h"
-#include "namereg.h"
-#include "core-scache.h"
-#include "xmalloc.h"
-#include "util.h"
-#include "core-subscribe.h"
-#include "log.h"
-#include "autoload.h"
-#include "authkey-prop.h"
-#include "strlist.h"
-#include "props.h"
/* Kick a client if it doesn't authenticate within this time */
#define AUTH_TIMEOUT 5
diff --git a/src/polypcore/protocol-native.h b/src/polypcore/protocol-native.h
index 12e85d0b..88aa8494 100644
--- a/src/polypcore/protocol-native.h
+++ b/src/polypcore/protocol-native.h
@@ -22,10 +22,10 @@
USA.
***/
-#include "core.h"
-#include "socket-server.h"
-#include "module.h"
-#include "modargs.h"
+#include <polypcore/core.h>
+#include <polypcore/socket-server.h>
+#include <polypcore/module.h>
+#include <polypcore/modargs.h>
typedef struct pa_protocol_native pa_protocol_native;
diff --git a/src/polypcore/protocol-simple.c b/src/polypcore/protocol-simple.c
index 113919b3..4d3f8e1d 100644
--- a/src/polypcore/protocol-simple.c
+++ b/src/polypcore/protocol-simple.c
@@ -30,14 +30,15 @@
#include <errno.h>
#include <string.h>
-#include "sink-input.h"
-#include "source-output.h"
+#include <polypcore/sink-input.h>
+#include <polypcore/source-output.h>
+#include <polypcore/client.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/namereg.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "protocol-simple.h"
-#include "client.h"
-#include "sample-util.h"
-#include "namereg.h"
-#include "xmalloc.h"
-#include "log.h"
/* Don't allow more than this many concurrent connections */
#define MAX_CONNECTIONS 10
diff --git a/src/polypcore/protocol-simple.h b/src/polypcore/protocol-simple.h
index 63455a53..f11c7759 100644
--- a/src/polypcore/protocol-simple.h
+++ b/src/polypcore/protocol-simple.h
@@ -22,10 +22,10 @@
USA.
***/
-#include "socket-server.h"
-#include "module.h"
-#include "core.h"
-#include "modargs.h"
+#include <polypcore/socket-server.h>
+#include <polypcore/module.h>
+#include <polypcore/core.h>
+#include <polypcore/modargs.h>
typedef struct pa_protocol_simple pa_protocol_simple;
diff --git a/src/polypcore/pstream-util.c b/src/polypcore/pstream-util.c
index ecd63d15..62986456 100644
--- a/src/polypcore/pstream-util.c
+++ b/src/polypcore/pstream-util.c
@@ -25,7 +25,8 @@
#include <assert.h>
-#include "native-common.h"
+#include <polypcore/native-common.h>
+
#include "pstream-util.h"
void pa_pstream_send_tagstruct(pa_pstream *p, pa_tagstruct *t) {
diff --git a/src/polypcore/pstream-util.h b/src/polypcore/pstream-util.h
index 601a9e99..c400c6d8 100644
--- a/src/polypcore/pstream-util.h
+++ b/src/polypcore/pstream-util.h
@@ -23,8 +23,8 @@
***/
#include <inttypes.h>
-#include "pstream.h"
-#include "tagstruct.h"
+#include <polypcore/pstream.h>
+#include <polypcore/tagstruct.h>
/* The tagstruct is freed!*/
void pa_pstream_send_tagstruct(pa_pstream *p, pa_tagstruct *t);
diff --git a/src/polypcore/pstream.c b/src/polypcore/pstream.c
index bd00ba4f..eec93a0f 100644
--- a/src/polypcore/pstream.c
+++ b/src/polypcore/pstream.c
@@ -34,10 +34,11 @@
#include "winsock.h"
+#include <polypcore/queue.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "pstream.h"
-#include "queue.h"
-#include "xmalloc.h"
-#include "log.h"
typedef enum pa_pstream_descriptor_index {
PA_PSTREAM_DESCRIPTOR_LENGTH,
diff --git a/src/polypcore/pstream.h b/src/polypcore/pstream.h
index ec63a98e..10ce58f6 100644
--- a/src/polypcore/pstream.h
+++ b/src/polypcore/pstream.h
@@ -24,11 +24,11 @@
#include <inttypes.h>
-#include "packet.h"
-#include "memblock.h"
-#include "iochannel.h"
#include <polyp/mainloop-api.h>
-#include "memchunk.h"
+#include <polypcore/packet.h>
+#include <polypcore/memblock.h>
+#include <polypcore/iochannel.h>
+#include <polypcore/memchunk.h>
typedef struct pa_pstream pa_pstream;
diff --git a/src/polypcore/queue.c b/src/polypcore/queue.c
index 80ec0068..77ca1ed3 100644
--- a/src/polypcore/queue.c
+++ b/src/polypcore/queue.c
@@ -26,8 +26,9 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/xmalloc.h>
+
#include "queue.h"
-#include "xmalloc.h"
struct queue_entry {
struct queue_entry *next;
diff --git a/src/polypcore/random.c b/src/polypcore/random.c
index 12f27bfd..756c3218 100644
--- a/src/polypcore/random.c
+++ b/src/polypcore/random.c
@@ -31,9 +31,10 @@
#include <assert.h>
#include <time.h>
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+
#include "random.h"
-#include "util.h"
-#include "log.h"
#ifndef OS_IS_WIN32
#define RANDOM_DEVICE "/dev/urandom"
diff --git a/src/polypcore/resampler.c b/src/polypcore/resampler.c
index 0417e44e..c1740bf1 100644
--- a/src/polypcore/resampler.c
+++ b/src/polypcore/resampler.c
@@ -30,10 +30,11 @@
#include <liboil/liboilfuncs.h>
#include <liboil/liboil.h>
+#include <polypcore/sconv.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "resampler.h"
-#include "sconv.h"
-#include "xmalloc.h"
-#include "log.h"
struct pa_resampler {
pa_resample_method_t resample_method;
diff --git a/src/polypcore/resampler.h b/src/polypcore/resampler.h
index cad48be5..2f4d3cbe 100644
--- a/src/polypcore/resampler.h
+++ b/src/polypcore/resampler.h
@@ -25,9 +25,9 @@
#include <samplerate.h>
#include <polyp/sample.h>
-#include "memblock.h"
-#include "memchunk.h"
#include <polyp/channelmap.h>
+#include <polypcore/memblock.h>
+#include <polypcore/memchunk.h>
typedef struct pa_resampler pa_resampler;
diff --git a/src/polypcore/sample-util.c b/src/polypcore/sample-util.c
index 52974c46..e3bb4aa6 100644
--- a/src/polypcore/sample-util.c
+++ b/src/polypcore/sample-util.c
@@ -30,7 +30,8 @@
#include <liboil/liboilfuncs.h>
-#include "log.h"
+#include <polypcore/log.h>
+
#include "sample-util.h"
pa_memblock *pa_silence_memblock(pa_memblock* b, const pa_sample_spec *spec) {
diff --git a/src/polypcore/sample-util.h b/src/polypcore/sample-util.h
index d0efbcc4..486d284b 100644
--- a/src/polypcore/sample-util.h
+++ b/src/polypcore/sample-util.h
@@ -23,9 +23,9 @@
***/
#include <polyp/sample.h>
-#include "memblock.h"
-#include "memchunk.h"
#include <polyp/volume.h>
+#include <polypcore/memblock.h>
+#include <polypcore/memchunk.h>
pa_memblock *pa_silence_memblock(pa_memblock* b, const pa_sample_spec *spec);
void pa_silence_memchunk(pa_memchunk *c, const pa_sample_spec *spec);
diff --git a/src/polypcore/sconv-s16le.c b/src/polypcore/sconv-s16le.c
index e47c5e8e..0814c35b 100644
--- a/src/polypcore/sconv-s16le.c
+++ b/src/polypcore/sconv-s16le.c
@@ -28,10 +28,12 @@
#include <liboil/liboilfuncs.h>
+#include <polypcore/sconv.h>
+#include <polypcore/log.h>
+
#include "endianmacros.h"
-#include "sconv.h"
+
#include "sconv-s16le.h"
-#include "log.h"
#ifndef INT16_FROM
#define INT16_FROM INT16_FROM_LE
diff --git a/src/polypcore/sconv.c b/src/polypcore/sconv.c
index 1fcb5a0c..c557be67 100644
--- a/src/polypcore/sconv.c
+++ b/src/polypcore/sconv.c
@@ -30,13 +30,14 @@
#include <liboil/liboilfuncs.h>
#include <liboil/liboil.h>
-#include "endianmacros.h"
-#include "sconv.h"
-#include "g711.h"
+#include <polypcore/g711.h>
+#include "endianmacros.h"
#include "sconv-s16le.h"
#include "sconv-s16be.h"
+#include "sconv.h"
+
static void u8_to_float32ne(unsigned n, const void *a, float *b) {
const uint8_t *ca = a;
static const double add = -128.0/127.0, factor = 1.0/127.0;
diff --git a/src/polypcore/sink-input.c b/src/polypcore/sink-input.c
index 696c47a4..1dc7df0f 100644
--- a/src/polypcore/sink-input.c
+++ b/src/polypcore/sink-input.c
@@ -28,11 +28,12 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+
#include "sink-input.h"
-#include "sample-util.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
#define CONVERT_BUFFER_LENGTH 4096
diff --git a/src/polypcore/sink-input.h b/src/polypcore/sink-input.h
index a5ad1958..e4b8bda4 100644
--- a/src/polypcore/sink-input.h
+++ b/src/polypcore/sink-input.h
@@ -26,12 +26,12 @@
typedef struct pa_sink_input pa_sink_input;
-#include "sink.h"
#include <polyp/sample.h>
-#include "memblockq.h"
-#include "resampler.h"
-#include "module.h"
-#include "client.h"
+#include <polypcore/sink.h>
+#include <polypcore/memblockq.h>
+#include <polypcore/resampler.h>
+#include <polypcore/module.h>
+#include <polypcore/client.h>
typedef enum pa_sink_input_state {
PA_SINK_INPUT_RUNNING,
diff --git a/src/polypcore/sink.c b/src/polypcore/sink.c
index 6c143463..9bc478c3 100644
--- a/src/polypcore/sink.c
+++ b/src/polypcore/sink.c
@@ -28,15 +28,16 @@
#include <string.h>
#include <stdio.h>
-#include "sink.h"
-#include "sink-input.h"
-#include "namereg.h"
-#include "util.h"
-#include "sample-util.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
#include <polyp/introspect.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/namereg.h>
+#include <polypcore/util.h>
+#include <polypcore/sample-util.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+
+#include "sink.h"
#define MAX_MIX_CHANNELS 32
diff --git a/src/polypcore/sink.h b/src/polypcore/sink.h
index 268461ef..5fd9784f 100644
--- a/src/polypcore/sink.h
+++ b/src/polypcore/sink.h
@@ -26,13 +26,13 @@
typedef struct pa_sink pa_sink;
-#include "core.h"
#include <polyp/sample.h>
-#include "idxset.h"
-#include "source.h"
#include <polyp/channelmap.h>
-#include "module.h"
#include <polyp/volume.h>
+#include <polypcore/core.h>
+#include <polypcore/idxset.h>
+#include <polypcore/source.h>
+#include <polypcore/module.h>
#define PA_MAX_INPUTS_PER_SINK 6
diff --git a/src/polypcore/sioman.c b/src/polypcore/sioman.c
index 8d7b136c..b389ecee 100644
--- a/src/polypcore/sioman.c
+++ b/src/polypcore/sioman.c
@@ -24,6 +24,7 @@
#endif
#include <assert.h>
+
#include "sioman.h"
static int stdio_inuse = 0;
diff --git a/src/polypcore/socket-client.c b/src/polypcore/socket-client.c
index 29c9775e..3662e89c 100644
--- a/src/polypcore/socket-client.c
+++ b/src/polypcore/socket-client.c
@@ -54,12 +54,13 @@
#include "winsock.h"
+#include <polypcore/socket-util.h>
+#include <polypcore/util.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+#include <polypcore/parseaddr.h>
+
#include "socket-client.h"
-#include "socket-util.h"
-#include "util.h"
-#include "xmalloc.h"
-#include "log.h"
-#include "parseaddr.h"
#define CONNECT_TIMEOUT 5
diff --git a/src/polypcore/socket-client.h b/src/polypcore/socket-client.h
index 624880d7..d0005331 100644
--- a/src/polypcore/socket-client.h
+++ b/src/polypcore/socket-client.h
@@ -25,7 +25,7 @@
#include <inttypes.h>
#include <polyp/mainloop-api.h>
-#include "iochannel.h"
+#include <polypcore/iochannel.h>
struct sockaddr;
diff --git a/src/polypcore/socket-server.c b/src/polypcore/socket-server.c
index 262b32a7..d1646984 100644
--- a/src/polypcore/socket-server.c
+++ b/src/polypcore/socket-server.c
@@ -58,11 +58,12 @@
#include "winsock.h"
+#include <polypcore/socket-util.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/util.h>
+#include <polypcore/log.h>
+
#include "socket-server.h"
-#include "socket-util.h"
-#include "xmalloc.h"
-#include "util.h"
-#include "log.h"
struct pa_socket_server {
int ref;
diff --git a/src/polypcore/socket-server.h b/src/polypcore/socket-server.h
index 4d8bfad5..6bb83427 100644
--- a/src/polypcore/socket-server.h
+++ b/src/polypcore/socket-server.h
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <polyp/mainloop-api.h>
-#include "iochannel.h"
+#include <polypcore/iochannel.h>
/* It is safe to destroy the calling socket_server object from the callback */
diff --git a/src/polypcore/socket-util.c b/src/polypcore/socket-util.c
index 032a3c91..5ffe5302 100644
--- a/src/polypcore/socket-util.c
+++ b/src/polypcore/socket-util.c
@@ -59,10 +59,11 @@
#include "winsock.h"
+#include <polypcore/util.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "socket-util.h"
-#include "util.h"
-#include "xmalloc.h"
-#include "log.h"
void pa_socket_peer_to_string(int fd, char *c, size_t l) {
struct stat st;
diff --git a/src/polypcore/sound-file-stream.c b/src/polypcore/sound-file-stream.c
index 881e3077..644e578f 100644
--- a/src/polypcore/sound-file-stream.c
+++ b/src/polypcore/sound-file-stream.c
@@ -30,10 +30,11 @@
#include <sndfile.h>
+#include <polypcore/sink-input.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "sound-file-stream.h"
-#include "sink-input.h"
-#include "xmalloc.h"
-#include "log.h"
#define BUF_SIZE (1024*10)
diff --git a/src/polypcore/sound-file-stream.h b/src/polypcore/sound-file-stream.h
index 2e56ef49..5effc7f0 100644
--- a/src/polypcore/sound-file-stream.h
+++ b/src/polypcore/sound-file-stream.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "sink.h"
+#include <polypcore/sink.h>
int pa_play_file(pa_sink *sink, const char *fname, const pa_cvolume *volume);
diff --git a/src/polypcore/sound-file.c b/src/polypcore/sound-file.c
index a81c283a..cf23e0ac 100644
--- a/src/polypcore/sound-file.c
+++ b/src/polypcore/sound-file.c
@@ -28,9 +28,10 @@
#include <sndfile.h>
-#include "sound-file.h"
#include <polyp/sample.h>
-#include "log.h"
+#include <polypcore/log.h>
+
+#include "sound-file.h"
#define MAX_FILE_SIZE (1024*1024)
diff --git a/src/polypcore/sound-file.h b/src/polypcore/sound-file.h
index f3003bb9..ffa551b5 100644
--- a/src/polypcore/sound-file.h
+++ b/src/polypcore/sound-file.h
@@ -22,8 +22,8 @@
USA.
***/
-#include "memchunk.h"
#include <polyp/sample.h>
+#include <polypcore/memchunk.h>
int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_memchunk *chunk, pa_memblock_stat *s);
diff --git a/src/polypcore/source-output.c b/src/polypcore/source-output.c
index 9b75a8b0..d6201b4d 100644
--- a/src/polypcore/source-output.c
+++ b/src/polypcore/source-output.c
@@ -28,10 +28,11 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+
#include "source-output.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
pa_source_output* pa_source_output_new(
pa_source *s,
diff --git a/src/polypcore/source-output.h b/src/polypcore/source-output.h
index 4b1cbf15..98f6ab0c 100644
--- a/src/polypcore/source-output.h
+++ b/src/polypcore/source-output.h
@@ -26,12 +26,12 @@
typedef struct pa_source_output pa_source_output;
-#include "source.h"
#include <polyp/sample.h>
-#include "memblockq.h"
-#include "resampler.h"
-#include "module.h"
-#include "client.h"
+#include <polypcore/source.h>
+#include <polypcore/memblockq.h>
+#include <polypcore/resampler.h>
+#include <polypcore/module.h>
+#include <polypcore/client.h>
typedef enum {
PA_SOURCE_OUTPUT_RUNNING,
diff --git a/src/polypcore/source.c b/src/polypcore/source.c
index c64f7b99..b70cb129 100644
--- a/src/polypcore/source.c
+++ b/src/polypcore/source.c
@@ -28,12 +28,13 @@
#include <stdlib.h>
#include <string.h>
+#include <polypcore/source-output.h>
+#include <polypcore/namereg.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/core-subscribe.h>
+#include <polypcore/log.h>
+
#include "source.h"
-#include "source-output.h"
-#include "namereg.h"
-#include "xmalloc.h"
-#include "core-subscribe.h"
-#include "log.h"
pa_source* pa_source_new(
pa_core *core,
diff --git a/src/polypcore/source.h b/src/polypcore/source.h
index be2fb985..a267e73c 100644
--- a/src/polypcore/source.h
+++ b/src/polypcore/source.h
@@ -25,14 +25,15 @@
typedef struct pa_source pa_source;
#include <inttypes.h>
-#include "core.h"
+
#include <polyp/sample.h>
-#include "idxset.h"
-#include "memblock.h"
-#include "memchunk.h"
-#include "sink.h"
#include <polyp/channelmap.h>
-#include "module.h"
+#include <polypcore/core.h>
+#include <polypcore/idxset.h>
+#include <polypcore/memblock.h>
+#include <polypcore/memchunk.h>
+#include <polypcore/sink.h>
+#include <polypcore/module.h>
#define PA_MAX_OUTPUTS_PER_SOURCE 16
diff --git a/src/polypcore/strbuf.h b/src/polypcore/strbuf.h
index a88f5190..4b06a7e6 100644
--- a/src/polypcore/strbuf.h
+++ b/src/polypcore/strbuf.h
@@ -22,7 +22,7 @@
USA.
***/
-#include "gccmacro.h"
+#include <polypcore/gccmacro.h>
typedef struct pa_strbuf pa_strbuf;
diff --git a/src/polypcore/strlist.c b/src/polypcore/strlist.c
index 09eb0c8a..e165aefd 100644
--- a/src/polypcore/strlist.c
+++ b/src/polypcore/strlist.c
@@ -26,10 +26,11 @@
#include <string.h>
#include <assert.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/strbuf.h>
+#include <polypcore/util.h>
+
#include "strlist.h"
-#include "xmalloc.h"
-#include "strbuf.h"
-#include "util.h"
struct pa_strlist {
pa_strlist *next;
diff --git a/src/polypcore/tagstruct.c b/src/polypcore/tagstruct.c
index 676f67de..1f5f370b 100644
--- a/src/polypcore/tagstruct.c
+++ b/src/polypcore/tagstruct.c
@@ -36,8 +36,9 @@
#include "winsock.h"
+#include <polypcore/xmalloc.h>
+
#include "tagstruct.h"
-#include "xmalloc.h"
struct pa_tagstruct {
diff --git a/src/polypcore/tokenizer.c b/src/polypcore/tokenizer.c
index 5e0c1b16..556a190a 100644
--- a/src/polypcore/tokenizer.c
+++ b/src/polypcore/tokenizer.c
@@ -27,10 +27,11 @@
#include <assert.h>
#include <stdlib.h>
+#include <polypcore/dynarray.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/gccmacro.h>
+
#include "tokenizer.h"
-#include "dynarray.h"
-#include "xmalloc.h"
-#include "gccmacro.h"
struct pa_tokenizer {
pa_dynarray *dynarray;
diff --git a/src/polypcore/util.c b/src/polypcore/util.c
index 4b6edb97..a53c36bc 100644
--- a/src/polypcore/util.c
+++ b/src/polypcore/util.c
@@ -70,9 +70,10 @@
#include "winsock.h"
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+
#include "util.h"
-#include "xmalloc.h"
-#include "log.h"
#ifndef OS_IS_WIN32
#define PA_RUNTIME_PATH_PREFIX "/tmp/polypaudio-"
diff --git a/src/polypcore/util.h b/src/polypcore/util.h
index 3dc6c945..14f763a3 100644
--- a/src/polypcore/util.h
+++ b/src/polypcore/util.h
@@ -27,8 +27,8 @@
#include <stdarg.h>
#include <stdio.h>
-#include "gccmacro.h"
#include <polyp/sample.h>
+#include <polypcore/gccmacro.h>
struct timeval;
diff --git a/src/polypcore/x11wrap.c b/src/polypcore/x11wrap.c
index e20a50a6..9414fbdf 100644
--- a/src/polypcore/x11wrap.c
+++ b/src/polypcore/x11wrap.c
@@ -22,11 +22,12 @@
#include <assert.h>
#include <stdio.h>
-#include "llist.h"
+#include <polypcore/llist.h>
+#include <polypcore/xmalloc.h>
+#include <polypcore/log.h>
+#include <polypcore/props.h>
+
#include "x11wrap.h"
-#include "xmalloc.h"
-#include "log.h"
-#include "props.h"
typedef struct pa_x11_internal pa_x11_internal;
diff --git a/src/polypcore/x11wrap.h b/src/polypcore/x11wrap.h
index 15645168..15969869 100644
--- a/src/polypcore/x11wrap.h
+++ b/src/polypcore/x11wrap.h
@@ -24,7 +24,7 @@
#include <X11/Xlib.h>
-#include "core.h"
+#include <polypcore/core.h>
typedef struct pa_x11_wrapper pa_x11_wrapper;
diff --git a/src/polypcore/xmalloc.c b/src/polypcore/xmalloc.c
index bf366347..4c8689a6 100644
--- a/src/polypcore/xmalloc.c
+++ b/src/polypcore/xmalloc.c
@@ -27,11 +27,12 @@
#include <signal.h>
#include <assert.h>
#include <unistd.h>
+#include <string.h>
+
+#include <polypcore/util.h>
+#include <polypcore/gccmacro.h>
-#include "memory.h"
-#include "util.h"
#include "xmalloc.h"
-#include "gccmacro.h"
/* Make sure not to allocate more than this much memory. */
#define MAX_ALLOC_SIZE (1024*1024*20) /* 20MB */