| 2550 * @param featrure The feature's namespace. |
2550 * @param featrure The feature's namespace. |
| 2551 * |
2551 * |
| 2552 * @return TRUE if supports feature; else FALSE. |
2552 * @return TRUE if supports feature; else FALSE. |
| 2553 */ |
2553 */ |
| 2554 static gboolean |
2554 static gboolean |
| 2555 jabber_ipc_contact_has_feature(gchar *fulljid, gchar *feature) |
2555 jabber_ipc_contact_has_feature(const gchar *fulljid, const gchar *feature) |
| 2556 { |
2556 { |
| 2557 JabberCapsKey *caps_info = NULL; |
2557 gpointer caps_hash = g_hash_table_lookup(jabber_contact_info, fulljid); |
| 2558 JabberCapsValueExt *capabilities = NULL; |
2558 JabberCapsClientInfo *capabilities; |
| 2559 |
2559 |
| 2560 caps_info = g_hash_table_lookup(jabber_contact_info, fulljid); |
2560 if (!caps_hash) |
| 2561 |
2561 return FALSE; |
| 2562 if (!caps_info) return FALSE; |
2562 |
| 2563 capabilities = g_hash_table_lookup(capstable, caps_info); |
2563 capabilities = g_hash_table_lookup(capstable, caps_hash); |
| 2564 |
2564 return g_list_find_custom(capabilities->features, feature, (GCompareFunc)strcmp) != NULL; |
| 2565 if (g_list_find_custom(capabilities->features, feature, (GCompareFunc)strcmp) == NULL) return FALSE ; |
|
| 2566 return TRUE; |
|
| 2567 } |
2565 } |
| 2568 |
2566 |
| 2569 static void |
2567 static void |
| 2570 jabber_ipc_add_feature(gchar *feature) |
2568 jabber_ipc_add_feature(const gchar *feature) |
| 2571 { |
2569 { |
| 2572 if (feature == 0) return; |
2570 if (!feature) |
| |
2571 return; |
| 2573 jabber_add_feature(feature, 0); |
2572 jabber_add_feature(feature, 0); |
| 2574 |
2573 |
| 2575 // send presence with new caps info for all connected accounts |
2574 /* send presence with new caps info for all connected accounts */ |
| 2576 jabber_caps_broadcast_change(); |
2575 jabber_caps_broadcast_change(); |
| 2577 } |
2576 } |
| 2578 |
2577 |
| 2579 void |
2578 void |
| 2580 jabber_init_plugin(PurplePlugin *plugin) |
2579 jabber_init_plugin(PurplePlugin *plugin) |