changeset 22169:8c5d0180c326

Add an accessor function for PurpleChat.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 22 Jan 2008 02:59:56 +0000
parents 2bff44d78523
children 364e67f1a429
files ChangeLog.API libpurple/blist.c libpurple/blist.h
diffstat 3 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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);
--- 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