#include "account.h"
#include "glib.h"
Include dependency graph for roomlist.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _PurpleRoomlist |
Represents a list of rooms for a given connection on a given protocol. More... | |
struct | _PurpleRoomlistField |
A field a room might have. More... | |
struct | _PurpleRoomlistRoom |
Represents a room. More... | |
struct | _PurpleRoomlistUiOps |
The room list ops to be filled out by the UI. More... | |
Typedefs | |
typedef _PurpleRoomlist | PurpleRoomlist |
typedef _PurpleRoomlistField | PurpleRoomlistField |
typedef _PurpleRoomlistRoom | PurpleRoomlistRoom |
typedef _PurpleRoomlistUiOps | PurpleRoomlistUiOps |
Enumerations | |
enum | PurpleRoomlistFieldType { PURPLE_ROOMLIST_FIELD_BOOL, PURPLE_ROOMLIST_FIELD_INT, PURPLE_ROOMLIST_FIELD_STRING } |
The types of fields. More... | |
enum | PurpleRoomlistRoomType { PURPLE_ROOMLIST_ROOMTYPE_CATEGORY = 0x01, PURPLE_ROOMLIST_ROOMTYPE_ROOM = 0x02 } |
The types of rooms. More... | |
Functions | |
Room List API | |
void | purple_roomlist_cancel_get_list (PurpleRoomlist *list) |
Tells the prpl to stop fetching the list. | |
void | purple_roomlist_expand_category (PurpleRoomlist *list, PurpleRoomlistRoom *category) |
Tells the prpl that a category was expanded. | |
gboolean | purple_roomlist_get_in_progress (PurpleRoomlist *list) |
Gets the "in progress" state of the room list. | |
PurpleRoomlist * | purple_roomlist_get_list (PurpleConnection *gc) |
Returns a PurpleRoomlist structure from the prpl, and instructs the prpl to start fetching the list. | |
PurpleRoomlist * | purple_roomlist_new (PurpleAccount *account) |
Returns a newly created room list object. | |
void | purple_roomlist_ref (PurpleRoomlist *list) |
Increases the reference count on the room list. | |
void | purple_roomlist_room_add (PurpleRoomlist *list, PurpleRoomlistRoom *room) |
Adds a room to the list of them. | |
void | purple_roomlist_set_fields (PurpleRoomlist *list, GList *fields) |
Set the different field types and their names for this protocol. | |
void | purple_roomlist_set_in_progress (PurpleRoomlist *list, gboolean in_progress) |
Set the "in progress" state of the room list. | |
void | purple_roomlist_show_with_account (PurpleAccount *account) |
This is used to get the room list on an account, asking the UI to pop up a dialog with the specified account already selected, and pretend the user clicked the get list button. | |
void | purple_roomlist_unref (PurpleRoomlist *list) |
Decreases the reference count on the room list. | |
Room Field API | |
PurpleRoomlistField * | purple_roomlist_field_new (PurpleRoomlistFieldType type, const gchar *label, const gchar *name, gboolean hidden) |
Creates a new field. | |
UI Registration Functions | |
PurpleRoomlistUiOps * | purple_roomlist_get_ui_ops (void) |
Returns the purple window UI operations structure to be used in new windows. | |
void | purple_roomlist_set_ui_ops (PurpleRoomlistUiOps *ops) |
Sets the UI operations structure to be used in all purple room lists. | |
Room API | |
void | purple_roomlist_room_add_field (PurpleRoomlist *list, PurpleRoomlistRoom *room, gconstpointer field) |
Adds a field to a room. | |
void | purple_roomlist_room_join (PurpleRoomlist *list, PurpleRoomlistRoom *room) |
Join a room, given a PurpleRoomlistRoom and it's associated PurpleRoomlist. | |
PurpleRoomlistRoom * | purple_roomlist_room_new (PurpleRoomlistRoomType type, const gchar *name, PurpleRoomlistRoom *parent) |
Creates a new room, to be added to the list. |
purple
Purple is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Definition in file roomlist.h.
The types of fields.
PURPLE_ROOMLIST_FIELD_BOOL | |
PURPLE_ROOMLIST_FIELD_INT | |
PURPLE_ROOMLIST_FIELD_STRING |
We do a g_strdup on the passed value if it's this type.
|
Definition at line 49 of file roomlist.h.
The types of rooms.
These are ORable flags.
PURPLE_ROOMLIST_ROOMTYPE_CATEGORY |
It's a category, but not a room you can join.
|
PURPLE_ROOMLIST_ROOMTYPE_ROOM |
It's a room, like the kind you can join.
|
Definition at line 39 of file roomlist.h.
void purple_roomlist_cancel_get_list | ( | PurpleRoomlist * | list | ) |
Tells the prpl to stop fetching the list.
If this is possible and done, the prpl will call set_in_progress with FALSE
and possibly unref the list if it took a reference.
list | The room list to cancel a get_list on. |
void purple_roomlist_expand_category | ( | PurpleRoomlist * | list, | |
PurpleRoomlistRoom * | category | |||
) |
Tells the prpl that a category was expanded.
On some protocols, the rooms in the category won't be fetched until this is called.
list | The room list. | |
category | The category that was expanded. The expression (category->type & PURPLE_ROOMLIST_ROOMTYPE_CATEGORY) must be true. |
PurpleRoomlistField* purple_roomlist_field_new | ( | PurpleRoomlistFieldType | type, | |
const gchar * | label, | |||
const gchar * | name, | |||
gboolean | hidden | |||
) |
Creates a new field.
type | The type of the field. | |
label | The i18n'ed, user displayable name. | |
name | The internal name of the field. | |
hidden | Hide the field. |
gboolean purple_roomlist_get_in_progress | ( | PurpleRoomlist * | list | ) |
Gets the "in progress" state of the room list.
The UI is encouraged to somehow hint to the user whether or not we're busy downloading a room list or not.
list | The room list. |
PurpleRoomlist* purple_roomlist_get_list | ( | PurpleConnection * | gc | ) |
Returns a PurpleRoomlist structure from the prpl, and instructs the prpl to start fetching the list.
gc | The PurpleConnection to have get a list. |
NULL
if the protocol doesn't support that. PurpleRoomlistUiOps* purple_roomlist_get_ui_ops | ( | void | ) |
Returns the purple window UI operations structure to be used in new windows.
PurpleRoomlist* purple_roomlist_new | ( | PurpleAccount * | account | ) |
Returns a newly created room list object.
It has an initial reference count of 1.
account | The account that's listing rooms. |
void purple_roomlist_ref | ( | PurpleRoomlist * | list | ) |
Increases the reference count on the room list.
list | The object to ref. |
void purple_roomlist_room_add | ( | PurpleRoomlist * | list, | |
PurpleRoomlistRoom * | room | |||
) |
Adds a room to the list of them.
list | The room list. | |
room | The room to add to the list. The GList of fields must be in the same order as was given in purple_roomlist_set_fields(). |
void purple_roomlist_room_add_field | ( | PurpleRoomlist * | list, | |
PurpleRoomlistRoom * | room, | |||
gconstpointer | field | |||
) |
Adds a field to a room.
list | The room list the room belongs to. | |
room | The room. | |
field | The field to append. Strings get g_strdup'd internally. |
void purple_roomlist_room_join | ( | PurpleRoomlist * | list, | |
PurpleRoomlistRoom * | room | |||
) |
Join a room, given a PurpleRoomlistRoom and it's associated PurpleRoomlist.
list | The room list the room belongs to. | |
room | The room to join. |
PurpleRoomlistRoom* purple_roomlist_room_new | ( | PurpleRoomlistRoomType | type, | |
const gchar * | name, | |||
PurpleRoomlistRoom * | parent | |||
) |
Creates a new room, to be added to the list.
type | The type of room. | |
name | The name of the room. | |
parent | The room's parent, if any. |
void purple_roomlist_set_fields | ( | PurpleRoomlist * | list, | |
GList * | fields | |||
) |
Set the different field types and their names for this protocol.
This must be called before purple_roomlist_room_add().
list | The room list. | |
fields | A GList of PurpleRoomlistField's. UI's are encouraged to default to displaying them in the order given. |
void purple_roomlist_set_in_progress | ( | PurpleRoomlist * | list, | |
gboolean | in_progress | |||
) |
Set the "in progress" state of the room list.
The UI is encouraged to somehow hint to the user whether or not we're busy downloading a room list or not.
list | The room list. | |
in_progress | We're downloading it, or we're not. |
void purple_roomlist_set_ui_ops | ( | PurpleRoomlistUiOps * | ops | ) |
Sets the UI operations structure to be used in all purple room lists.
ops | The UI operations structure. |
void purple_roomlist_show_with_account | ( | PurpleAccount * | account | ) |
This is used to get the room list on an account, asking the UI to pop up a dialog with the specified account already selected, and pretend the user clicked the get list button.
While we're pretending, predend I didn't say anything about dialogs or buttons, since this is the core.
account | The account to get the list on. |
void purple_roomlist_unref | ( | PurpleRoomlist * | list | ) |
Decreases the reference count on the room list.
The room list will be destroyed when this reaches 0.
list | The room list object to unref and possibly destroy. |