pidgin: d75d4aed: Remove some unused code.
qulogic at pidgin.im
qulogic at pidgin.im
Mon May 18 23:50:54 EDT 2009
-----------------------------------------------------------------
Revision: d75d4aed662c706abe8f601eaf1f33c2c4957228
Ancestor: 69b2bb94c87a3c61f87e566b229e8e2106e9c786
Author: qulogic at pidgin.im
Date: 2009-05-18T23:06:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d75d4aed662c706abe8f601eaf1f33c2c4957228
Modified files:
libpurple/protocols/msn/userlist.c
libpurple/protocols/msn/userlist.h
ChangeLog:
Remove some unused code.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/userlist.c bdf59cfeec2a62bd1b87a6579ce0d565aa2c826a
+++ libpurple/protocols/msn/userlist.c 8ccf29acbe436fef36baf7025ff7139917b20c00
@@ -142,156 +142,7 @@ msn_userlist_user_is_in_list(MsnUser *us
* Server functions
**************************************************************************/
-MsnListId
-msn_get_list_id(const char *list)
-{
- if (list[0] == 'F')
- return MSN_LIST_FL;
- else if (list[0] == 'A')
- return MSN_LIST_AL;
- else if (list[0] == 'B')
- return MSN_LIST_BL;
- else if (list[0] == 'R')
- return MSN_LIST_RL;
-
- return -1;
-}
-
-/* this function msn_got_add_user isn't called anywhere */
void
-msn_got_add_user(MsnSession *session, MsnUser *user,
- MsnListId list_id, const char * group_id)
-{
- PurpleAccount *account;
- const char *passport;
- const char *friendly;
-
- purple_debug_info("msn", "got add user...\n");
- account = session->account;
-
- passport = msn_user_get_passport(user);
- friendly = msn_user_get_friendly_name(user);
-
- if (list_id == MSN_LIST_FL)
- {
- PurpleConnection *gc;
-
- gc = purple_account_get_connection(account);
-
- serv_got_alias(gc, passport, friendly);
-
- if (group_id != NULL)
- {
- msn_user_add_group_id(user, group_id);
- }
- }
- else if (list_id == MSN_LIST_AL)
- {
- purple_privacy_permit_add(account, passport, TRUE);
- }
- else if (list_id == MSN_LIST_BL)
- {
- purple_privacy_deny_add(account, passport, TRUE);
- }
- else if (list_id == MSN_LIST_RL)
- {
- PurpleConversation *convo;
-
- purple_debug_info("msn",
- "%s has added you to his or her buddy list.\n",
- passport);
-
- convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, passport, account);
- if (convo) {
- PurpleBuddy *buddy;
- char *msg;
-
- buddy = purple_find_buddy(account, passport);
- msg = g_strdup_printf(
- _("%s has added you to his or her buddy list."),
- buddy ? purple_buddy_get_contact_alias(buddy) : passport);
- purple_conv_im_write(PURPLE_CONV_IM(convo), passport, msg,
- PURPLE_MESSAGE_SYSTEM, time(NULL));
- g_free(msg);
- }
-
- if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP)))
- {
- /*
- * TODO: The friendly name was NULL for me when I
- * looked at this. Maybe we should use the store
- * name instead? --KingAnt
- */
-/* got_new_entry(gc, passport, friendly); */
- }
- }
-
- user->list_op |= (1 << list_id);
- /* purple_user_add_list_id (user, list_id); */
-}
-
-void
-msn_got_rem_user(MsnSession *session, MsnUser *user,
- MsnListId list_id, const char * group_id)
-{
- PurpleAccount *account;
- const char *passport;
-
- account = session->account;
-
- passport = msn_user_get_passport(user);
-
- if (list_id == MSN_LIST_FL)
- {
- /* TODO: When is the user totally removed? */
- if (group_id != NULL)
- {
- msn_user_remove_group_id(user, group_id);
- return;
- }
- }
- else if (list_id == MSN_LIST_AL)
- {
- purple_privacy_permit_remove(account, passport, TRUE);
- }
- else if (list_id == MSN_LIST_BL)
- {
- purple_privacy_deny_remove(account, passport, TRUE);
- }
- else if (list_id == MSN_LIST_RL)
- {
- PurpleConversation *convo;
-
- purple_debug_info("msn",
- "%s has removed you from his or her buddy list.\n",
- passport);
-
- convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, passport, account);
- if (convo) {
- PurpleBuddy *buddy;
- char *msg;
-
- buddy = purple_find_buddy(account, passport);
- msg = g_strdup_printf(
- _("%s has removed you from his or her buddy list."),
- buddy ? purple_buddy_get_contact_alias(buddy) : passport);
- purple_conv_im_write(PURPLE_CONV_IM(convo), passport, msg,
- PURPLE_MESSAGE_SYSTEM, time(NULL));
- g_free(msg);
- }
- }
-
- user->list_op &= ~(1 << list_id);
- /* purple_user_remove_list_id (user, list_id); */
-
- if (user->list_op == 0)
- {
- purple_debug_info("msn", "Buddy '%s' shall be deleted?.\n",
- passport);
- }
-}
-
-void
msn_got_lst_user(MsnSession *session, MsnUser *user,
int list_op, GSList *group_ids)
{
============================================================
--- libpurple/protocols/msn/userlist.h 236de1e3340d8437f04814cb4b1ff27caca260d2
+++ libpurple/protocols/msn/userlist.h 17b5ee141bf1dec65d2d36dda5a8d689b4a80b5d
@@ -57,12 +57,7 @@ gboolean msn_userlist_user_is_in_list(Ms
gboolean msn_userlist_user_is_in_group(MsnUser *user, const char * group_id);
gboolean msn_userlist_user_is_in_list(MsnUser *user, MsnListId list_id);
-MsnListId msn_get_list_id(const char *list);
-void msn_got_add_user(MsnSession *session, MsnUser *user,
- MsnListId list_id, const char *group_id);
-void msn_got_rem_user(MsnSession *session, MsnUser *user,
- MsnListId list_id, const char *group_id);
void msn_got_lst_user(MsnSession *session, MsnUser *user,
int list_op, GSList *group_ids);
More information about the Commits
mailing list