pidgin 2.14.14dev
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
47
51typedef enum
52{
60
64typedef 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
94typedef enum
95{
101
105typedef enum
106{
123 PURPLE_MESSAGE_RAW = 0x0800,
134
138typedef enum
139{
146 PURPLE_CBFLAGS_AWAY = 0x0020
149
150#include "account.h"
151#include "buddyicon.h"
152#include "log.h"
153#include "server.h"
154
162{
167
174 void (*write_chat)(PurpleConversation *conv, const char *who,
175 const char *message, PurpleMessageFlags flags,
176 time_t mtime);
181 void (*write_im)(PurpleConversation *conv, const char *who,
182 const char *message, PurpleMessageFlags flags,
183 time_t mtime);
193 const char *name,
194 const char *alias,
195 const char *message,
196 PurpleMessageFlags flags,
197 time_t mtime);
198
206 GList *cbuddies,
207 gboolean new_arrivals);
213 void (*chat_rename_user)(PurpleConversation *conv, const char *old_name,
214 const char *new_name, const char *new_alias);
219 void (*chat_remove_users)(PurpleConversation *conv, GList *users);
223 void (*chat_update_user)(PurpleConversation *conv, const char *user);
224
229
234 gboolean (*has_focus)(PurpleConversation *conv);
235
236 /* Custom Smileys */
237 gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote);
238 void (*custom_smiley_write)(PurpleConversation *conv, const char *smile,
239 const guchar *data, gsize size);
240 void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
241
247 void (*send_confirm)(PurpleConversation *conv, const char *message);
248
249 void (*_purple_reserved1)(void);
250 void (*_purple_reserved2)(void);
251 void (*_purple_reserved3)(void);
252 void (*_purple_reserved4)(void);
253};
254
259{
264 time_t type_again;
268};
269
274{
277 GList *in_room;
280 GList *ignored;
281 char *who;
282 char *topic;
283 int id;
284 char *nick;
286 gboolean left;
287 GHashTable *users;
290};
291
296{
297 char *name;
298 char *alias;
301 char *alias_key;
306 gboolean buddy;
312 GHashTable *attributes;
315 gpointer ui_data;
316};
317
324{
325 char *who;
326 char *what;
327 PurpleMessageFlags flags;
328 time_t when;
330 char *alias;
331};
332
339{
345 char *name;
346 char *title;
348 gboolean logging;
350 GList *logs;
352 union
353 {
356 void *misc;
358 } u;
359
361 void *ui_data;
363 GHashTable *data;
367};
368
369#ifdef __cplusplus
370extern "C" {
371#endif
372
373/**************************************************************************/
375/**************************************************************************/
390 PurpleAccount *account,
391 const char *name);
392
403
404
411
412
421
430
437
446 const PurpleConversation *conv);
447
458 PurpleAccount *account);
459
471
482
490
499
509
517
527
537
546
555void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value);
556
565void
567
575
584
595
606
607#define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c))
608
619
620#define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c))
621
630 gpointer data);
631
640gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
641
650
656GList *purple_get_ims(void);
657
663GList *purple_get_chats(void);
664
675 PurpleConversationType type, const char *name,
676 const PurpleAccount *account);
677
699 const char *message, PurpleMessageFlags flags,
700 time_t mtime);
701
708 PurpleConnectionFlags features);
709
710
716
726
734
741
754
763
774
785
796
807
811/**************************************************************************/
813/**************************************************************************/
824
837
846
854
863
871
878
887
898void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val);
899
909
916
923
932
939
949void purple_conv_im_write(PurpleConvIm *im, const char *who,
950 const char *message, PurpleMessageFlags flags,
951 time_t mtime);
952
966gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what);
967
974void purple_conv_im_send(PurpleConvIm *im, const char *message);
975
988void purple_conv_send_confirm(PurpleConversation *conv, const char *message);
989
998
1018gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile,
1019 const char *cksum_type, const char *chksum,
1020 gboolean remote);
1021
1022
1033 const char *smile,
1034 const guchar *data,
1035 gsize size);
1036
1047
1051/**************************************************************************/
1053/**************************************************************************/
1064
1079GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users);
1080
1090
1097void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name);
1098
1105void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name);
1106
1115GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored);
1116
1125
1141 const char *user);
1142
1152 const char *user);
1153
1161void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who,
1162 const char *topic);
1163
1172
1180
1189
1199void purple_conv_chat_write(PurpleConvChat *chat, const char *who,
1200 const char *message, PurpleMessageFlags flags,
1201 time_t mtime);
1202
1209void purple_conv_chat_send(PurpleConvChat *chat, const char *message);
1210
1219
1229void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user,
1230 const char *extra_msg, PurpleConvChatBuddyFlags flags,
1231 gboolean new_arrival);
1232
1250void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs,
1251 GList *flags, gboolean new_arrivals);
1252
1260void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user,
1261 const char *new_user);
1262
1273 const char *reason);
1274
1283 const char *reason);
1284
1293gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user);
1294
1304
1314 const char *user);
1315
1322
1329void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick);
1330
1338
1348
1356
1371 const char *message, gboolean confirm);
1372
1383
1393PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias,
1395
1403
1412
1419
1432
1446gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error);
1447
1450/**************************************************************************/
1452/**************************************************************************/
1461
1466
1471
1474#ifdef __cplusplus
1475}
1476#endif
1477
1478#endif /* _PURPLE_CONVERSATION_H_ */
Account API.
Buddy Icon API.
struct _PurpleBuddyIcon PurpleBuddyIcon
An opaque structure representing a buddy icon for a particular user on a particular PurpleAccount.
Definition: buddyicon.h:34
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
Definition: connection.h:37
void purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values)
Set attributes of a chat buddy.
PurpleTypingState
The typing state of a user.
Definition: conversation.h:95
@ PURPLE_NOT_TYPING
Not typing.
Definition: conversation.h:96
@ PURPLE_TYPING
Currently typing.
Definition: conversation.h:97
@ PURPLE_TYPED
Stopped typing momentarily.
Definition: conversation.h:98
void * purple_conversations_get_handle(void)
Returns the conversation subsystem handle.
void purple_conv_im_update_typing(PurpleConvIm *im)
Updates the visual typing notification for an IM conversation.
PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv)
Get the features supported by the given conversation.
PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im)
Returns the IM's typing state.
void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user, const char *message, gboolean confirm)
Invite a user to a chat.
void purple_conversation_set_ui_ops(PurpleConversation *conv, PurpleConversationUiOps *ops)
Sets the specified conversation's UI operations structure.
const char * purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key)
Get an attribute of a chat buddy.
void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb)
Destroys a chat buddy.
PurpleConversationUiOps * purple_conversation_get_ui_ops(const PurpleConversation *conv)
Returns the specified conversation's UI operations structure.
guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im)
Returns the IM's type again timeout interval.
void purple_conversation_set_account(PurpleConversation *conv, PurpleAccount *account)
Sets the specified conversation's purple_account.
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.
GList * purple_conv_chat_set_users(PurpleConvChat *chat, GList *users)
Sets the list of users in the chat room.
void purple_conversation_set_features(PurpleConversation *conv, PurpleConnectionFlags features)
Set the features as supported for the given conversation.
gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key)
Returns extra data in a conversation.
void purple_conv_chat_send(PurpleConvChat *chat, const char *message)
Sends a message to this chat conversation.
void purple_conv_chat_left(PurpleConvChat *chat)
Lets the core know we left a chat, without destroying it.
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_start_send_typed_timeout(PurpleConvIm *im)
Starts the IM's type again timeout.
PurpleConvChatBuddyFlags
Flags applicable to users in Chats.
Definition: conversation.h:139
@ PURPLE_CBFLAGS_TYPING
Currently typing
Definition: conversation.h:145
@ PURPLE_CBFLAGS_HALFOP
Half-op
Definition: conversation.h:142
@ PURPLE_CBFLAGS_OP
Channel Op or Moderator
Definition: conversation.h:143
@ PURPLE_CBFLAGS_FOUNDER
Channel Founder
Definition: conversation.h:144
@ PURPLE_CBFLAGS_AWAY
Currently away.
Definition: conversation.h:146
@ PURPLE_CBFLAGS_VOICE
Voiced user or "Participant".
Definition: conversation.h:141
@ PURPLE_CBFLAGS_NONE
No flags
Definition: conversation.h:140
void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops)
Sets the default conversation UI operations structure.
const char * purple_conversation_get_name(const PurpleConversation *conv)
Returns the specified conversation's name.
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_conversation_write(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a conversation window.
void purple_conv_chat_clear_users(PurpleConvChat *chat)
Clears all users from a chat.
GList * purple_conversation_get_extended_menu(PurpleConversation *conv)
Retrieves the extended menu items for the conversation.
time_t purple_conv_im_get_type_again(const PurpleConvIm *im)
Returns the time after which another PURPLE_TYPING message should be sent.
void purple_conversation_present(PurpleConversation *conv)
Present a conversation to the user.
gboolean purple_conv_chat_has_left(PurpleConvChat *chat)
Returns true if we're no longer in this chat, and just left the window open.
const char * purple_conversation_message_get_message(PurpleConvMessage *msg)
Get the message from a PurpleConvMessage.
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_conv_im_send(PurpleConvIm *im, const char *message)
Sends a message to this IM conversation.
gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error)
Perform a command in a conversation.
PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv)
Returns the specified conversation's type.
PurpleAccount * purple_conversation_get_account(const PurpleConversation *conv)
Returns the specified conversation's purple_account.
const char * purple_conversation_get_title(const PurpleConversation *conv)
Returns the specified conversation's title.
PurpleConversation * purple_conv_im_get_conversation(const PurpleConvIm *im)
Gets an IM's parent conversation.
GList * purple_get_chats(void)
Returns a list of all chats.
PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, const char *user)
Get the flags for a user in a chat.
const char * purple_conversation_message_get_sender(PurpleConvMessage *msg)
Get the sender from a PurpleConvMessage.
PurpleConvChat * purple_conversation_get_chat_data(const PurpleConversation *conv)
Returns the specified conversation's chat-specific data.
const char * purple_conv_chat_get_topic(const PurpleConvChat *chat)
Returns the chat room's topic.
void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, PurpleConvChatBuddyFlags flags)
Set a users flags in a chat.
gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)
Presents an IM-error to the user.
void purple_conv_chat_write(PurpleConvChat *chat, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a chat.
void purple_conv_chat_set_id(PurpleConvChat *chat, int id)
Sets the chat room's ID.
gboolean purple_conversation_is_logging(const PurpleConversation *conv)
Returns whether or not logging is enabled for this conversation.
PurpleConversation * purple_find_chat(const PurpleConnection *gc, int id)
Finds a chat with the specified chat ID.
PurpleMessageFlags
Flags applicable to a message.
Definition: conversation.h:106
@ PURPLE_MESSAGE_IMAGES
Message contains images
Definition: conversation.h:125
@ PURPLE_MESSAGE_NO_LOG
Do not log.
Definition: conversation.h:119
@ PURPLE_MESSAGE_RAW
"Raw" message - don't apply formatting
Definition: conversation.h:123
@ PURPLE_MESSAGE_REMOTE_SEND
Message sent from another location, not an echo of a local one.
Definition: conversation.h:130
@ PURPLE_MESSAGE_INVISIBLE
Message should not be displayed.
Definition: conversation.h:129
@ PURPLE_MESSAGE_NICK
Contains your nick.
Definition: conversation.h:118
@ PURPLE_MESSAGE_SYSTEM
System message.
Definition: conversation.h:109
@ PURPLE_MESSAGE_NO_LINKIFY
Message should not be auto- linkified.
Definition: conversation.h:127
@ PURPLE_MESSAGE_WHISPER
Whispered message.
Definition: conversation.h:120
@ PURPLE_MESSAGE_SEND
Outgoing message.
Definition: conversation.h:107
@ PURPLE_MESSAGE_NOTIFY
Message is a notification.
Definition: conversation.h:126
@ PURPLE_MESSAGE_ACTIVE_ONLY
Hint to the UI that this message should not be shown in conversations which are only open for interna...
Definition: conversation.h:111
@ PURPLE_MESSAGE_ERROR
Error message.
Definition: conversation.h:121
@ PURPLE_MESSAGE_RECV
Incoming message.
Definition: conversation.h:108
@ PURPLE_MESSAGE_DELAYED
Delayed message.
Definition: conversation.h:122
@ PURPLE_MESSAGE_AUTO_RESP
Auto response.
Definition: conversation.h:110
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.
const char * purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb)
Get the name of a chat buddy.
PurpleConvUpdateType
Conversation update type.
Definition: conversation.h:65
@ PURPLE_CONV_UPDATE_TYPING
The typing state was updated.
Definition: conversation.h:71
@ PURPLE_CONV_UPDATE_AWAY
The other user went away.
Definition: conversation.h:82
@ PURPLE_CONV_UPDATE_REMOVE
The buddy associated with the conversation was removed.
Definition: conversation.h:68
@ PURPLE_CONV_UPDATE_TOPIC
The topic for a chat was updated.
Definition: conversation.h:75
@ PURPLE_CONV_UPDATE_ACCOUNT
The purple_account was changed.
Definition: conversation.h:70
@ PURPLE_CONV_ACCOUNT_ONLINE
One of the user's accounts went online.
Definition: conversation.h:80
@ PURPLE_CONV_UPDATE_ADD
The buddy associated with the conversation was added.
Definition: conversation.h:66
@ PURPLE_CONV_UPDATE_UNSEEN
The unseen state was updated.
Definition: conversation.h:72
@ PURPLE_CONV_UPDATE_FEATURES
The features for a chat have changed.
Definition: conversation.h:87
@ PURPLE_CONV_UPDATE_ICON
The other user's buddy icon changed.
Definition: conversation.h:83
@ PURPLE_CONV_UPDATE_LOGGING
Logging for this conversation was enabled or disabled.
Definition: conversation.h:73
@ PURPLE_CONV_ACCOUNT_OFFLINE
One of the user's accounts went offline.
Definition: conversation.h:81
GList * purple_conversation_get_message_history(PurpleConversation *conv)
Retrieve the message history of a conversation.
PurpleConversation * purple_conv_chat_get_conversation(const PurpleConvChat *chat)
Gets a chat's parent conversation.
void purple_conversation_foreach(void(*func)(PurpleConversation *conv))
Calls a function on each conversation.
void purple_conversation_clear_message_history(PurpleConversation *conv)
Clear the message history of a conversation.
void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name)
Ignores a user in a chat room.
PurpleConversation * purple_conversation_new(PurpleConversationType type, PurpleAccount *account, const char *name)
Creates a new conversation of the specified type.
GList * purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb)
Get the keys of all atributes of a chat buddy.
int purple_conv_chat_get_id(const PurpleConvChat *chat)
Returns the chat room's ID.
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_conversation_set_title(PurpleConversation *conv, const char *title)
Sets the specified conversation's title.
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_conversation_set_data(PurpleConversation *conv, const char *key, gpointer data)
Sets extra data for a conversation.
GList * purple_get_ims(void)
Returns a list of all IMs.
const char * purple_conv_chat_get_nick(PurpleConvChat *chat)
Gets your nickname (used for hilighting) for a chat.
void purple_conversation_autoset_title(PurpleConversation *conv)
Automatically sets the specified conversation's title.
void purple_conv_im_write(PurpleConvIm *im, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to an IM.
time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg)
Get the timestamp of a PurpleConvMessage.
gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, const char *user)
Returns TRUE if the specified user is ignored.
void purple_conversation_set_logging(PurpleConversation *conv, gboolean log)
Enables or disables logging for this conversation.
PurpleConversationType
A type of conversation.
Definition: conversation.h:52
@ PURPLE_CONV_TYPE_MISC
A misc.
Definition: conversation.h:56
@ PURPLE_CONV_TYPE_ANY
Any type of conversation.
Definition: conversation.h:57
@ PURPLE_CONV_TYPE_IM
Instant Message.
Definition: conversation.h:54
@ PURPLE_CONV_TYPE_CHAT
Chat room.
Definition: conversation.h:55
@ PURPLE_CONV_TYPE_UNKNOWN
Unknown conversation type.
Definition: conversation.h:53
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_conversations_init(void)
Initializes the conversation subsystem.
void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout)
Starts the IM's typing timeout.
void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type)
Updates the visual status and UI of a conversation.
GList * purple_conv_chat_get_users(const PurpleConvChat *chat)
Returns a list of users in the chat room.
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,...
GList * purple_get_conversations(void)
Returns a list of all conversations.
PurpleBuddyIcon * purple_conv_im_get_icon(const PurpleConvIm *im)
Returns the IM's buddy icon.
void purple_conversation_set_name(PurpleConversation *conv, const char *name)
Sets the specified conversation's name.
GList * purple_conv_chat_get_ignored(const PurpleConvChat *chat)
Returns the list of ignored users in the chat room.
gboolean purple_conversation_has_focus(PurpleConversation *conv)
Determines if a conversation has focus.
void purple_conversation_destroy(PurpleConversation *conv)
Destroys the specified conversation and removes it from the parent window.
void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user, const char *new_user)
Renames a user in a chat.
void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state)
Sets the IM's typing state.
void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name)
Unignores a user in a chat room.
void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im)
Stops the IM's type again timeout.
PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg)
Get the message-flags of a PurpleConvMessage.
void purple_conversation_close_logs(PurpleConversation *conv)
Closes any open logs for this conversation.
void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who, const char *topic)
Sets the chat room's topic.
void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick)
Sets your nickname (used for hilighting) for a chat.
PurpleConvIm * purple_conversation_get_im_data(const PurpleConversation *conv)
Returns the specified conversation's IM-specific data.
void purple_conv_custom_smiley_write(PurpleConversation *conv, const char *smile, const guchar *data, gsize size)
Updates the image associated with the current smiley.
void purple_conversations_uninit(void)
Uninitializes the conversation subsystem.
void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value)
Set an attribute of a chat buddy.
PurpleConnection * purple_conversation_get_gc(const PurpleConversation *conv)
Returns the specified conversation's purple_connection.
gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user)
Finds a user in a chat.
guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im)
Returns the IM's typing timeout.
void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags)
Sends a message to this IM conversation with specified flags.
GList * purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored)
Sets the list of ignored users in the chat room.
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 purple_conv_im_stop_typing_timeout(PurpleConvIm *im)
Stops the IM's typing timeout.
void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val)
Sets the quiet-time when no PURPLE_TYPING messages will be sent.
PurpleConvChatBuddy * purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name)
Find a chat buddy in a chat.
void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon)
Sets the IM's buddy icon.
PurpleConvChatBuddy * purple_conv_chat_cb_new(const char *name, const char *alias, PurpleConvChatBuddyFlags flags)
Creates a new chat buddy.
Logging API.
Server API.
Structure representing an account.
Definition: account.h:170
Data for "Chat Buddies".
Definition: conversation.h:296
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:301
gboolean buddy
TRUE if this chat participant is on the buddy list; FALSE otherwise.
Definition: conversation.h:306
PurpleConvChatBuddyFlags flags
A bitwise OR of flags for this participant, such as whether they are a channel operator.
Definition: conversation.h:309
char * alias
The chat participant's alias, if known; NULL otherwise.
Definition: conversation.h:298
GHashTable * attributes
A hash table of attributes about the user, such as real name, user@host, etc.
Definition: conversation.h:312
char * name
The chat participant's name in the chat.
Definition: conversation.h:297
Data specific to Chats.
Definition: conversation.h:274
GList * in_room
The users in the room.
Definition: conversation.h:277
int id
The chat ID.
Definition: conversation.h:283
GList * ignored
Ignored users.
Definition: conversation.h:280
PurpleConversation * conv
The parent conversation.
Definition: conversation.h:275
char * who
The person who set the topic.
Definition: conversation.h:281
GHashTable * users
Hash table of the users in the room.
Definition: conversation.h:287
char * topic
The topic.
Definition: conversation.h:282
char * nick
Your nick in this chat.
Definition: conversation.h:284
gboolean left
We left the chat and kept the window open.
Definition: conversation.h:286
Data specific to Instant Messages.
Definition: conversation.h:259
time_t type_again
The type again time.
Definition: conversation.h:264
PurpleBuddyIcon * icon
The buddy icon.
Definition: conversation.h:267
PurpleTypingState typing_state
The current typing state.
Definition: conversation.h:262
PurpleConversation * conv
The parent conversation.
Definition: conversation.h:260
guint typing_timeout
The typing timer handle.
Definition: conversation.h:263
guint send_typed_timeout
The type again timer handle.
Definition: conversation.h:265
Description of a conversation message.
Definition: conversation.h:324
PurpleConversation * conv
Definition: conversation.h:329
Conversation operations and events.
Definition: conversation.h:162
void(* chat_remove_users)(PurpleConversation *conv, GList *users)
Remove users from a chat.
Definition: conversation.h:219
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:192
void(* present)(PurpleConversation *conv)
Present this conversation to the user; for example, by displaying the IM dialog.
Definition: conversation.h:228
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:234
void(* create_conversation)(PurpleConversation *conv)
Called when conv is created (but before the conversation-created signal is emitted).
Definition: conversation.h:166
void(* chat_add_users)(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals)
Add cbuddies to a chat.
Definition: conversation.h:205
void(* send_confirm)(PurpleConversation *conv, const char *message)
Prompt the user for confirmation to send message.
Definition: conversation.h:247
void(* destroy_conversation)(PurpleConversation *conv)
Called just before conv is freed.
Definition: conversation.h:169
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:213
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:174
void(* chat_update_user)(PurpleConversation *conv, const char *user)
Called when a user's flags are changed.
Definition: conversation.h:223
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:181
A core representation of a conversation between two or more people.
Definition: conversation.h:339
GHashTable * data
Plugin-specific data.
Definition: conversation.h:363
GList * message_history
Message history, as a GList of PurpleConvMessage's.
Definition: conversation.h:366
char * title
The window title.
Definition: conversation.h:346
PurpleAccount * account
The user using this conversation.
Definition: conversation.h:342
GList * logs
This conversation's logs
Definition: conversation.h:350
void * ui_data
UI-specific data.
Definition: conversation.h:361
char * name
The name of the conversation.
Definition: conversation.h:345
PurpleConvIm * im
IM-specific data.
Definition: conversation.h:354
PurpleConvChat * chat
Chat-specific data.
Definition: conversation.h:355
gboolean logging
The status of logging.
Definition: conversation.h:348
PurpleConversationType type
The type of conversation.
Definition: conversation.h:340
PurpleConversationUiOps * ui_ops
UI-specific operations.
Definition: conversation.h:360
PurpleConnectionFlags features
The supported features.
Definition: conversation.h:365