# HG changeset patch # User Sadrul Habib Chowdhury # Date 1200970796 0 # Node ID 8c5d0180c326c468f8593ec772a27bd85308da8c # Parent 2bff44d78523a06b10e598b8adca40c177c028e9 Add an accessor function for PurpleChat. diff -r 2bff44d78523 -r 8c5d0180c326 ChangeLog.API --- a/ChangeLog.API Mon Jan 21 19:43:55 2008 +0000 +++ b/ChangeLog.API Tue Jan 22 02:59:56 2008 +0000 @@ -34,6 +34,7 @@ * purple_blist_node_get_parent * purple_blist_node_get_first_child * purple_blist_node_get_sibling_next + * purple_chat_get_account Pidgin: Added: diff -r 2bff44d78523 -r 8c5d0180c326 libpurple/blist.c --- a/libpurple/blist.c Mon Jan 21 19:43:55 2008 +0000 +++ b/libpurple/blist.c Tue Jan 22 02:59:56 2008 +0000 @@ -2247,6 +2247,14 @@ return (PurpleGroup *)(((PurpleBlistNode *)chat)->parent); } +PurpleAccount * +purple_chat_get_account(PurpleChat *chat) +{ + g_return_val_if_fail(chat != NULL, NULL); + + return chat->account; +} + PurpleContact *purple_buddy_get_contact(PurpleBuddy *buddy) { g_return_val_if_fail(buddy != NULL, NULL); diff -r 2bff44d78523 -r 8c5d0180c326 libpurple/blist.h --- a/libpurple/blist.h Mon Jan 21 19:43:55 2008 +0000 +++ b/libpurple/blist.h Tue Jan 22 02:59:56 2008 +0000 @@ -706,6 +706,16 @@ PurpleGroup *purple_chat_get_group(PurpleChat *chat); /** + * Returns the account the chat belongs to. + * + * @param chat The chat. + * + * @return The account the chat belongs to. + * @since 2.4.0 + */ +PurpleAccount *purple_chat_get_account(PurpleChat *chat); + +/** * Returns the group of which the buddy is a member. * * @param buddy The buddy