libpurple/server.c

branch
soc.2013.gobjectification.plugins
changeset 36723
d5014e354e8f
parent 36719
0d7682bdf828
child 36727
e846113d7f87
equal deleted inserted replaced
36722:49872e1ec30e 36723:d5014e354e8f
131 account = purple_connection_get_account(gc); 131 account = purple_connection_get_account(gc);
132 presence = purple_account_get_presence(account); 132 presence = purple_account_get_presence(account);
133 133
134 im = purple_conversations_find_im_with_account(name, account); 134 im = purple_conversations_find_im_with_account(name, account);
135 135
136 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, send_im)) 136 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, IM_IFACE, send))
137 val = purple_protocol_im_iface_send(protocol, gc, name, message, flags); 137 val = purple_protocol_im_iface_send(protocol, gc, name, message, flags);
138 138
139 /* 139 /*
140 * XXX - If "only auto-reply when away & idle" is set, then shouldn't 140 * XXX - If "only auto-reply when away & idle" is set, then shouldn't
141 * this only reset lar->sent if we're away AND idle? 141 * this only reset lar->sent if we're away AND idle?
172 PurpleAccount *account; 172 PurpleAccount *account;
173 173
174 if (gc) { 174 if (gc) {
175 protocol = purple_connection_get_protocol(gc); 175 protocol = purple_connection_get_protocol(gc);
176 176
177 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, set_info)) { 177 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER_IFACE, set_info)) {
178 account = purple_connection_get_account(gc); 178 account = purple_connection_get_account(gc);
179 179
180 if (purple_signal_emit_return_1(purple_accounts_get_handle(), 180 if (purple_signal_emit_return_1(purple_accounts_get_handle(),
181 "account-setting-info", account, info)) 181 "account-setting-info", account, info))
182 return; 182 return;
291 g_return_val_if_fail(account != NULL, NULL); 291 g_return_val_if_fail(account != NULL, NULL);
292 292
293 protocol = purple_protocols_find(purple_account_get_protocol_id(account)); 293 protocol = purple_protocols_find(purple_account_get_protocol_id(account));
294 294
295 /* Lookup the attention type in the protocol's attention_types list, if any. */ 295 /* Lookup the attention type in the protocol's attention_types list, if any. */
296 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, get_attention_types)) { 296 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, ATTENTION_IFACE, get_types)) {
297 GList *attention_types; 297 GList *attention_types;
298 298
299 attention_types = purple_protocol_attention_iface_get_types(protocol, account); 299 attention_types = purple_protocol_attention_iface_get_types(protocol, account);
300 attn = (PurpleAttentionType *)g_list_nth_data(attention_types, type_code); 300 attn = (PurpleAttentionType *)g_list_nth_data(attention_types, type_code);
301 } else { 301 } else {
465 { 465 {
466 PurpleProtocol *protocol; 466 PurpleProtocol *protocol;
467 467
468 protocol = purple_connection_get_protocol(gc); 468 protocol = purple_connection_get_protocol(gc);
469 469
470 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, chat_send)) 470 if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, CHAT_IFACE, send))
471 return purple_protocol_chat_iface_send(protocol, gc, id, message, flags); 471 return purple_protocol_chat_iface_send(protocol, gc, id, message, flags);
472 472
473 return -EINVAL; 473 return -EINVAL;
474 } 474 }
475 475
864 PurpleProtocol *protocol; 864 PurpleProtocol *protocol;
865 865
866 if (gc) { 866 if (gc) {
867 protocol = purple_connection_get_protocol(gc); 867 protocol = purple_connection_get_protocol(gc);
868 868
869 if (!PURPLE_PROTOCOL_IMPLEMENTS(protocol, can_receive_file) || 869 if (!PURPLE_PROTOCOL_IMPLEMENTS(protocol, XFER_IFACE, can_receive) ||
870 purple_protocol_xfer_iface_can_receive(protocol, gc, who)) 870 purple_protocol_xfer_iface_can_receive(protocol, gc, who))
871 871
872 purple_protocol_xfer_iface_send(protocol, gc, who, file); 872 purple_protocol_xfer_iface_send(protocol, gc, who, file);
873 } 873 }
874 } 874 }

mercurial