summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-context.h
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/polyplib-context.h')
-rw-r--r--polyp/polyplib-context.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/polyp/polyplib-context.h b/polyp/polyplib-context.h
index 4b199751..84e47b64 100644
--- a/polyp/polyplib-context.h
+++ b/polyp/polyplib-context.h
@@ -76,22 +76,11 @@ enum pa_context_state pa_context_get_state(struct pa_context *c);
/** Connect the context to the specified server. If server is NULL,
connect to the default server. This routine may but will not always
return synchronously on error. Use pa_context_set_state_callback() to
-be notified when the connection is established */
-int pa_context_connect(struct pa_context *c, const char *server);
-
-/** Connect the context to a server. If the default server is local
- * but not accessible, spawn a new daemon. If atfork is not NULL it is
- * run after the fork() in the child process. It may be used to close
- * file descriptors or to do any other cleanups. (It is not safe to
- * close all file descriptors unconditionally, since a UNIX socket is
- * passed to the new process.) if prefork is not NULL it is run just
- * before forking in the parent process. Use this to block SIGCHLD
- * handling if required. If postfork is not NULL it is run just after
- * forking in the parent process. Use this to unblock SIGCHLD if
- * required. The function will waitpid() on the daemon's PID, but
- * will not block or ignore SIGCHLD signals, since this cannot be done
- * in a thread compatible way. \since 0.4 */
-int pa_context_connect_spawn(struct pa_context *c, void (*atfork)(void), void (*prefork)(void), void (*postfork)(void));
+be notified when the connection is established. If spawn is non-zero
+and no specific server is specified or accessible a new daemon is
+spawned. If api is non-NULL, the functions specified in the structure
+are used when forking a new child process. */
+int pa_context_connect(struct pa_context *c, const char *server, int spawn, const struct pa_spawn_api *api);
/** Terminate the context connection immediately */
void pa_context_disconnect(struct pa_context *c);