27 #ifndef _PURPLE_CONVERSATION_H_ 28 #define _PURPLE_CONVERSATION_H_ 84 PURPLE_CONV_UPDATE_TITLE,
85 PURPLE_CONV_UPDATE_CHATLEFT,
204 gboolean new_arrivals);
211 const char *new_name,
const char *new_alias);
234 gboolean (*custom_smiley_add)(
PurpleConversation *conv,
const char *smile, gboolean remote);
236 const guchar *data, gsize size);
246 void (*_purple_reserved1)(void);
247 void (*_purple_reserved2)(void);
248 void (*_purple_reserved3)(void);
249 void (*_purple_reserved4)(void);
604 #define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c)) 617 #define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c)) 1017 const char *cksum_type,
const char *chksum,
1229 gboolean new_arrival);
1249 GList *flags, gboolean new_arrivals);
1259 const char *new_user);
1271 const char *reason);
1281 const char *reason);
1369 const char *message, gboolean confirm);
void(* present)(PurpleConversation *conv)
Present this conversation to the user; for example, by displaying the IM dialog.
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.
GList * purple_conversation_get_extended_menu(PurpleConversation *conv)
Retrieves the extended menu items for the conversation.
PurpleConvChatBuddyFlags
Flags applicable to users in Chats.
PurpleConnectionFlags features
The supported features.
PurpleConnection * purple_conversation_get_gc(const PurpleConversation *conv)
Returns the specified conversation's purple_connection.
The other user's buddy icon changed.
gboolean(* has_focus)(PurpleConversation *conv)
If this UI has a concept of focus (as in a windowing system) and this conversation has the focus...
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.
Voiced user or "Participant".
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.
Message should not be auto- linkified.
The unseen state was updated.
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.
One of the user's accounts went online.
Hint to the UI that this message should not be shown in conversations which are only open for interna...
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.
Description of a conversation message.
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.
char * nick
Your nick in this chat.
GList * purple_get_ims(void)
Returns a list of all IMs.
PurpleConversation * conv
void(* send_confirm)(PurpleConversation *conv, const char *message)
Prompt the user for confirmation to send message.
PurpleConvChatBuddyFlags flags
A bitwise OR of flags for this participant, such as whether they are a channel operator.
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.
char * name
The chat participant's name in the chat.
GHashTable * data
Plugin-specific data.
The purple_account was changed.
const char * purple_conv_chat_get_nick(PurpleConvChat *chat)
Gets your nickname (used for hilighting) for a chat.
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...
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.
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.
Stopped typing momentarily.
Message is a notification.
void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb)
Destroys a chat buddy.
guint send_typed_timeout
The type again timer handle.
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.
const char * purple_conversation_message_get_message(PurpleConvMessage *msg)
Get the message from a PurpleConvMessage.
char * name
The name of the conversation.
void(* chat_remove_users)(PurpleConversation *conv, GList *users)
Remove users from a chat.
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.
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.
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.
Message should not be displayed.
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.
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.
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.
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.
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.
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.
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.
void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im)
Starts the IM's type again timeout.
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.
"Raw" message - don't apply formatting
GList * purple_get_conversations(void)
Returns a list of all conversations.
The typing state was updated.
void(* chat_update_user)(PurpleConversation *conv, const char *user)
Called when a user's flags are changed.
PurpleAccount * account
The user using this conversation.
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.
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.
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.
void(* write_chat)(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Write a message to a chat.
void(* destroy_conversation)(PurpleConversation *conv)
Called just before conv is freed.
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.
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.
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.
PurpleConversation * purple_find_chat(const PurpleConnection *gc, int id)
Finds a chat with the specified chat ID.
void purple_conversation_clear_message_history(PurpleConversation *conv)
Clear the message history of a conversation.
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
void purple_conversation_foreach(void(*func)(PurpleConversation *conv))
Calls a function on each conversation.
The other user went away.
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.
void(* create_conversation)(PurpleConversation *conv)
Called when conv is created (but before the conversation-created signal is emitted).
void purple_conversation_set_name(PurpleConversation *conv, const char *name)
Sets the specified conversation's name.
PurpleConversation * conv
The parent conversation.
One of the user's accounts went offline.
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.
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.
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.
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.
guint typing_timeout
The typing timer handle.
PurpleConvUpdateType
Conversation update type.
void purple_conv_chat_send(PurpleConvChat *chat, const char *message)
Sends a message to this chat conversation.
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.
The topic for a chat was updated.
The buddy associated with the conversation was removed.
void purple_conversation_set_title(PurpleConversation *conv, const char *title)
Sets the specified conversation's title.
PurpleTypingState typing_state
The current typing state.
Any type of conversation.
GHashTable * attributes
A hash table of attributes about the user, such as real name, user, etc.
void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name)
Unignores a user in a chat room.
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 * alias_key
A string by which this buddy will be sorted, or NULL if the buddy should be sorted by its name...
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.
Data specific to Instant Messages.
char * title
The window title.
A core representation of a conversation between two or more people.
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.
PurpleConvChat * chat
Chat-specific data.
PurpleConversation * conv
The parent conversation.
void purple_conv_chat_set_id(PurpleConvChat *chat, int id)
Sets the chat room's ID.