comparison libpurple/blist.c @ 29742:422889fb57e0

propagate from branch 'im.pidgin.pidgin' (head 9028ac0daaa1f7e565726fa39aca22ce7d3ecc49) to branch 'im.pidgin.pidgin.next.minor' (head debffa49382d07f0934a2b22a035940cb8f7892f)
author Paul Aurich <paul@darkrain42.org>
date Thu, 04 Feb 2010 05:30:35 +0000
parents e26af064fe8c
children 4076f53cdd84 73b005a20d06
comparison
equal deleted inserted replaced
29354:86ee7772936f 29742:422889fb57e0
1737 g_free(contact->alias); 1737 g_free(contact->alias);
1738 PURPLE_DBUS_UNREGISTER_POINTER(contact); 1738 PURPLE_DBUS_UNREGISTER_POINTER(contact);
1739 g_free(contact); 1739 g_free(contact);
1740 } 1740 }
1741 1741
1742 PurpleGroup *
1743 purple_contact_get_group(const PurpleContact *contact)
1744 {
1745 g_return_val_if_fail(contact, NULL);
1746
1747 return (PurpleGroup *)(((PurpleBlistNode *)contact)->parent);
1748 }
1749
1742 void purple_contact_set_alias(PurpleContact *contact, const char *alias) 1750 void purple_contact_set_alias(PurpleContact *contact, const char *alias)
1743 { 1751 {
1744 purple_blist_alias_contact(contact,alias); 1752 purple_blist_alias_contact(contact,alias);
1745 } 1753 }
1746 1754
2601 2609
2602 PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy) 2610 PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy)
2603 { 2611 {
2604 g_return_val_if_fail(buddy != NULL, NULL); 2612 g_return_val_if_fail(buddy != NULL, NULL);
2605 return buddy->presence; 2613 return buddy->presence;
2614 }
2615
2616 PurpleMediaCaps purple_buddy_get_media_caps(const PurpleBuddy *buddy)
2617 {
2618 g_return_val_if_fail(buddy != NULL, 0);
2619 return buddy->media_caps;
2620 }
2621
2622 void purple_buddy_set_media_caps(PurpleBuddy *buddy, PurpleMediaCaps media_caps)
2623 {
2624 g_return_if_fail(buddy != NULL);
2625 buddy->media_caps = media_caps;
2606 } 2626 }
2607 2627
2608 PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy) 2628 PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy)
2609 { 2629 {
2610 g_return_val_if_fail(buddy != NULL, NULL); 2630 g_return_val_if_fail(buddy != NULL, NULL);
3185 purple_marshal_VOID__POINTER_POINTER, NULL, 2, 3205 purple_marshal_VOID__POINTER_POINTER, NULL, 2,
3186 purple_value_new(PURPLE_TYPE_SUBTYPE, 3206 purple_value_new(PURPLE_TYPE_SUBTYPE,
3187 PURPLE_SUBTYPE_BLIST_NODE), 3207 PURPLE_SUBTYPE_BLIST_NODE),
3188 purple_value_new(PURPLE_TYPE_STRING)); 3208 purple_value_new(PURPLE_TYPE_STRING));
3189 3209
3210 purple_signal_register(handle, "buddy-caps-changed",
3211 purple_marshal_VOID__POINTER_INT_INT, NULL,
3212 3, purple_value_new(PURPLE_TYPE_SUBTYPE,
3213 PURPLE_SUBTYPE_BLIST_BUDDY),
3214 purple_value_new(PURPLE_TYPE_INT),
3215 purple_value_new(PURPLE_TYPE_INT));
3216
3190 purple_signal_connect(purple_accounts_get_handle(), "account-created", 3217 purple_signal_connect(purple_accounts_get_handle(), "account-created",
3191 handle, 3218 handle,
3192 PURPLE_CALLBACK(purple_blist_buddies_cache_add_account), 3219 PURPLE_CALLBACK(purple_blist_buddies_cache_add_account),
3193 NULL); 3220 NULL);
3194 3221