comparison libpurple/protocols/myspace/zap.c @ 19463:3f6f84d11ce2

Change serv_send_attention() to call prpl_info->send_attention(), and other minor improvements. Update msimprpl with attention changes.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 27 Aug 2007 05:37:40 +0000
parents 1b5e786d137a
children 941965d6fd88 36ba89a2b7da
comparison
equal deleted inserted replaced
19462:105305518622 19463:3f6f84d11ce2
79 buddy = purple_find_buddy(session->account, username); 79 buddy = purple_find_buddy(session->account, username);
80 if (!buddy) { 80 if (!buddy) {
81 return FALSE; 81 return FALSE;
82 } 82 }
83 83
84 /* TODO: make use of the MsimAttentionType we found, instead of 84 msim_send_zap(session, username, code);
85 * doing it all over in msim_send_zap_from_menu. */
86 msim_send_zap_from_menu(&buddy->node, GUINT_TO_POINTER(code));
87 85
88 return TRUE; 86 return TRUE;
89 } 87 }
90 88
91 /** Send a zap to a user. */ 89 /** Send a zap to a user. */
103 g_return_val_if_fail(session != NULL, FALSE); 101 g_return_val_if_fail(session != NULL, FALSE);
104 g_return_val_if_fail(username != NULL, FALSE); 102 g_return_val_if_fail(username != NULL, FALSE);
105 103
106 104
107 #ifdef MSIM_USE_ATTENTION_API 105 #ifdef MSIM_USE_ATTENTION_API
108 serv_send_attention(session->gc, username, code); 106 /* serv_send_attention(session->gc, username, code); */
109 #else 107 #else
110 types = msim_attention_types(session->account); 108 types = msim_attention_types(session->account);
111 109
112 attn = g_list_nth_data(types, code); 110 attn = g_list_nth_data(types, code);
113 if (!attn) { 111 if (!attn) {
165 gc = purple_account_get_connection(account); 163 gc = purple_account_get_connection(account);
166 session = (MsimSession *)gc->proto_data; 164 session = (MsimSession *)gc->proto_data;
167 165
168 zap = GPOINTER_TO_INT(zap_num_ptr); 166 zap = GPOINTER_TO_INT(zap_num_ptr);
169 167
168 #ifdef MSIM_USE_ATTENTION_API
169 serv_send_attention(session->gc, buddy->name, zap);
170 #else
170 g_return_if_fail(msim_send_zap(session, buddy->name, zap)); 171 g_return_if_fail(msim_send_zap(session, buddy->name, zap));
172 #endif
171 } 173 }
172 174
173 /** Return menu, if any, for a buddy list node. */ 175 /** Return menu, if any, for a buddy list node. */
174 GList * 176 GList *
175 msim_blist_node_menu(PurpleBlistNode *node) 177 msim_blist_node_menu(PurpleBlistNode *node)