summaryrefslogtreecommitdiff
path: root/src/pulsecore/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r--src/pulsecore/core.c97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index 1a8090fe8..91b43f268 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -300,3 +300,100 @@ void pa_core_rttime_restart(pa_core *c, pa_time_event *e, pa_usec_t usec) {
c->mainloop->time_restart(e, pa_timeval_rtstore(&tv, usec, true));
}
+
+pa_mainloop_api* pa_core_get_mainloop(pa_core *c) {
+ pa_assert(c);
+ pa_assert(c->mainloop);
+
+ return c->mainloop;
+}
+
+/* FIXME: Should we expose this at all? */
+pa_mempool* pa_core_get_mempool(pa_core *c) {
+ pa_assert(c);
+ pa_assert(c->mempool);
+
+ return c->mempool;
+}
+
+pa_mempool* pa_core_new_mempool(pa_core *c, pa_mem_type_t shm_type, bool per_client) {
+ return pa_mempool_new(shm_type, c->shm_size, per_client);
+}
+
+/* FIXME: Should these be taking a ref during the copy? */
+
+pa_idxset* pa_core_get_modules(pa_core *c) {
+ return pa_idxset_copy(c->modules, NULL);
+}
+
+pa_idxset* pa_core_get_clients(pa_core *c) {
+ return pa_idxset_copy(c->clients, NULL);
+}
+
+pa_idxset* pa_core_get_cards(pa_core *c) {
+ return pa_idxset_copy(c->cards, NULL);
+}
+
+pa_idxset* pa_core_get_sinks(pa_core *c) {
+ return pa_idxset_copy(c->sinks, NULL);
+}
+
+pa_idxset* pa_core_get_sources(pa_core *c) {
+ return pa_idxset_copy(c->sources, NULL);
+}
+
+pa_idxset* pa_core_get_sink_inputs(pa_core *c) {
+ return pa_idxset_copy(c->sink_inputs, NULL);
+}
+
+pa_idxset* pa_core_get_source_outputs(pa_core *c) {
+ return pa_idxset_copy(c->source_outputs, NULL);
+}
+
+pa_idxset* pa_core_get_scache(pa_core *c) {
+ return pa_idxset_copy(c->scache, NULL);
+}
+
+pa_module* pa_core_get_module(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->modules, idx);
+}
+
+pa_client* pa_core_get_client(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->clients, idx);
+}
+
+pa_card* pa_core_get_card(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->cards, idx);
+}
+
+pa_sink* pa_core_get_sink(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->sinks, idx);
+}
+
+pa_source* pa_core_get_source(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->sources, idx);
+}
+
+pa_sink_input* pa_core_get_sink_input(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->sink_inputs, idx);
+}
+
+pa_source_output* pa_core_get_source_output(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->source_outputs, idx);
+}
+
+pa_scache_entry* pa_core_get_scache_entry(pa_core *c, uint32_t idx) {
+ return pa_idxset_get_by_index(c->scache, idx);
+}
+
+const pa_sample_spec* pa_core_get_sample_spec(pa_core *c) {
+ return &c->default_sample_spec;
+}
+
+const pa_channel_map* pa_core_get_channel_map(pa_core *c) {
+ return &c->default_channel_map;
+}
+
+uint32_t pa_core_get_cookie(pa_core *c) {
+ return c->cookie;
+}