summaryrefslogtreecommitdiff
path: root/include/baresip.h
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-02-23 19:21:50 +0100
committerGitHub <noreply@github.com>2017-02-23 19:21:50 +0100
commitfb6bf93a7816516247523bd004737b2d1f3bba86 (patch)
tree334abf16f49890e6825c815a5b889f675c2033fb /include/baresip.h
parent39ff942fa874ff0d698d3ac938a6c8c741afb107 (diff)
Message reentrant (#214)
* message: make it re-entrant * clean up message test-code
Diffstat (limited to 'include/baresip.h')
-rw-r--r--include/baresip.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/baresip.h b/include/baresip.h
index 5256701..71c65cf 100644
--- a/include/baresip.h
+++ b/include/baresip.h
@@ -309,9 +309,14 @@ struct media_ctx {
typedef void (message_recv_h)(const struct pl *peer, const struct pl *ctype,
struct mbuf *body, void *arg);
-int message_init(message_recv_h *recvh, void *arg);
-void message_close(void);
-int message_send(struct ua *ua, const char *peer, const char *msg);
+struct message;
+struct message_lsnr;
+
+int message_init(struct message **messagep);
+int message_listen(struct message_lsnr **lsnrp, struct message *message,
+ message_recv_h *h, void *arg);
+int message_send(struct ua *ua, const char *peer, const char *msg,
+ sip_resp_h *resph, void *arg);
/*
@@ -1114,6 +1119,7 @@ struct network *baresip_network(void);
struct contacts *baresip_contacts(void);
struct commands *baresip_commands(void);
struct player *baresip_player(void);
+struct message *baresip_message(void);
struct list *baresip_mnatl(void);
struct list *baresip_mencl(void);