2004-06-23 23:17:30 +00:00
|
|
|
#ifndef foosocketclienthfoo
|
|
|
|
|
#define foosocketclienthfoo
|
|
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include "mainloop-api.h"
|
|
|
|
|
#include "iochannel.h"
|
|
|
|
|
|
2004-07-07 00:22:46 +00:00
|
|
|
/* It is safe to destroy the calling socket_client object from the callback */
|
|
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_socket_client;
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_socket_client* pa_socket_client_new_ipv4(struct pa_mainloop_api *m, uint32_t address, uint16_t port);
|
|
|
|
|
struct pa_socket_client* pa_socket_client_new_unix(struct pa_mainloop_api *m, const char *filename);
|
2004-07-15 00:16:27 +00:00
|
|
|
struct pa_socket_client* pa_socket_client_new_sockaddr(struct pa_mainloop_api *m, const struct sockaddr *sa, size_t salen);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
void pa_socket_client_free(struct pa_socket_client *c);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
void pa_socket_client_set_callback(struct pa_socket_client *c, void (*on_connection)(struct pa_socket_client *c, struct pa_iochannel*io, void *userdata), void *userdata);
|
2004-06-23 23:17:30 +00:00
|
|
|
|
|
|
|
|
#endif
|