[asterisk-commits] mmichelson: branch mmichelson/pubsub_bodies r406021 - in /team/mmichelson/pub...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 21 11:15:15 CST 2014


Author: mmichelson
Date: Tue Jan 21 11:15:12 2014
New Revision: 406021

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406021
Log:
Fix linking issues so that modules will load properly.


Added:
    team/mmichelson/pubsub_bodies/res/res_pjsip/presence_xml.c
      - copied, changed from r406019, team/mmichelson/pubsub_bodies/res/res_pjsip_pidf.c
Removed:
    team/mmichelson/pubsub_bodies/res/res_pjsip_pidf.c
Modified:
    team/mmichelson/pubsub_bodies/include/asterisk/res_pjsip_presence_xml.h
    team/mmichelson/pubsub_bodies/res/res_pjsip_pidf_body_generator.c
    team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.exports.in
    team/mmichelson/pubsub_bodies/res/res_pjsip_xpidf_body_generator.c

Modified: team/mmichelson/pubsub_bodies/include/asterisk/res_pjsip_presence_xml.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/include/asterisk/res_pjsip_presence_xml.h?view=diff&rev=406021&r1=406020&r2=406021
==============================================================================
--- team/mmichelson/pubsub_bodies/include/asterisk/res_pjsip_presence_xml.h (original)
+++ team/mmichelson/pubsub_bodies/include/asterisk/res_pjsip_presence_xml.h Tue Jan 21 11:15:12 2014
@@ -37,7 +37,7 @@
  * \param[out] pidfnote
  * \param[out] local_state
  */
-void ast_pjsip_presence_exten_state_to_str(int state, char **statestring,
+void ast_sip_presence_exten_state_to_str(int state, char **statestring,
 		char **pidfstate, char **pidfnote, enum ast_sip_pidf_state *local_state);
 
 /*!
@@ -50,7 +50,7 @@
  *
  * \return The created attribute
  */
-pj_xml_attr *ast_pjsip_presence_xml_create_attr(pj_pool_t *pool,
+pj_xml_attr *ast_sip_presence_xml_create_attr(pj_pool_t *pool,
 		pj_xml_node *node, const char *name, const char *value);
 
 /*!
@@ -61,7 +61,7 @@
  * \param name The name for the new node
  * \return The created node
  */
-pj_xml_node *ast_pjsip_presence_xml_create_node(pj_pool_t *pool,
+pj_xml_node *ast_sip_presence_xml_create_node(pj_pool_t *pool,
 		pj_xml_node *parent, const char* name);
 
 /*!
@@ -78,5 +78,5 @@
  * \param attr_name Name of attribute to find
  * \return The found attribute
  */
-pj_xml_attr *ast_pjsip_presence_xml_find_node_attr(pj_pool_t* pool, 
+pj_xml_attr *ast_sip_presence_xml_find_node_attr(pj_pool_t* pool, 
 		pj_xml_node *parent, const char *node_name, const char *attr_name);

Copied: team/mmichelson/pubsub_bodies/res/res_pjsip/presence_xml.c (from r406019, team/mmichelson/pubsub_bodies/res/res_pjsip_pidf.c)
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip/presence_xml.c?view=diff&rev=406021&p1=team/mmichelson/pubsub_bodies/res/res_pjsip_pidf.c&r1=406019&p2=team/mmichelson/pubsub_bodies/res/res_pjsip/presence_xml.c&r2=406021
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_pidf.c (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip/presence_xml.c Tue Jan 21 11:15:12 2014
@@ -36,7 +36,7 @@
 #include "asterisk/res_pjsip_presence_xml.h"
 #include "asterisk/res_pjsip_body_generator_types.h"
 
-void ast_pjsip_presence_exten_state_to_str(int state, char **statestring, char **pidfstate,
+void ast_sip_presence_exten_state_to_str(int state, char **statestring, char **pidfstate,
 			       char **pidfnote, enum ast_sip_pidf_state *local_state)
 {
 	switch (state) {
@@ -81,7 +81,7 @@
 	}
 }
 
-pj_xml_attr *ast_pjsip_presence_xml_create_attr(pj_pool_t *pool,
+pj_xml_attr *ast_sip_presence_xml_create_attr(pj_pool_t *pool,
 		pj_xml_node *node, const char *name, const char *value)
 {
 	pj_xml_attr *attr = PJ_POOL_ALLOC_T(pool, pj_xml_attr);
@@ -93,7 +93,7 @@
 	return attr;
 }
 
-pj_xml_node *ast_pjsip_presence_xml_create_node(pj_pool_t *pool,
+pj_xml_node *ast_sip_presence_xml_create_node(pj_pool_t *pool,
 		pj_xml_node *parent, const char* name)
 {
 	pj_xml_node *node = PJ_POOL_ALLOC_T(pool, pj_xml_node);
@@ -110,7 +110,7 @@
 	return node;
 }
 
-pj_xml_attr *ast_pjsip_presence_xml_find_node_attr(pj_pool_t* pool,
+pj_xml_attr *ast_sip_presence_xml_find_node_attr(pj_pool_t* pool,
 		pj_xml_node *parent, const char *node_name, const char *attr_name)
 {
 	pj_str_t name;
@@ -118,11 +118,11 @@
 	pj_xml_attr *attr;
 
 	if (!(node = pj_xml_find_node(parent, pj_cstr(&name, node_name)))) {
-		node = ast_pjsip_presence_xml_create_node(pool, parent, node_name);
+		node = ast_sip_presence_xml_create_node(pool, parent, node_name);
 	}
 
 	if (!(attr = pj_xml_find_attr(node, pj_cstr(&name, attr_name), NULL))) {
-		attr = ast_pjsip_presence_xml_create_attr(pool, node, attr_name, "");
+		attr = ast_sip_presence_xml_create_attr(pool, node, attr_name, "");
 	}
 
 	return attr;

Modified: team/mmichelson/pubsub_bodies/res/res_pjsip_pidf_body_generator.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip_pidf_body_generator.c?view=diff&rev=406021&r1=406020&r2=406021
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_pidf_body_generator.c (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip_pidf_body_generator.c Tue Jan 21 11:15:12 2014
@@ -55,11 +55,11 @@
 	static const char *XMLNS_EP = "xmlns:ep";
 	static const char *XMLNS_RPID_PERSON = "urn:ietf:params:xml:ns:pidf:rpid:rpid-person";
 
-	pj_xml_node *person = ast_pjsip_presence_xml_create_node(pool, node, "pp:person");
-	pj_xml_node *status = ast_pjsip_presence_xml_create_node(pool, person, "status");
+	pj_xml_node *person = ast_sip_presence_xml_create_node(pool, node, "pp:person");
+	pj_xml_node *status = ast_sip_presence_xml_create_node(pool, person, "status");
 
 	if (pidfstate[0] != '-') {
-		pj_xml_node *activities = ast_pjsip_presence_xml_create_node(pool, status, "ep:activities");
+		pj_xml_node *activities = ast_sip_presence_xml_create_node(pool, status, "ep:activities");
 		size_t str_size = sizeof("ep:") + strlen(pidfstate);
 
 		activities->content.ptr = pj_pool_alloc(pool, str_size);
@@ -67,9 +67,9 @@
 				"ep:%s", pidfstate);
 	}
 
-	ast_pjsip_presence_xml_create_attr(pool, node, XMLNS_PP, XMLNS_PERSON);
-	ast_pjsip_presence_xml_create_attr(pool, node, XMLNS_ES, XMLNS_RPID_STATUS);
-	ast_pjsip_presence_xml_create_attr(pool, node, XMLNS_EP, XMLNS_RPID_PERSON);
+	ast_sip_presence_xml_create_attr(pool, node, XMLNS_PP, XMLNS_PERSON);
+	ast_sip_presence_xml_create_attr(pool, node, XMLNS_ES, XMLNS_RPID_STATUS);
+	ast_sip_presence_xml_create_attr(pool, node, XMLNS_EP, XMLNS_RPID_PERSON);
 }
 
 /*!
@@ -129,8 +129,8 @@
 	pjpidf_pres *pres = body;
 	struct ast_sip_exten_state_data *state_data = data;
 
-	ast_pjsip_presence_exten_state_to_str(state_data->exten_state, &statestring, &pidfstate,
-			   &pidfnote, &local_state);
+	ast_sip_presence_exten_state_to_str(state_data->exten_state, &statestring,
+			&pidfstate, &pidfnote, &local_state);
 
 	add_non_standard(state_data->pool, pres, pidfstate);
 

Modified: team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.exports.in
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.exports.in?view=diff&rev=406021&r1=406020&r2=406021
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.exports.in (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip_pubsub.exports.in Tue Jan 21 11:15:12 2014
@@ -24,7 +24,11 @@
 		LINKER_SYMBOL_PREFIXast_sip_publication_remove_datastore;
 		LINKER_SYMBOL_PREFIXast_sip_pubsub_register_body_generator;
 		LINKER_SYMBOL_PREFIXast_sip_pubsub_unregister_body_generator;
+		LINKER_SYMBOL_PREFIXast_sip_pubsub_register_body_supplement;
+		LINKER_SYMBOL_PREFIXast_sip_pubsub_unregister_body_supplement;
 		LINKER_SYMBOL_PREFIXast_sip_pubsub_generate_body_content;
+		LINKER_SYMBOL_PREFIXast_sip_subscription_get_body_type;
+		LINKER_SYMBOL_PREFIXast_sip_subscription_get_body_subtype;
 	local:
 		*;
 };

Modified: team/mmichelson/pubsub_bodies/res/res_pjsip_xpidf_body_generator.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pubsub_bodies/res/res_pjsip_xpidf_body_generator.c?view=diff&rev=406021&r1=406020&r2=406021
==============================================================================
--- team/mmichelson/pubsub_bodies/res/res_pjsip_xpidf_body_generator.c (original)
+++ team/mmichelson/pubsub_bodies/res/res_pjsip_xpidf_body_generator.c Tue Jan 21 11:15:12 2014
@@ -56,28 +56,32 @@
 	enum ast_sip_pidf_state local_state;
 	pj_str_t name, uri;
 
-	ast_pjsip_presence_exten_state_to_str(state_data->exten_state, &statestring,
+	ast_sip_presence_exten_state_to_str(state_data->exten_state, &statestring,
 			&pidfstate, &pidfnote, &local_state);
 
-	attr = ast_pjsip_presence_xml_find_node_attr(state_data->pool, pres, "atom", "id");
+	attr = ast_sip_presence_xml_find_node_attr(state_data->pool, pres, "atom", "id");
 	pj_strdup2(state_data->pool, &attr->value, state_data->exten);
 
-	attr = ast_pjsip_presence_xml_find_node_attr(state_data->pool, pres, "address", "uri");
+	attr = ast_sip_presence_xml_find_node_attr(state_data->pool, pres, "address", "uri");
 
-	uri.ptr = (char*) pj_pool_alloc(state_data->pool, strlen(state_data->remote) + STR_ADDR_PARAM.slen);
+	uri.ptr = (char*) pj_pool_alloc(state_data->pool,
+			strlen(state_data->remote) + STR_ADDR_PARAM.slen);
 	pj_strcpy2( &uri, state_data->remote);
 	pj_strcat( &uri, &STR_ADDR_PARAM);
 	pj_strdup(state_data->pool, &attr->value, &uri);
 
-	ast_pjsip_presence_xml_create_attr(state_data->pool, pj_xml_find_node(pres, pj_cstr(&name, "address")),
+	ast_sip_presence_xml_create_attr(state_data->pool,
+			pj_xml_find_node(pres, pj_cstr(&name, "address")),
 		    "priority", "0.80000");
 
-	attr = ast_pjsip_presence_xml_find_node_attr(state_data->pool, pres, "status", "status");
+	attr = ast_sip_presence_xml_find_node_attr(state_data->pool, pres,
+			"status", "status");
 	pj_strdup2(state_data->pool, &attr->value,
 		   (local_state ==  NOTIFY_OPEN) ? "open" :
 		   (local_state == NOTIFY_INUSE) ? "inuse" : "closed");
 
-	attr = ast_pjsip_presence_xml_find_node_attr(state_data->pool, pres, "msnsubstatus", "substatus");
+	attr = ast_sip_presence_xml_find_node_attr(state_data->pool, pres,
+			"msnsubstatus", "substatus");
 	pj_strdup2(state_data->pool, &attr->value,
 		   (local_state == NOTIFY_OPEN) ? "online" :
 		   (local_state == NOTIFY_INUSE) ? "onthephone" : "offline");




More information about the asterisk-commits mailing list