changeset 29333:4055d0f7f1ea

added some api for the media caps member of PurpleBuddy
author Gary Kramlich <grim@reaperworld.com>
date Fri, 11 Dec 2009 00:54:46 +0000
parents dba5d0f7bb39
children 31a34388fb1d
files libpurple/blist.c libpurple/blist.h
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Fri Dec 11 00:45:48 2009 +0000
+++ b/libpurple/blist.c	Fri Dec 11 00:54:46 2009 +0000
@@ -2605,6 +2605,18 @@
 	return buddy->presence;
 }
 
+PurpleMediaCaps purple_buddy_get_media_caps(const PurpleBuddy *buddy)
+{
+	g_return_val_if_fail(buddy != NULL, 0);
+	return buddy->media_caps;
+}
+
+void purple_buddy_set_media_caps(PurpleBuddy *buddy, PurpleMediaCaps media_caps)
+{
+	g_return_if_fail(buddy != NULL);
+	buddy->media_caps = media_caps;
+}
+
 PurpleGroup *purple_buddy_get_group(PurpleBuddy *buddy)
 {
 	g_return_val_if_fail(buddy != NULL, NULL);
--- a/libpurple/blist.h	Fri Dec 11 00:45:48 2009 +0000
+++ b/libpurple/blist.h	Fri Dec 11 00:54:46 2009 +0000
@@ -659,6 +659,24 @@
 PurplePresence *purple_buddy_get_presence(const PurpleBuddy *buddy);
 
 /**
+ * Gets the media caps from a buddy.
+ *
+ * @param buddy The buddy.
+ * @return      The media caps.
+ *
+ * @since 2.7.0
+ */
+PurpleMediaCaps purple_buddy_get_media_caps(const PurpleBuddy *buddy);
+
+/**
+ * Sets the media caps for a buddy.
+ *
+ * @param buddy      The PurpleBuddy.
+ * @param media_caps The PurpleMediaCaps.
+ */
+void purple_buddy_set_media_caps(PurpleBuddy *buddy, PurpleMediaCaps media_caps);
+
+/**
  * Adds a new buddy to the buddy list.
  *
  * The buddy will be inserted right after node or prepended to the