Module: sip-router
Branch: master
Commit: a870c322638cbf89aa69fd289716414ed5adbf3a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a870c32…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 11:41:33 2011 +0100
modules_k/presence: added handle_publish() and handle_subscribe() to exported API for use
in app_lua
---
modules_k/presence/bind_presence.c | 4 ++++
modules_k/presence/bind_presence.h | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules_k/presence/bind_presence.c b/modules_k/presence/bind_presence.c
index f606d82..ec55033 100644
--- a/modules_k/presence/bind_presence.c
+++ b/modules_k/presence/bind_presence.c
@@ -41,6 +41,8 @@
#include "presence.h"
#include "bind_presence.h"
#include "notify.h"
+#include "publish.h"
+#include "subscribe.h"
int bind_presence(presence_api_t* api)
{
@@ -67,6 +69,8 @@ int bind_presence(presence_api_t* api)
api->get_presentity= get_p_notify_body;
api->free_presentity= free_notify_body;
api->pres_auth_status= pres_auth_status;
+ api->handle_publish= handle_publish;
+ api->handle_subscribe= handle_subscribe;
return 0;
}
diff --git a/modules_k/presence/bind_presence.h b/modules_k/presence/bind_presence.h
index 7f2ce4e..0582997 100644
--- a/modules_k/presence/bind_presence.h
+++ b/modules_k/presence/bind_presence.h
@@ -44,6 +44,8 @@ typedef int (*update_watchers_t)(str pres_uri, pres_ev_t* ev, str*
rules_doc);
typedef str* (*pres_get_presentity_t)(str pres_uri, pres_ev_t *ev, str *etag, str
*contact);
typedef void (*pres_free_presentity_t)(str *presentity, pres_ev_t *ev);
typedef int (*pres_auth_status_t)(struct sip_msg* msg, str watcher_uri, str
presentity_uri);
+typedef int (*pres_handle_publish_t)(struct sip_msg* msg, char *str1, char* str2);
+typedef int (*pres_handle_subscribe_t)(struct sip_msg* msg, char *str1, char *str2);
typedef struct presence_api {
add_event_t add_event;
@@ -65,6 +67,8 @@ typedef struct presence_api {
pres_get_presentity_t get_presentity;
pres_free_presentity_t free_presentity;
pres_auth_status_t pres_auth_status;
+ pres_handle_publish_t handle_publish;
+ pres_handle_subscribe_t handle_subscribe;
} presence_api_t;
int bind_presence(presence_api_t* api);