comparison libpurple/protocols/msn/user.c @ 31169:02dc01aa8c07

This are MsnUser functions, move them there.
author masca@cpw.pidgin.im
date Sat, 15 May 2010 02:46:38 +0000
parents edb7c80bf930
children 0c090a41522c
comparison
equal deleted inserted replaced
31168:f8ec889c5bce 31169:02dc01aa8c07
630 return FALSE; 630 return FALSE;
631 } 631 }
632 632
633 return (user->clientid & capability) && (user->extcaps & extcap); 633 return (user->clientid & capability) && (user->extcaps & extcap);
634 } 634 }
635
636 /**************************************************************************
637 * Utility functions
638 **************************************************************************/
639
640 gboolean
641 msn_user_is_in_group(MsnUser *user, const char * group_id)
642 {
643 if (user == NULL)
644 return FALSE;
645
646 if (group_id == NULL)
647 return FALSE;
648
649 return (g_list_find_custom(user->group_ids, group_id, (GCompareFunc)strcmp)) != NULL;
650 }
651
652 gboolean
653 msn_user_is_in_list(MsnUser *user, MsnListId list_id)
654 {
655 if (user == NULL)
656 return FALSE;
657
658 return (user->list_op & (1 << list_id));
659 }
660