comparison mcabber/mcabber/xmpp_helper.c @ 2032:f740c4128f76

Fix receipts handling according to recent XEP updates * add lm_get_uid() @xmpp_helper.h * identify receipts by id attribute of 'received' subelement instead of stanza id
author Myhailo Danylenko <isbear@ukrpost.net>
date Sun, 14 Oct 2012 17:39:11 +0200
parents 46a21258ad91
children a37fbc3ac6aa
comparison
equal deleted inserted replaced
2031:2b13be73351d 2032:f740c4128f76
71 {XMPP_ERROR_DISCONNECTED, "510", 71 {XMPP_ERROR_DISCONNECTED, "510",
72 "Disconnected", "service-unavailable", "cancel"}, 72 "Disconnected", "service-unavailable", "cancel"},
73 {0, NULL, NULL, NULL, NULL} 73 {0, NULL, NULL, NULL, NULL}
74 }; 74 };
75 75
76
77 #ifdef MODULES_ENABLE 76 #ifdef MODULES_ENABLE
78 static GSList *xmpp_additional_features = NULL; 77 static GSList *xmpp_additional_features = NULL;
79 static char *ver, *ver_notavail; 78 static char *ver, *ver_notavail;
80 79
81 void xmpp_add_feature(const char *xmlns) 80 void xmpp_add_feature(const char *xmlns)
102 } 101 }
103 feature = g_slist_next(feature); 102 feature = g_slist_next(feature);
104 } 103 }
105 } 104 }
106 #endif 105 #endif
106
107 // The caller must g_free this after use
108 gchar *lm_get_uid ()
109 {
110 static guint xmpp_uid = 0;
111 return g_strdup_printf ("mc%u", ++xmpp_uid);
112 }
107 113
108 const gchar* lm_message_node_get_child_value(LmMessageNode *node, 114 const gchar* lm_message_node_get_child_value(LmMessageNode *node,
109 const gchar *child) 115 const gchar *child)
110 { 116 {
111 LmMessageNode *tmp; 117 LmMessageNode *tmp;