conversation.h
Go to the documentation of this file.
1 
7 /* purple
8  *
9  * Purple is the legal property of its developers, whose names are too numerous
10  * to list here. Please refer to the COPYRIGHT file distributed with this
11  * source distribution.
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26  */
27 #ifndef _PURPLE_CONVERSATION_H_
28 #define _PURPLE_CONVERSATION_H_
29 
30 /**************************************************************************/
32 /**************************************************************************/
33 
34 
40 typedef struct _PurpleConvIm PurpleConvIm;
47 
51 typedef enum
52 {
60 
64 typedef enum
65 {
76  /*
77  * XXX These need to go when we implement a more generic core/UI event
78  * system.
79  */
84  PURPLE_CONV_UPDATE_TITLE,
85  PURPLE_CONV_UPDATE_CHATLEFT,
86 
90 
94 typedef enum
95 {
101 
105 typedef enum
106 {
131 
135 typedef enum
136 {
140  PURPLE_CBFLAGS_OP = 0x0004,
146 
147 #include "account.h"
148 #include "buddyicon.h"
149 #include "log.h"
150 #include "server.h"
151 
159 {
164 
171  void (*write_chat)(PurpleConversation *conv, const char *who,
172  const char *message, PurpleMessageFlags flags,
173  time_t mtime);
178  void (*write_im)(PurpleConversation *conv, const char *who,
179  const char *message, PurpleMessageFlags flags,
180  time_t mtime);
190  const char *name,
191  const char *alias,
192  const char *message,
193  PurpleMessageFlags flags,
194  time_t mtime);
195 
203  GList *cbuddies,
204  gboolean new_arrivals);
210  void (*chat_rename_user)(PurpleConversation *conv, const char *old_name,
211  const char *new_name, const char *new_alias);
216  void (*chat_remove_users)(PurpleConversation *conv, GList *users);
220  void (*chat_update_user)(PurpleConversation *conv, const char *user);
221 
225  void (*present)(PurpleConversation *conv);
226 
231  gboolean (*has_focus)(PurpleConversation *conv);
232 
233  /* Custom Smileys */
234  gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote);
235  void (*custom_smiley_write)(PurpleConversation *conv, const char *smile,
236  const guchar *data, gsize size);
237  void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
238 
244  void (*send_confirm)(PurpleConversation *conv, const char *message);
245 
246  void (*_purple_reserved1)(void);
247  void (*_purple_reserved2)(void);
248  void (*_purple_reserved3)(void);
249  void (*_purple_reserved4)(void);
250 };
251 
256 {
261  time_t type_again;
265 };
266 
271 {
274  GList *in_room;
277  GList *ignored;
278  char *who;
279  char *topic;
280  int id;
281  char *nick;
283  gboolean left;
284  GHashTable *users;
287 };
288 
293 {
294  char *name;
295  char *alias;
298  char *alias_key;
303  gboolean buddy;
309  GHashTable *attributes;
312  gpointer ui_data;
313 };
314 
321 {
322  char *who;
323  char *what;
324  PurpleMessageFlags flags;
325  time_t when;
327  char *alias;
328 };
329 
336 {
342  char *name;
343  char *title;
345  gboolean logging;
347  GList *logs;
349  union
350  {
353  void *misc;
355  } u;
356 
358  void *ui_data;
360  GHashTable *data;
364 };
365 
366 #ifdef __cplusplus
367 extern "C" {
368 #endif
369 
370 /**************************************************************************/
372 /**************************************************************************/
387  PurpleAccount *account,
388  const char *name);
389 
400 
401 
408 
409 
418 
427 
434 
443  const PurpleConversation *conv);
444 
455  PurpleAccount *account);
456 
468 
479 
486 void purple_conversation_set_title(PurpleConversation *conv, const char *title);
487 
495 const char *purple_conversation_get_title(const PurpleConversation *conv);
496 
506 
513 void purple_conversation_set_name(PurpleConversation *conv, const char *name);
514 
523 const char *purple_conversation_get_name(const PurpleConversation *conv);
524 
533 const char *purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key);
534 
543 
552 void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value);
553 
562 void
563 purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values);
564 
571 void purple_conversation_set_logging(PurpleConversation *conv, gboolean log);
572 
581 
592 
603 
604 #define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c))
605 
616 
617 #define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c))
618 
626 void purple_conversation_set_data(PurpleConversation *conv, const char *key,
627  gpointer data);
628 
637 gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
638 
646 GList *purple_get_conversations(void);
647 
653 GList *purple_get_ims(void);
654 
660 GList *purple_get_chats(void);
661 
672  PurpleConversationType type, const char *name,
673  const PurpleAccount *account);
674 
695 void purple_conversation_write(PurpleConversation *conv, const char *who,
696  const char *message, PurpleMessageFlags flags,
697  time_t mtime);
698 
705  PurpleConnectionFlags features);
706 
707 
713 
723 
731 
737 void purple_conversation_foreach(void (*func)(PurpleConversation *conv));
738 
751 
760 
771 
782 
793 
804 
808 /**************************************************************************/
810 /**************************************************************************/
821 
834 
843 
851 
860 
868 
875 
884 
896 void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val);
897 
907 
914 
921 
930 
937 
947 void purple_conv_im_write(PurpleConvIm *im, const char *who,
948  const char *message, PurpleMessageFlags flags,
949  time_t mtime);
950 
964 gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what);
965 
972 void purple_conv_im_send(PurpleConvIm *im, const char *message);
973 
986 void purple_conv_send_confirm(PurpleConversation *conv, const char *message);
987 
995 void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags);
996 
1016 gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile,
1017  const char *cksum_type, const char *chksum,
1018  gboolean remote);
1019 
1020 
1031  const char *smile,
1032  const guchar *data,
1033  gsize size);
1034 
1044 void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile);
1045 
1049 /**************************************************************************/
1051 /**************************************************************************/
1062 
1077 GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users);
1078 
1087 GList *purple_conv_chat_get_users(const PurpleConvChat *chat);
1088 
1095 void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name);
1096 
1103 void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name);
1104 
1113 GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored);
1114 
1122 GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat);
1123 
1138 const char *purple_conv_chat_get_ignored_user(const PurpleConvChat *chat,
1139  const char *user);
1140 
1150  const char *user);
1151 
1159 void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who,
1160  const char *topic);
1161 
1169 const char *purple_conv_chat_get_topic(const PurpleConvChat *chat);
1170 
1177 void purple_conv_chat_set_id(PurpleConvChat *chat, int id);
1178 
1186 int purple_conv_chat_get_id(const PurpleConvChat *chat);
1187 
1197 void purple_conv_chat_write(PurpleConvChat *chat, const char *who,
1198  const char *message, PurpleMessageFlags flags,
1199  time_t mtime);
1200 
1207 void purple_conv_chat_send(PurpleConvChat *chat, const char *message);
1208 
1216 void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags);
1217 
1227 void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user,
1228  const char *extra_msg, PurpleConvChatBuddyFlags flags,
1229  gboolean new_arrival);
1230 
1248 void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs,
1249  GList *flags, gboolean new_arrivals);
1250 
1258 void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user,
1259  const char *new_user);
1260 
1270 void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user,
1271  const char *reason);
1272 
1280 void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users,
1281  const char *reason);
1282 
1291 gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user);
1292 
1300 void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user,
1301  PurpleConvChatBuddyFlags flags);
1302 
1312  const char *user);
1313 
1320 
1327 void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick);
1328 
1335 const char *purple_conv_chat_get_nick(PurpleConvChat *chat);
1336 
1346 
1354 
1368 void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
1369  const char *message, gboolean confirm);
1370 
1381 
1391 PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias,
1392  PurpleConvChatBuddyFlags flags);
1393 
1401 
1410 
1417 
1430 
1444 gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error);
1445 
1448 /**************************************************************************/
1450 /**************************************************************************/
1459 
1463 void purple_conversations_init(void);
1464 
1468 void purple_conversations_uninit(void);
1469 
1472 #ifdef __cplusplus
1473 }
1474 #endif
1475 
1476 #endif /* _PURPLE_CONVERSATION_H_ */
void(* present)(PurpleConversation *conv)
Present this conversation to the user; for example, by displaying the IM dialog.
Definition: conversation.h:225
void purple_conversations_init(void)
Initializes the conversation subsystem.
GList * purple_conv_chat_set_users(PurpleConvChat *chat, GList *users)
Sets the list of users in the chat room.
void purple_conv_chat_left(PurpleConvChat *chat)
Lets the core know we left a chat, without destroying it.
PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im)
Returns the IM's typing state.
PurpleMessageFlags
Flags applicable to a message.
Definition: conversation.h:105
GList * purple_conversation_get_extended_menu(PurpleConversation *conv)
Retrieves the extended menu items for the conversation.
PurpleConvChatBuddyFlags
Flags applicable to users in Chats.
Definition: conversation.h:135
PurpleConnectionFlags features
The supported features.
Definition: conversation.h:362
PurpleConnection * purple_conversation_get_gc(const PurpleConversation *conv)
Returns the specified conversation's purple_connection.
The other user's buddy icon changed.
Definition: conversation.h:83
gboolean(* has_focus)(PurpleConversation *conv)
If this UI has a concept of focus (as in a windowing system) and this conversation has the focus...
Definition: conversation.h:231
void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who, const char *topic)
Sets the chat room's topic.
void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout)
Starts the IM's typing timeout.
GList * logs
This conversation's logs.
Definition: conversation.h:347
Voiced user or "Participant".
Definition: conversation.h:138
void(* write_conv)(PurpleConversation *conv, const char *name, const char *alias, const char *message, PurpleMessageFlags flags, time_t mtime)
Write a message to a conversation.
Definition: conversation.h:189
Message should not be auto- linkified.
Definition: conversation.h:127
The unseen state was updated.
Definition: conversation.h:72
PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv)
Get the features supported by the given conversation.
gboolean left
We left the chat and kept the window open.
Definition: conversation.h:283
One of the user's accounts went online.
Definition: conversation.h:80
Hint to the UI that this message should not be shown in conversations which are only open for interna...
Definition: conversation.h:111
void purple_conversation_set_features(PurpleConversation *conv, PurpleConnectionFlags features)
Set the features as supported for the given conversation.
PurpleConversationUiOps * purple_conversation_get_ui_ops(const PurpleConversation *conv)
Returns the specified conversation's UI operations structure.
char * alias
The chat participant's alias, if known; NULL otherwise.
Definition: conversation.h:295
Description of a conversation message.
Definition: conversation.h:320
GList * purple_conv_chat_get_ignored(const PurpleConvChat *chat)
Returns the list of ignored users in the chat room.
void purple_conversation_set_data(PurpleConversation *conv, const char *key, gpointer data)
Sets extra data for a conversation.
Currently typing.
Definition: conversation.h:97
char * nick
Your nick in this chat.
Definition: conversation.h:281
GList * purple_get_ims(void)
Returns a list of all IMs.
PurpleConversation * conv
Definition: conversation.h:326
Message contains images.
Definition: conversation.h:125
void(* send_confirm)(PurpleConversation *conv, const char *message)
Prompt the user for confirmation to send message.
Definition: conversation.h:244
PurpleConvChatBuddyFlags flags
A bitwise OR of flags for this participant, such as whether they are a channel operator.
Definition: conversation.h:306
void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user, const char *extra_msg, PurpleConvChatBuddyFlags flags, gboolean new_arrival)
Adds a user to a chat.
PurpleConvIm * im
IM-specific data.
Definition: conversation.h:351
char * name
The chat participant's name in the chat.
Definition: conversation.h:294
Data for "Chat Buddies".
Definition: conversation.h:292
GHashTable * data
Plugin-specific data.
Definition: conversation.h:360
The purple_account was changed.
Definition: conversation.h:70
const char * purple_conv_chat_get_nick(PurpleConvChat *chat)
Gets your nickname (used for hilighting) for a chat.
void * misc
Misc.
Definition: conversation.h:353
void purple_conversation_set_account(PurpleConversation *conv, PurpleAccount *account)
Sets the specified conversation's purple_account.
struct _PurpleBuddyIcon PurpleBuddyIcon
An opaque structure representing a buddy icon for a particular user on a particular PurpleAccount...
Definition: buddyicon.h:34
void purple_conv_im_update_typing(PurpleConvIm *im)
Updates the visual typing notification for an IM conversation.
const char * purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb)
Get the name of a chat buddy.
guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im)
Returns the IM's typing timeout.
Outgoing message.
Definition: conversation.h:107
gboolean purple_conv_chat_has_left(PurpleConvChat *chat)
Returns true if we're no longer in this chat, and just left the window open.
gboolean logging
The status of logging.
Definition: conversation.h:345
Stopped typing momentarily.
Definition: conversation.h:98
Message is a notification.
Definition: conversation.h:126
void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb)
Destroys a chat buddy.
guint send_typed_timeout
The type again timer handle.
Definition: conversation.h:262
GList * purple_conversation_get_message_history(PurpleConversation *conv)
Retrieve the message history of a conversation.
const char * purple_conversation_get_name(const PurpleConversation *conv)
Returns the specified conversation's name.
PurpleConvChatBuddy * purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name)
Find a chat buddy in a chat.
Structure representing an account.
Definition: account.h:126
const char * purple_conversation_message_get_message(PurpleConvMessage *msg)
Get the message from a PurpleConvMessage.
char * name
The name of the conversation.
Definition: conversation.h:342
void(* chat_remove_users)(PurpleConversation *conv, GList *users)
Remove users from a chat.
Definition: conversation.h:216
Error message.
Definition: conversation.h:121
void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags)
Sends a message to this chat conversation with specified flags.
void purple_conversation_set_logging(PurpleConversation *conv, gboolean log)
Enables or disables logging for this conversation.
PurpleConversation * purple_conv_chat_get_conversation(const PurpleConvChat *chat)
Gets a chat's parent conversation.
GList * ignored
Ignored users.
Definition: conversation.h:277
void purple_conversation_autoset_title(PurpleConversation *conv)
Automatically sets the specified conversation's title.
PurpleConvIm * purple_conversation_get_im_data(const PurpleConversation *conv)
Returns the specified conversation's IM-specific data.
PurpleTypingState
The typing state of a user.
Definition: conversation.h:94
const char * purple_conversation_get_title(const PurpleConversation *conv)
Returns the specified conversation's title.
time_t purple_conv_im_get_type_again(const PurpleConvIm *im)
Returns the time after which another PURPLE_TYPING message should be sent.
int purple_conv_chat_get_id(const PurpleConvChat *chat)
Returns the chat room's ID.
void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, PurpleConvChatBuddyFlags flags)
Set a users flags in a chat.
PurpleBuddyIcon * icon
The buddy icon.
Definition: conversation.h:264
Message should not be displayed.
Definition: conversation.h:129
gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, const char *user)
Returns TRUE if the specified user is ignored.
PurpleConversationUiOps * ui_ops
UI-specific operations.
Definition: conversation.h:357
PurpleConversation * purple_find_conversation_with_account(PurpleConversationType type, const char *name, const PurpleAccount *account)
Finds a conversation with the specified type, name, and Purple account.
void(* write_im)(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Write a message to an IM conversation.
Definition: conversation.h:178
void purple_conv_chat_write(PurpleConvChat *chat, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a chat.
PurpleConvChat * purple_conversation_get_chat_data(const PurpleConversation *conv)
Returns the specified conversation's chat-specific data.
Contains your nick.
Definition: conversation.h:118
GList * purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored)
Sets the list of ignored users in the chat room.
The buddy associated with the conversation was added.
Definition: conversation.h:66
void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im)
Stops the IM's type again timeout.
time_t type_again
The type again time.
Definition: conversation.h:261
void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val)
Sets the quiet-time when no PURPLE_TYPING messages will be sent.
Conversation operations and events.
Definition: conversation.h:158
PurpleConversation * purple_conversation_new(PurpleConversationType type, PurpleAccount *account, const char *name)
Creates a new conversation of the specified type.
void purple_conversation_close_logs(PurpleConversation *conv)
Closes any open logs for this conversation.
void purple_conversation_write(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a conversation window.
gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile, const char *cksum_type, const char *chksum, gboolean remote)
Adds a smiley to the conversation's smiley tree.
void purple_conv_im_stop_typing_timeout(PurpleConvIm *im)
Stops the IM's typing timeout.
PurpleConversationType type
The type of conversation.
Definition: conversation.h:337
void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im)
Starts the IM's type again timeout.
Server API.
PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv)
Returns the specified conversation's type.
void purple_conv_send_confirm(PurpleConversation *conv, const char *message)
Sends a message to a conversation after confirming with the user.
void purple_conv_im_send(PurpleConvIm *im, const char *message)
Sends a message to this IM conversation.
void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type)
Updates the visual status and UI of a conversation.
The features for a chat have changed.
Definition: conversation.h:87
"Raw" message - don't apply formatting
Definition: conversation.h:123
Channel Founder.
Definition: conversation.h:141
GList * purple_get_conversations(void)
Returns a list of all conversations.
The typing state was updated.
Definition: conversation.h:71
void(* chat_update_user)(PurpleConversation *conv, const char *user)
Called when a user's flags are changed.
Definition: conversation.h:220
PurpleAccount * account
The user using this conversation.
Definition: conversation.h:339
time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg)
Get the timestamp of a PurpleConvMessage.
void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value)
Set an attribute of a chat buddy.
void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name)
Ignores a user in a chat room.
void(* chat_add_users)(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals)
Add cbuddies to a chat.
Definition: conversation.h:202
const char * purple_conv_chat_get_topic(const PurpleConvChat *chat)
Returns the chat room's topic.
PurpleConversation * purple_conv_im_get_conversation(const PurpleConvIm *im)
Gets an IM's parent conversation.
void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user, const char *message, gboolean confirm)
Invite a user to a chat.
PurpleConversationType
A type of conversation.
Definition: conversation.h:51
void purple_conversation_set_ui_ops(PurpleConversation *conv, PurpleConversationUiOps *ops)
Sets the specified conversation's UI operations structure.
void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon)
Sets the IM's buddy icon.
Account API.
void(* write_chat)(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Write a message to a chat.
Definition: conversation.h:171
System message.
Definition: conversation.h:109
void(* destroy_conversation)(PurpleConversation *conv)
Called just before conv is freed.
Definition: conversation.h:166
void * purple_conversations_get_handle(void)
Returns the conversation subsystem handle.
PurpleAccount * purple_conversation_get_account(const PurpleConversation *conv)
Returns the specified conversation's purple_account.
void purple_conversation_present(PurpleConversation *conv)
Present a conversation to the user.
Delayed message.
Definition: conversation.h:122
void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user, const char *reason)
Removes a user from a chat, optionally with a reason.
void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags)
Sends a message to this IM conversation with specified flags.
gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key)
Returns extra data in a conversation.
GHashTable * users
Hash table of the users in the room.
Definition: conversation.h:284
Currently away.
Definition: conversation.h:143
void(* chat_rename_user)(PurpleConversation *conv, const char *old_name, const char *new_name, const char *new_alias)
Rename the user in this chat named old_name to new_name.
Definition: conversation.h:210
PurpleConversation * purple_find_chat(const PurpleConnection *gc, int id)
Finds a chat with the specified chat ID.
Instant Message.
Definition: conversation.h:54
void purple_conversation_clear_message_history(PurpleConversation *conv)
Clear the message history of a conversation.
Buddy Icon API.
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
Definition: connection.h:36
void purple_conversation_foreach(void(*func)(PurpleConversation *conv))
Calls a function on each conversation.
The other user went away.
Definition: conversation.h:82
guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im)
Returns the IM's type again timeout interval.
gboolean purple_conversation_has_focus(PurpleConversation *conv)
Determines if a conversation has focus.
Unknown conversation type.
Definition: conversation.h:53
void(* create_conversation)(PurpleConversation *conv)
Called when conv is created (but before the conversation-created signal is emitted).
Definition: conversation.h:163
void purple_conversation_set_name(PurpleConversation *conv, const char *name)
Sets the specified conversation's name.
PurpleConversation * conv
The parent conversation.
Definition: conversation.h:272
One of the user's accounts went offline.
Definition: conversation.h:81
void purple_conversation_destroy(PurpleConversation *conv)
Destroys the specified conversation and removes it from the parent window.
PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, const char *user)
Get the flags for a user in a chat.
gboolean buddy
TRUE if this chat participant is on the buddy list; FALSE otherwise.
Definition: conversation.h:303
const char * purple_conversation_message_get_sender(PurpleConvMessage *msg)
Get the sender from a PurpleConvMessage.
const char * purple_conv_chat_get_ignored_user(const PurpleConvChat *chat, const char *user)
Returns the actual name of the specified ignored user, if it exists in the ignore list...
void purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values)
Set attributes of a chat buddy.
Logging for this conversation was enabled or disabled.
Definition: conversation.h:73
void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users, const char *reason)
Removes a list of users from a chat, optionally with a single reason.
void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user, const char *new_user)
Renames a user in a chat.
gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error)
Perform a command in a conversation.
void * ui_data
UI-specific data.
Definition: conversation.h:358
GList * purple_get_chats(void)
Returns a list of all chats.
PurpleBuddyIcon * purple_conv_im_get_icon(const PurpleConvIm *im)
Returns the IM's buddy icon.
void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state)
Sets the IM's typing state.
GList * message_history
Message history, as a GList of PurpleConvMessage's.
Definition: conversation.h:363
guint typing_timeout
The typing timer handle.
Definition: conversation.h:260
PurpleConvUpdateType
Conversation update type.
Definition: conversation.h:64
Data specific to Chats.
Definition: conversation.h:270
void purple_conv_chat_send(PurpleConvChat *chat, const char *message)
Sends a message to this chat conversation.
Channel Op or Moderator.
Definition: conversation.h:140
int id
The chat ID.
Definition: conversation.h:280
void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs, GList *flags, gboolean new_arrivals)
Adds a list of users to a chat.
void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick)
Sets your nickname (used for hilighting) for a chat.
void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile)
Close the custom smiley, all data has been written with purple_conv_custom_smiley_write, and it is no longer valid to call that function on that smiley.
char * who
The person who set the topic.
Definition: conversation.h:278
The topic for a chat was updated.
Definition: conversation.h:75
The buddy associated with the conversation was removed.
Definition: conversation.h:68
void purple_conversation_set_title(PurpleConversation *conv, const char *title)
Sets the specified conversation's title.
PurpleTypingState typing_state
The current typing state.
Definition: conversation.h:259
Any type of conversation.
Definition: conversation.h:57
Logging API.
GHashTable * attributes
A hash table of attributes about the user, such as real name, user, etc.
Definition: conversation.h:309
void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name)
Unignores a user in a chat room.
Incoming message.
Definition: conversation.h:108
PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg)
Get the message-flags of a PurpleConvMessage.
void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops)
Sets the default conversation UI operations structure.
GList * purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb)
Get the keys of all atributes of a chat buddy.
PurpleConvChatBuddy * purple_conv_chat_cb_new(const char *name, const char *alias, PurpleConvChatBuddyFlags flags)
Creates a new chat buddy.
void purple_conv_chat_clear_users(PurpleConvChat *chat)
Clears all users from a chat.
GList * purple_conv_chat_get_users(const PurpleConvChat *chat)
Returns a list of users in the chat room.
gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user)
Finds a user in a chat.
void purple_conv_im_write(PurpleConvIm *im, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to an IM.
char * topic
The topic.
Definition: conversation.h:279
char * alias_key
A string by which this buddy will be sorted, or NULL if the buddy should be sorted by its name...
Definition: conversation.h:298
void purple_conversations_uninit(void)
Uninitializes the conversation subsystem.
void purple_conv_custom_smiley_write(PurpleConversation *conv, const char *smile, const guchar *data, gsize size)
Updates the image associated with the current smiley.
GList * in_room
The users in the room.
Definition: conversation.h:274
Whispered message.
Definition: conversation.h:120
Data specific to Instant Messages.
Definition: conversation.h:255
char * title
The window title.
Definition: conversation.h:343
A core representation of a conversation between two or more people.
Definition: conversation.h:335
gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)
Presents an IM-error to the user.
const char * purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key)
Get an attribute of a chat buddy.
gboolean purple_conversation_is_logging(const PurpleConversation *conv)
Returns whether or not logging is enabled for this conversation.
Not typing.
Definition: conversation.h:96
PurpleConvChat * chat
Chat-specific data.
Definition: conversation.h:352
PurpleConversation * conv
The parent conversation.
Definition: conversation.h:257
Currently typing.
Definition: conversation.h:142
void purple_conv_chat_set_id(PurpleConvChat *chat, int id)
Sets the chat room's ID.