equal
deleted
inserted
replaced
24 |
24 |
25 #include <jingle/check.h> |
25 #include <jingle/check.h> |
26 #include <jingle/jingle.h> |
26 #include <jingle/jingle.h> |
27 |
27 |
28 |
28 |
29 static JingleContentNode *check_content(LmMessageNode *node, GError **err); |
29 static JingleContent *check_content(LmMessageNode *node, GError **err); |
30 gint index_in_array(const gchar *str, const gchar **array); |
30 gint index_in_array(const gchar *str, const gchar **array); |
31 |
31 |
32 |
32 |
33 const gchar *jingle_content_creator[] = { |
33 const gchar *jingle_content_creator[] = { |
34 "initiator", |
34 "initiator", |
88 jn->node = node; |
88 jn->node = node; |
89 |
89 |
90 return TRUE; |
90 return TRUE; |
91 } |
91 } |
92 |
92 |
93 static JingleContentNode *check_content(LmMessageNode *node, GError **err) |
93 static JingleContent *check_content(LmMessageNode *node, GError **err) |
94 { |
94 { |
95 JingleContentNode *cn = g_new0(JingleContentNode, 1); |
95 JingleContent *cn = g_new0(JingleContent, 1); |
96 const gchar *creatorstr, *sendersstr; |
96 const gchar *creatorstr, *sendersstr; |
97 gint tmp, tmp2; |
97 gint tmp, tmp2; |
98 |
98 |
99 creatorstr = lm_message_node_get_attribute(node, "creator"); |
99 creatorstr = lm_message_node_get_attribute(node, "creator"); |
100 cn->disposition = lm_message_node_get_attribute(node, "disposition"); |
100 cn->disposition = lm_message_node_get_attribute(node, "disposition"); |
137 * Add them to the JingleNode struct. |
137 * Add them to the JingleNode struct. |
138 */ |
138 */ |
139 gboolean check_contents(JingleNode *jn, GError **err) |
139 gboolean check_contents(JingleNode *jn, GError **err) |
140 { |
140 { |
141 LmMessageNode *child = NULL; |
141 LmMessageNode *child = NULL; |
142 JingleContentNode *cn; |
142 JingleContent *cn; |
143 |
143 |
144 for (child = jn->node->children; child; child = child->next) { |
144 for (child = jn->node->children; child; child = child->next) { |
145 if (!g_strcmp0(child->name, "content")) { |
145 if (!g_strcmp0(child->name, "content")) { |
146 cn = check_content(child, err); |
146 cn = check_content(child, err); |
147 if(cn == NULL) { |
147 if(cn == NULL) { |