/** @page conversation-signals Conversation Signals @signal receiving-chat-msg @signal received-chat-msg @signal conversation-created @signal conversation-updated @signal deleting-conversation @signal buddy-typing-stopped @signal chat-buddy-joining @signal chat-buddy-joined @signal chat-buddy-leaving @signal chat-inviting-user @signal chat-invited-user @signal chat-invite-blocked @signal chat-topic-changed @signal cleared-message-history @signal conversation-extended-menu @signaldef writing-im-msg gboolean (*writing_im_msg)(PurpleAccount *account, const char *who, char **message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted before a message is written in an IM conversation. If the message is changed, then the changed message is displayed and logged instead of the original message. Make sure to free @a *message before you replace it! @param account The account. @param who The name of the user. @param message A pointer to the message. @param conv The conversation. @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. void (*wrote_im_msg)(PurpleAccount *account, const char *who, char *message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted after a message is written and possibly displayed in a conversation. @param account The account. @param who The name of the user. @param message The message. @param conv The conversation. @param flags Flags for this message. @signaldef sending-im-msg void (*sending_im_msg)(PurpleAccount *account, const char *receiver, Emitted before sending an IM to a user. @a message is a pointer to the message string, so the plugin can replace the message before being sent. Make sure to free @a *message before you replace it! @param account The account the message is being sent on. @param receiver The username of the receiver. @param message A pointer to the outgoing message. This can be modified. void (*sent_im_msg)(PurpleAccount *account, const char *receiver, Emitted after sending an IM to a user. @param account The account the message was sent on. @param receiver The username of the receiver. @param message The message that was sent. @signaldef receiving-im-msg gboolean (*receiving_im_msg)(PurpleAccount *account, char **sender, char **message, PurpleConversation *conv, PurpleMessageFlags *flags); Emitted when an IM is received. The callback can replace the name of the sender, the message, or the flags by modifying the pointer to the strings and integer. This can also be used to cancel a message by Make sure to free @a *sender and @a *message before you replace them! @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @param account The account the message was received on. @param sender A pointer to the username of the sender. @param message A pointer to the message that was sent. @param conv The IM conversation. @param flags A pointer to the IM message flags. @signaldef received-im-msg void (*received_im_msg)(PurpleAccount *account, char *sender, char *message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted after an IM is received. @param account The account the message was received on. @param sender The username of the sender. @param message The message that was sent. @param conv The IM conversation. @param flags The IM message flags. @signaldef blocked-im-msg void (*blocked_im_msg)(PurpleAccount *account, const char *sender, const char *message, PurpleMessageFlags flags, time_t when); Emitted after an IM is blocked due to privacy settings. @param account The account the message was received on. @param sender The username of the sender. @param message The message that was blocked. @param flags The IM message flags. @param when The time the message was sent. @signaldef writing-chat-msg gboolean (*writing_chat_msg)(PurpleAccount *account, const char *who, char **message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted before a message is written in a chat conversation. If the message is changed, then the changed message is displayed and logged instead of the original message. Make sure to free @a *message before you replace it! @param account The account. @param who The name of the user. @param message A pointer to the message. @param conv The conversation. @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @signaldef wrote-chat-msg void (*wrote_chat_msg)(PurpleAccount *account, const char *who, char *message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted after a message is written and possibly displayed in a chat. @param account The account. @param who The name of the user. @param message The message. @param conv The conversation. @param flags Flags for this message. @signaldef sending-chat-msg void (*sending_chat_msg)(PurpleAccount *account, char **message, int id); Emitted before sending a message to a chat. @a message is a pointer to the message string, so the plugin can replace the message before being sent. Make sure to free @a *message before you replace it! @param account The account the message is being sent on. @param message A pointer to the message that will be sent. @param id The ID of the chat. void (*sent_chat_msg)(PurpleAccount *account, const char *message, int id); Emitted after sending a message to a chat. @param account The account the message was sent on. @param message The message that was sent. @param id The ID of the chat. @signaldef receiving-chat-msg gboolean (*receiving_chat_msg)(PurpleAccount *account, char **sender, char **message, PurpleConversation *conv, int *flags); Emitted when a chat message is received. The callback can replace the name of the sender, the message, or the flags by modifying the pointer to the strings. This can also be used to cancel displaying a message by Make sure to free @a *sender and @a *message before you replace them! @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @param account The account the message was received on. @param sender A pointer to the username of the sender. @param message A pointer to the message that was sent. @param conv The chat conversation. @param flags A pointer to the chat message flags @signaldef received-chat-msg void (*received_chat_msg)(PurpleAccount *account, char *sender, char *message, PurpleConversation *conv, PurpleMessageFlags flags); Emitted after a chat message is received. @param account The account the message was received on. @param sender The username of the sender. @param message The message that was sent. @param conv The chat conversation. @param flags The chat message flags. @signaldef conversation-created void (*conversation_created)(PurpleConversation *conv); Emitted when a new conversation is created. @param conv The new conversation. @signaldef conversation-updated void (*conversation_updated)(PurpleConversation *conv, PurpleConvUpdateType type); Emitted when a conversation is updated. @param conv The conversation that was updated. @param type The type of update that was made. @signaldef deleting-conversation void (*deleting_conversation)(PurpleConversation *conv); Emitted just before a conversation is to be destroyed. @param conv The conversation that's about to be destroyed. void (*buddy_typing)(PurpleAccount *account, const char *name); Emitted when a buddy starts typing in a conversation window. @param account The account of the user which is typing. @param name The name of the user which is typing. @signaldef buddy-typing-stopped void (*buddy_typing_stopped)(PurpleAccount *account, const char *name); Emitted when a buddy stops typing in a conversation window. @param account The account of the user which stopped typing. @param name The name of the user which stopped typing. @signaldef chat-buddy-joining gboolean (*chat_buddy_joining)(PurpleConversation *conv, const char *name, PurpleConvChatBuddyFlags flags); Emitted when a buddy is joining a chat, before the list of users in the chat updates to include the new user. @return @c TRUE if the join should be hidden, or @c FALSE otherwise. @param conv The chat conversation. @param name The name of the user that is joining the conversation. @param flags The flags of the user that is joining the conversation. @signaldef chat-buddy-joined void (*chat_buddy_joined)(PurpleConversation *conv, const char *name, PurpleConvChatBuddyFlags flags, Emitted when a buddy joined a chat, after the users list is updated. @param conv The chat conversation. @param name The name of the user that has joined the conversation. @param flags The flags of the user that has joined the conversation. @param new_arrival If the buddy is a new arrival. @signaldef chat-join-failed void (*chat_join_failed)(PurpleConnection *gc, GHashTable *components); Emitted when an account fails to join a chat room @param gc The PurpleConnection of the account which failed to join the chat. @param data The components passed to serv_join_chat() originally. The hash function should be g_str_hash() and the equal function should be g_str_equal(). @signaldef chat-buddy-flags void (*chat_buddy_flags)(PurpleConversation *conv, const char *name, PurpleConvChatBuddyFlags oldflags, PurpleConvChatBuddyFlags newflags); Emitted when a user in a chat changes flags. @param conv The chat conversation. @param name The name of the user. @param oldflags The old flags. @param newflags The new flags. @signaldef chat-buddy-leaving gboolean (*chat_buddy_leaving)(PurpleConversation *conv, const char *name, Emitted when a user is leaving a chat, before the user list is updated. This may include an optional reason why the user is leaving. @return @c TRUE if the leave should be hidden, or @c FALSE otherwise. @param conv The chat conversation. @param name The name of the user that is leaving the chat. @param reason The optional reason why the user is leaving. @signaldef chat-buddy-left void (*chat_buddy_left)(PurpleConversation *conv, const char *name, Emitted when a user leaves a chat, after the user list is updated. This may include an optional reason why the user is leaving. @param conv The chat conversation. @param name The name of the user that left the chat. @param reason The optional reason why the user left the chat. @signaldef chat-inviting-user void (*chat_inviting_user)(PurpleConversation *conv, const char *name, Emitted when a user is being invited to the chat. The callback can replace the invite message to the invitee by modifying the pointer to Make sure to free @a *invite_message before you replace it! @param conv The chat conversation. @param name The name of the user being invited. @param invite_message A pointer to the reason why a user is being @signaldef chat-invited-user void (*chat_invited_user)(PurpleConversation *conv, const char *name, const char *invite_message); Emitted when a user invited another user to a chat. @param conv The chat conversation. @param conv The name of the user that was invited. @param invite_message The message to be sent to the user when invited. gint (*chat_invited)(PurpleAccount *account, const char *inviter, const char *chat, const char *invite_message const GHashTable *components); Emitted when an account was invited to a chat. @param account The account being invited. @param inviter The username of the person inviting the account. @param chat The name of the chat you're being invited to. @param invite_message The optional invite message. @param components The components necessary if you want to call @return Less than zero if the invitation should be rejected, greater than zero if the invitation should be accepted. If zero is returned, the default behavior will be maintained: the user will be prompted. @signaldef chat-invite-blocked void (*chat_invite_blocked)(PurpleAccount *account, const char *inviter, const char *name, const char *message, GHashTable *data); Emitted when an invitation to join a chat is blocked. @param account The account the invitation was sent to. @param inviter The name of the person sending the invitation. @param name The name of the chat invited to. @param message The invitation message sent. @param data Hashtable containing data about the invited chat. void (*chat_joined)(PurpleConversation *conv); Emitted when an account joins a chat room. @param conv The conversation that joined the chat room. void (*chat_left)(PurpleConversation *conv); Emitted when an account leaves a chat room. @param conv The conversation that left the chat room. @signaldef chat-topic-changed void (*chat_topic_changed)(PurpleConversation *conv, const char *who, const char *topic); Emitted when the topic is changed in a chat. @param conv The conversation whose topic changed. @param who The name of the person that changed the topic. @param topic The new topic. @signaldef conversation-extended-menu void (*conversation_extended_menu)(PurpleConversation *conv, GList **list); Emitted when the UI requests a list of plugin actions for a @param conv The conversation. @param list A pointer to the list of actions. @signaldef cleared-message-history void (*cleared_message_history)(PurpleConversation *conv); Emitted when the conversation history is cleared. @param conv The conversation. @signaldef sent-attention void (*got_attention)(PurpleAccount *account, const char *who, PurpleConversation *conv, guint type) Emitted when receiving an attention message (buzz, nudge, etc.). @param account The account @param who The name of the person receiving the attention @param conv The conversation @param type The attention type (an index starting at 0) void (*got_attention)(PurpleAccount *account, const char *who, PurpleConversation *conv, guint type) Emitted when receiving an attention message (buzz, nudge, etc.). @param account The account @param who The name of the person sending the attention @param conv The conversation @param type The attention type (an index starting at 0) // vim: syntax=c.doxygen tw=75 et