30 #include <mcabber/compl.h> |
30 #include <mcabber/compl.h> |
31 #include <mcabber/xmpp_defines.h> |
31 #include <mcabber/xmpp_defines.h> |
32 #include <mcabber/screen.h> |
32 #include <mcabber/screen.h> |
33 #include <mcabber/hbuf.h> |
33 #include <mcabber/hbuf.h> |
34 #include <mcabber/modules.h> |
34 #include <mcabber/modules.h> |
|
35 #include <mcabber/caps.h> |
35 |
36 |
36 #include "disco.h" |
37 #include "disco.h" |
37 |
38 |
38 #include "config.h" |
39 #include "config.h" |
39 |
40 |
144 switch (lm_message_get_sub_type (message)) { |
145 switch (lm_message_get_sub_type (message)) { |
145 case LM_MESSAGE_SUB_TYPE_RESULT: |
146 case LM_MESSAGE_SUB_TYPE_RESULT: |
146 |
147 |
147 { |
148 { |
148 LmMessageNode *node = lm_message_get_node (message); |
149 LmMessageNode *node = lm_message_get_node (message); |
149 const gchar *from = lm_message_node_get_attribute (node, "from"); |
|
150 GSList *identities = NULL; |
150 GSList *identities = NULL; |
151 GSList *features = NULL; |
151 GSList *features = NULL; |
152 |
152 |
153 node = lm_message_node_get_child (node, "query"); |
153 node = lm_message_node_get_child (node, "query"); |
154 |
154 |
226 switch (lm_message_get_sub_type (message)) { |
226 switch (lm_message_get_sub_type (message)) { |
227 case LM_MESSAGE_SUB_TYPE_RESULT: |
227 case LM_MESSAGE_SUB_TYPE_RESULT: |
228 |
228 |
229 { |
229 { |
230 LmMessageNode *node = lm_message_get_node (message); |
230 LmMessageNode *node = lm_message_get_node (message); |
231 const gchar *from = lm_message_node_get_attribute (node, "from"); |
|
232 GSList *items = NULL; |
231 GSList *items = NULL; |
233 |
232 |
234 node = lm_message_node_get_child (node, "query"); |
233 node = lm_message_node_get_child (node, "query"); |
235 |
234 |
236 // check xmlns |
235 // check xmlns |
297 |
296 |
298 // |
297 // |
299 // disco requests sending |
298 // disco requests sending |
300 // |
299 // |
301 |
300 |
|
301 #if 0 |
302 static void disco_features_cb (gconstpointer data, gpointer userdata) |
302 static void disco_features_cb (gconstpointer data, gpointer userdata) |
303 { |
303 { |
304 const gchar *feature = data; |
304 const gchar *feature = data; |
305 GSList **features = userdata; |
305 GSList **features = userdata; |
306 *features = g_slist_insert_sorted (*features, (gpointer) feature, (GCompareFunc) g_strcmp0); |
306 *features = g_slist_insert_sorted (*features, (gpointer) feature, (GCompareFunc) g_strcmp0); |
307 return; |
307 return; |
308 } |
308 } |
|
309 #endif |
309 |
310 |
310 gpointer disco_info_request (const gchar *jid, const gchar *dnode, disco_info_handler_t handler, gpointer userdata, GDestroyNotify notify) |
311 gpointer disco_info_request (const gchar *jid, const gchar *dnode, disco_info_handler_t handler, gpointer userdata, GDestroyNotify notify) |
311 { |
312 { |
312 if (!handler || !xmpp_is_online ()) { |
313 if (!handler || !xmpp_is_online ()) { |
313 if (notify) |
314 if (notify) |
314 notify (userdata); |
315 notify (userdata); |
315 return NULL; |
316 return NULL; |
316 } |
317 } |
317 |
318 |
|
319 #if 0 |
318 if (0 && !dnode) { // FIXME: no way to get identity(ies) from caps |
320 if (0 && !dnode) { // FIXME: no way to get identity(ies) from caps |
319 gchar *bjid = jidtodisp (jid); |
321 gchar *bjid = jidtodisp (jid); |
320 GSList *buddy = roster_find (bjid, jidsearch, ROSTER_TYPE_USER | ROSTER_TYPE_ROOM | ROSTER_TYPE_AGENT); |
322 GSList *buddy = roster_find (bjid, jidsearch, ROSTER_TYPE_USER | ROSTER_TYPE_ROOM | ROSTER_TYPE_AGENT); |
321 const gchar *resource = strchr (jid, JID_RESOURCE_SEPARATOR); |
323 const gchar *resource = strchr (jid, JID_RESOURCE_SEPARATOR); |
322 |
324 |