| 293 g_return_val_if_fail(account != NULL, NULL); |
293 g_return_val_if_fail(account != NULL, NULL); |
| 294 |
294 |
| 295 protocol = purple_protocols_find(purple_account_get_protocol_id(account)); |
295 protocol = purple_protocols_find(purple_account_get_protocol_id(account)); |
| 296 |
296 |
| 297 /* Lookup the attention type in the protocol's attention_types list, if any. */ |
297 /* Lookup the attention type in the protocol's attention_types list, if any. */ |
| 298 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, ATTENTION_IFACE, get_types)) { |
298 if (PURPLE_IS_PROTOCOL_ATTENTION(protocol)) { |
| 299 GList *attention_types; |
299 GList *attention_types; |
| 300 |
300 |
| 301 attention_types = purple_protocol_attention_iface_get_types(protocol, account); |
301 attention_types = purple_protocol_attention_get_types(protocol, account); |
| 302 attn = (PurpleAttentionType *)g_list_nth_data(attention_types, type_code); |
302 attn = (PurpleAttentionType *)g_list_nth_data(attention_types, type_code); |
| 303 } else { |
303 } else { |
| 304 attn = NULL; |
304 attn = NULL; |
| 305 } |
305 } |
| 306 |
306 |