im.pidgin.pidgin: c202fe8ca9c6222af90eeea502fdad5e8123d06c

sadrul at pidgin.im sadrul at pidgin.im
Sun Jan 6 14:00:50 EST 2008


-----------------------------------------------------------------
Revision: c202fe8ca9c6222af90eeea502fdad5e8123d06c
Ancestor: cfbfcf4098c65b271fa8a29be41a318ccb5e5035
Author: sadrul at pidgin.im
Date: 2008-01-06T18:52:15
Branch: im.pidgin.pidgin

Modified files:
        ChangeLog.API libpurple/roomlist.c libpurple/roomlist.h

ChangeLog: 

A list of accessor functions to the roomlist API.

-------------- next part --------------
============================================================
--- ChangeLog.API	f61dd7d4b68fde2460111c1c8dcbb1db3ae8ad9c
+++ ChangeLog.API	278b3d23289c0db227c989674612be204e58c60c
@@ -9,6 +9,15 @@ version 2.4.0 (??/??/????):
 		  purple_micro_version variables are exported by version.h,
 		  giving the version of libpurple in use at runtime.
 		* purple_util_set_current_song, purple_util_format_song_info
+		* Some accessor functions to the Roomlist API:
+			* purple_roomlist_get_fields
+			* purple_roomlist_room_get_type
+			* purple_roomlist_room_get_name
+			* purple_roomlist_room_get_parent
+			* purple_roomlist_room_get_fields
+			* purple_roomlist_field_get_type
+			* purple_roomlist_field_get_label
+			* purple_roomlist_field_get_hidden
 
 	Pidgin:
 		Added:
============================================================
--- libpurple/roomlist.c	ce8e8e7a5ba9402fc1f05e420f28463420fa077a
+++ libpurple/roomlist.c	8b066b55c6d3953503739a094d83365463a095da
@@ -218,6 +218,11 @@ void purple_roomlist_expand_category(Pur
 		prpl_info->roomlist_expand_category(list, category);
 }
 
+GList * purple_roomlist_get_fields(PurpleRoomlist *list)
+{
+	return list->fields;
+}
+
 /*@}*/
 
 /**************************************************************************/
@@ -293,6 +298,26 @@ void purple_roomlist_room_join(PurpleRoo
 	g_hash_table_destroy(components);
 }
 
+PurpleRoomlistRoomType purple_roomlist_room_get_type(PurpleRoomlistRoom *room)
+{
+	return room->type;
+}
+
+const char * purple_roomlist_room_get_name(PurpleRoomlistRoom *room)
+{
+	return room->name;
+}
+
+PurpleRoomlistRoom * purple_roomlist_room_get_parent(PurpleRoomlistRoom *room)
+{
+	return room->parent;
+}
+
+GList * purple_roomlist_room_get_fields(PurpleRoomlistRoom *room)
+{
+	return room->fields;
+}
+
 /*@}*/
 
 /**************************************************************************/
@@ -319,6 +344,21 @@ PurpleRoomlistField *purple_roomlist_fie
 	return f;
 }
 
+PurpleRoomlistFieldType purple_roomlist_field_get_type(PurpleRoomlistField *field)
+{
+	return field->type;
+}
+
+const char * purple_roomlist_field_get_label(PurpleRoomlistField *field)
+{
+	return field->label;
+}
+
+gboolean purple_roomlist_field_get_hidden(PurpleRoomlistField *field)
+{
+	return field->hidden;
+}
+
 /*@}*/
 
 /**************************************************************************/
============================================================
--- libpurple/roomlist.h	72e90ede8faf5999be3eae929731521721a85186
+++ libpurple/roomlist.h	7418d600e0ad80f52143b1c6964695b863fd50a2
@@ -237,6 +237,15 @@ void purple_roomlist_expand_category(Pur
  */
 void purple_roomlist_expand_category(PurpleRoomlist *list, PurpleRoomlistRoom *category);
 
+/**
+ * Get the list of fields for a roomlist.
+ *
+ * @param roomlist  The roomlist, which must not be @c NULL.
+ * @constreturn A list of fields
+ * @since 2.4.0
+ */
+GList * purple_roomlist_get_fields(PurpleRoomlist *roomlist);
+
 /*@}*/
 
 /**************************************************************************/
@@ -273,6 +282,39 @@ void purple_roomlist_room_join(PurpleRoo
  */
 void purple_roomlist_room_join(PurpleRoomlist *list, PurpleRoomlistRoom *room);
 
+/**
+ * Get the type of a room.
+ * @param room  The room, which must not be @c NULL.
+ * @return The type of the room.
+ * @since 2.4.0
+ */
+PurpleRoomlistRoomType purple_roomlist_room_get_type(PurpleRoomlistRoom *room);
+
+/**
+ * Get the name of a room.
+ * @param room  The room, which must not be @c NULL.
+ * @return The name of the room.
+ * @since 2.4.0
+ */
+const char * purple_roomlist_room_get_name(PurpleRoomlistRoom *room);
+
+/**
+ * Get the parent of a room.
+ * @param room  The room, which must not be @c NULL.
+ * @return The parent of the room, which can be @c NULL.
+ * @since 2.4.0
+ */
+PurpleRoomlistRoom * purple_roomlist_room_get_parent(PurpleRoomlistRoom *room);
+
+/**
+ * Get the list of fields for a room.
+ *
+ * @param room  The room, which must not be @c NULL.
+ * @constreturn A list of fields
+ * @since 2.4.0
+ */
+GList * purple_roomlist_room_get_fields(PurpleRoomlistRoom *room);
+
 /*@}*/
 
 /**************************************************************************/
@@ -294,6 +336,36 @@ PurpleRoomlistField *purple_roomlist_fie
 PurpleRoomlistField *purple_roomlist_field_new(PurpleRoomlistFieldType type,
                                            const gchar *label, const gchar *name,
                                            gboolean hidden);
+
+/**
+ * Get the type of a field.
+ *
+ * @param field  A PurpleRoomlistField, which must not be @c NULL.
+ *
+ * @return  The type of the field.
+ * @since 2.4.0
+ */
+PurpleRoomlistFieldType purple_roomlist_field_get_type(PurpleRoomlistField *field);
+
+/**
+ * Get the label of a field.
+ *
+ * @param field  A PurpleRoomlistField, which must not be @c NULL.
+ *
+ * @return  The label of the field.
+ * @since 2.4.0
+ */
+const char * purple_roomlist_field_get_label(PurpleRoomlistField *field);
+
+/**
+ * Check whether a roomlist-field is hidden.
+ * @param field  A PurpleRoomlistField, which must not be @c NULL.
+ *
+ * @return  @c TRUE if the field is hidden, @c FALSE otherwise.
+ * @since 2.4.0
+ */
+gboolean purple_roomlist_field_get_hidden(PurpleRoomlistField *field);
+
 /*@}*/
 
 /**************************************************************************/


More information about the Commits mailing list