[asterisk-commits] mmichelson: branch mmichelson/pub_sub r385122 - /team/mmichelson/pub_sub/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 9 14:05:52 CDT 2013
Author: mmichelson
Date: Tue Apr 9 14:05:49 2013
New Revision: 385122
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385122
Log:
Add stubs for an MWI pubsub user.
Added:
team/mmichelson/pub_sub/res/res_sip_mwi.c (with props)
Added: team/mmichelson/pub_sub/res/res_sip_mwi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pub_sub/res/res_sip_mwi.c?view=auto&rev=385122
==============================================================================
--- team/mmichelson/pub_sub/res/res_sip_mwi.c (added)
+++ team/mmichelson/pub_sub/res/res_sip_mwi.c Tue Apr 9 14:05:49 2013
@@ -1,0 +1,107 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2013, Digium, Inc.
+ *
+ * Mark Michelson <mmichelson at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+#include "asterisk.h"
+
+#include <pjsip.h>
+#include <pjsip_simple.h>
+#include <pjlib.h>
+
+#include "asterisk/res_sip_pubsub.h"
+#include "asterisk/module.h"
+#include "asterisk/logger.h"
+
+static void mwi_subscription_shutdown(struct ast_sip_subscription *sub)
+{
+ /* XXX STUB */
+}
+
+static struct ast_sip_subscription *mwi_new_subscribe(struct ast_sip_endpoint *endpoint,
+ pjsip_rx_data *rdata)
+{
+ /* XXX STUB */
+ return NULL;
+}
+
+static struct ast_sip_subscription_response_data *mwi_resubscribe(struct ast_sip_subscription *sub,
+ pjsip_rx_data *rdata)
+{
+ /* XXX STUB */
+ return NULL;
+}
+
+static void mwi_subscription_timeout(struct ast_sip_subscription *sub)
+{
+ /* XXX STUB */
+}
+
+static void mwi_subscription_terminated(struct ast_sip_subscription *sub, pjsip_rx_data *rdata)
+{
+ /* XXX STUB */
+}
+
+static void mwi_notify_response(struct ast_sip_subscription *sub, pjsip_rx_data *rdata)
+{
+ /* XXX STUB */
+}
+
+static struct ast_sip_subscription_response_data *mwi_notify_request(struct ast_sip_subscription *sub,
+ pjsip_rx_data *rdata)
+{
+ /* XXX STUB */
+ return NULL;
+}
+
+static int mwi_refresh_subscription(struct ast_sip_subscription *sub)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static struct ast_sip_subscription_handler mwi_handler = {
+ .event_name = "message-summary",
+ .accept = { "application/simple-message-summary", },
+ .subscription_shutdown = mwi_subscription_shutdown,
+ .new_subscribe = mwi_new_subscribe,
+ .resubscribe = mwi_resubscribe,
+ .subscription_timeout = mwi_subscription_timeout,
+ .subscription_terminated = mwi_subscription_terminated,
+ .notify_response = mwi_notify_response,
+ .notify_request = mwi_notify_request,
+ .refresh_subscription = mwi_refresh_subscription,
+};
+
+static int load_module(void)
+{
+ if (ast_sip_register_subscription_handler(&mwi_handler)) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
+ return AST_MODULE_LOAD_SUCCESS;
+}
+
+static int unload_module(void)
+{
+ ast_sip_unregister_subscription_handler(&mwi_handler);
+ return 0;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP MWI resource",
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = AST_MODPRI_CHANNEL_DEPEND,
+);
Propchange: team/mmichelson/pub_sub/res/res_sip_mwi.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/mmichelson/pub_sub/res/res_sip_mwi.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: team/mmichelson/pub_sub/res/res_sip_mwi.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list