Mercurial > pidgin.yaz
changeset 19753:88b0c434259a
[gaim-migrate @ 16733]
change the BL process method
continue to debug
This is an in progress version,continue to add support for send Yahoo Message
committed by Ma Yuan <mayuan2006@gmail.com>
committer: Ethan Blanton <elb@pidgin.im>
author | Ma Yuan <mayuan2006@gmail.com> |
---|---|
date | Sun, 13 Aug 2006 06:09:48 +0000 |
parents | c2f3cd6626e1 |
children | da3f8f7ec3ce |
files | src/protocols/msn/contact.c src/protocols/msn/msn.h src/protocols/msn/notification.c src/protocols/msn/userlist.c |
diffstat | 4 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/contact.c Sat Aug 12 12:57:16 2006 +0000 +++ b/src/protocols/msn/contact.c Sun Aug 13 06:09:48 2006 +0000 @@ -91,8 +91,8 @@ return MSN_LIST_AL_OP; }else if(!strcmp(role,"Block")){ return MSN_LIST_BL_OP; -// }else if(!strcmp(role,"Reverse")){ -// return MSN_LIST_RL_OP; + }else if(!strcmp(role,"Reverse")){ + return MSN_LIST_RL_OP; } return 0; } @@ -326,7 +326,7 @@ } msn_user_set_uid(user,uid); msn_user_set_type(user,msn_get_user_type(type)); - user->list_op |= 1; + user->list_op |= MSN_LIST_FL_OP; gaim_debug_misc("MsnContact","\n"); groupIds = xmlnode_get_child(contactInfo,"groupIds");
--- a/src/protocols/msn/msn.h Sat Aug 12 12:57:16 2006 +0000 +++ b/src/protocols/msn/msn.h Sun Aug 13 06:09:48 2006 +0000 @@ -100,6 +100,7 @@ MSN_LIST_RL_OP = 0x08 } MsnListOp; +#define MSN_LIST_OP_MASK 0x07 typedef enum {
--- a/src/protocols/msn/notification.c Sat Aug 12 12:57:16 2006 +0000 +++ b/src/protocols/msn/notification.c Sun Aug 13 06:09:48 2006 +0000 @@ -481,11 +481,18 @@ gaim_debug_info("MaYuan","list_op:%d\n",list_op_str); xmlnode_set_attrib(c_node,"l",list_op_str); g_free(list_op_str); -#if 0 +#if 1 type_str = g_strdup_printf("%d",type); xmlnode_set_attrib(c_node,"t",type_str); #else - type_str = g_strdup_printf("1"); + if(g_strrstr(domain,"yahoo") != NULL){ + type_str = g_strdup_printf("31"); + }else{ + /*passport*/ + type_str = g_strdup_printf("1"); + } + /*mobile*/ + //type_str = g_strdup_printf("4"); xmlnode_set_attrib(c_node,"t",type_str); g_free(type_str); #endif @@ -514,7 +521,7 @@ /*get the userlist*/ for (l = userlist->users; l != NULL; l = l->next){ user = l->data; - msn_add_contact_xml(adl_node,user->passport,user->list_op,user->type); + msn_add_contact_xml(adl_node,user->passport,user->list_op&MSN_LIST_OP_MASK,user->type); } payload = xmlnode_to_str(adl_node,&payload_len); @@ -739,6 +746,7 @@ state = cmd->params[1]; passport = cmd->params[2]; + /*if a contact is actually on the WLM part or the yahoo part*/ wlmclient = atoi(cmd->params[3]); friendly = gaim_url_decode(cmd->params[4]);
--- a/src/protocols/msn/userlist.c Sat Aug 12 12:57:16 2006 +0000 +++ b/src/protocols/msn/userlist.c Sun Aug 13 06:09:48 2006 +0000 @@ -228,6 +228,7 @@ const char *passport; const char *friendly; + gaim_debug_info("MaYuan","got add user...\n"); account = session->account; passport = msn_user_get_passport(user); @@ -675,9 +676,8 @@ gaim_debug_info("MaYuan", "add user:{%s} to group id {%s}\n",store_name ,group_id); msn_add_contact(userlist->session->contact,who,group_id); -/* msn_notification_add_buddy(userlist->session->notification, list, who, + msn_notification_add_buddy(userlist->session->notification, list, who, store_name, group_id); - */ } void