pidgin 2.14.15dev
|
Conversation API. More...
Go to the source code of this file.
Data Structures | |
struct | _PurpleConversationUiOps |
Conversation operations and events. More... | |
struct | _PurpleConvIm |
Data specific to Instant Messages. More... | |
struct | _PurpleConvChat |
Data specific to Chats. More... | |
struct | _PurpleConvChatBuddy |
Data for "Chat Buddies". More... | |
struct | _PurpleConvMessage |
Description of a conversation message. More... | |
struct | _PurpleConversation |
A core representation of a conversation between two or more people. More... | |
Typedefs | |
typedef struct _PurpleConversationUiOps | PurpleConversationUiOps |
Data Structures | |
typedef struct _PurpleConversation | PurpleConversation |
A core representation of a conversation between two or more people. | |
typedef struct _PurpleConvIm | PurpleConvIm |
Data specific to Instant Messages. | |
typedef struct _PurpleConvChat | PurpleConvChat |
Data specific to Chats. | |
typedef struct _PurpleConvChatBuddy | PurpleConvChatBuddy |
Data for "Chat Buddies". | |
typedef struct _PurpleConvMessage | PurpleConvMessage |
Description of a conversation message. | |
Functions | |
IM Conversation API <br> | |
PurpleConversation * | purple_conv_im_get_conversation (const PurpleConvIm *im) |
Gets an IM's parent conversation. | |
void | purple_conv_im_set_icon (PurpleConvIm *im, PurpleBuddyIcon *icon) |
Sets the IM's buddy icon. | |
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. | |
PurpleTypingState | purple_conv_im_get_typing_state (const PurpleConvIm *im) |
Returns the IM's typing state. | |
void | purple_conv_im_start_typing_timeout (PurpleConvIm *im, int timeout) |
Starts the IM's typing timeout. | |
void | purple_conv_im_stop_typing_timeout (PurpleConvIm *im) |
Stops the IM's typing timeout. | |
guint | purple_conv_im_get_typing_timeout (const PurpleConvIm *im) |
Returns 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. | |
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_conv_im_start_send_typed_timeout (PurpleConvIm *im) |
Starts the IM's type again timeout. | |
void | purple_conv_im_stop_send_typed_timeout (PurpleConvIm *im) |
Stops the IM's type again timeout. | |
guint | purple_conv_im_get_send_typed_timeout (const PurpleConvIm *im) |
Returns the IM's type again timeout interval. | |
void | purple_conv_im_update_typing (PurpleConvIm *im) |
Updates the visual typing notification for an IM conversation. | |
void | purple_conv_im_write (PurpleConvIm *im, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime) |
Writes to an IM. | |
gboolean | purple_conv_present_error (const char *who, PurpleAccount *account, const char *what) |
Presents an IM-error to the user. | |
void | purple_conv_im_send (PurpleConvIm *im, const char *message) |
Sends a message to this IM conversation. | |
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_with_flags (PurpleConvIm *im, const char *message, PurpleMessageFlags flags) |
Sends a message to this IM conversation with specified flags. | |
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_custom_smiley_write (PurpleConversation *conv, const char *smile, const guchar *data, gsize size) |
Updates the image associated with the current smiley. | |
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. | |
Chat Conversation API <br> | |
PurpleConversation * | purple_conv_chat_get_conversation (const PurpleConvChat *chat) |
Gets a chat's parent conversation. | |
GList * | purple_conv_chat_set_users (PurpleConvChat *chat, GList *users) |
Sets the list of users in the chat room. | |
GList * | purple_conv_chat_get_users (const PurpleConvChat *chat) |
Returns a list of users in the chat room. | |
void | purple_conv_chat_ignore (PurpleConvChat *chat, const char *name) |
Ignores a user in a chat room. | |
void | purple_conv_chat_unignore (PurpleConvChat *chat, const char *name) |
Unignores a user in a chat room. | |
GList * | purple_conv_chat_set_ignored (PurpleConvChat *chat, GList *ignored) |
Sets the list of ignored users in the chat room. | |
GList * | purple_conv_chat_get_ignored (const PurpleConvChat *chat) |
Returns the list of ignored users in the chat room. | |
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. | |
gboolean | purple_conv_chat_is_user_ignored (const PurpleConvChat *chat, const char *user) |
Returns TRUE if the specified user is ignored. | |
void | purple_conv_chat_set_topic (PurpleConvChat *chat, const char *who, const char *topic) |
Sets the chat room's topic. | |
const char * | purple_conv_chat_get_topic (const PurpleConvChat *chat) |
Returns the chat room's topic. | |
void | purple_conv_chat_set_id (PurpleConvChat *chat, int id) |
Sets the chat room's ID. | |
int | purple_conv_chat_get_id (const PurpleConvChat *chat) |
Returns the chat room's ID. | |
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_send (PurpleConvChat *chat, const char *message) |
Sends a message to this chat conversation. | |
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_chat_add_user (PurpleConvChat *chat, const char *user, const char *extra_msg, PurpleConvChatBuddyFlags flags, gboolean new_arrival) |
Adds a user to a chat. | |
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_rename_user (PurpleConvChat *chat, const char *old_user, const char *new_user) |
Renames a user in a chat. | |
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_chat_remove_users (PurpleConvChat *chat, GList *users, const char *reason) |
Removes a list of users from a chat, optionally with a single reason. | |
gboolean | purple_conv_chat_find_user (PurpleConvChat *chat, const char *user) |
Finds a user in a chat. | |
void | purple_conv_chat_user_set_flags (PurpleConvChat *chat, const char *user, PurpleConvChatBuddyFlags flags) |
Set a users flags in a chat. | |
PurpleConvChatBuddyFlags | purple_conv_chat_user_get_flags (PurpleConvChat *chat, const char *user) |
Get the flags for a user in a chat. | |
void | purple_conv_chat_clear_users (PurpleConvChat *chat) |
Clears all users from a chat. | |
void | purple_conv_chat_set_nick (PurpleConvChat *chat, const char *nick) |
Sets your nickname (used for hilighting) for a chat. | |
const char * | purple_conv_chat_get_nick (PurpleConvChat *chat) |
Gets your nickname (used for hilighting) for a chat. | |
PurpleConversation * | purple_find_chat (const PurpleConnection *gc, int id) |
Finds a chat with the specified chat ID. | |
void | purple_conv_chat_left (PurpleConvChat *chat) |
Lets the core know we left a chat, without destroying it. | |
void | purple_conv_chat_invite_user (PurpleConvChat *chat, const char *user, const char *message, gboolean confirm) |
Invite a user to a chat. | |
gboolean | purple_conv_chat_has_left (PurpleConvChat *chat) |
Returns true if we're no longer in this chat, and just left the window open. | |
PurpleConvChatBuddy * | purple_conv_chat_cb_new (const char *name, const char *alias, PurpleConvChatBuddyFlags flags) |
Creates a new chat buddy. | |
PurpleConvChatBuddy * | purple_conv_chat_cb_find (PurpleConvChat *chat, const char *name) |
Find a chat buddy in a chat. | |
const char * | purple_conv_chat_cb_get_name (PurpleConvChatBuddy *cb) |
Get the name of a chat buddy. | |
void | purple_conv_chat_cb_destroy (PurpleConvChatBuddy *cb) |
Destroys a chat buddy. | |
GList * | purple_conversation_get_extended_menu (PurpleConversation *conv) |
Retrieves the extended menu items for the conversation. | |
gboolean | purple_conversation_do_command (PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error) |
Perform a command in a conversation. | |
Conversations Subsystem <br> | |
void * | purple_conversations_get_handle (void) |
Returns the conversation subsystem handle. | |
void | purple_conversations_init (void) |
Initializes the conversation subsystem. | |
void | purple_conversations_uninit (void) |
Uninitializes the conversation subsystem. | |
Conversation API <br> | |
#define | PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c)) |
#define | PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c)) |
PurpleConversation * | purple_conversation_new (PurpleConversationType type, PurpleAccount *account, const char *name) |
Creates a new conversation of the specified type. | |
void | purple_conversation_destroy (PurpleConversation *conv) |
Destroys the specified conversation and removes it from the parent window. | |
void | purple_conversation_present (PurpleConversation *conv) |
Present a conversation to the user. | |
PurpleConversationType | purple_conversation_get_type (const PurpleConversation *conv) |
Returns the specified conversation's type. | |
void | purple_conversation_set_ui_ops (PurpleConversation *conv, PurpleConversationUiOps *ops) |
Sets the specified conversation's UI operations structure. | |
void | purple_conversations_set_ui_ops (PurpleConversationUiOps *ops) |
Sets the default conversation UI operations structure. | |
PurpleConversationUiOps * | purple_conversation_get_ui_ops (const PurpleConversation *conv) |
Returns the specified conversation's UI operations structure. | |
void | purple_conversation_set_account (PurpleConversation *conv, PurpleAccount *account) |
Sets the specified conversation's purple_account. | |
PurpleAccount * | purple_conversation_get_account (const PurpleConversation *conv) |
Returns the specified conversation's purple_account. | |
PurpleConnection * | purple_conversation_get_gc (const PurpleConversation *conv) |
Returns the specified conversation's purple_connection. | |
void | purple_conversation_set_title (PurpleConversation *conv, const char *title) |
Sets the specified conversation's title. | |
const char * | purple_conversation_get_title (const PurpleConversation *conv) |
Returns the specified conversation's title. | |
void | purple_conversation_autoset_title (PurpleConversation *conv) |
Automatically sets the specified conversation's title. | |
void | purple_conversation_set_name (PurpleConversation *conv, const char *name) |
Sets the specified conversation's name. | |
const char * | purple_conversation_get_name (const PurpleConversation *conv) |
Returns the specified conversation's name. | |
const char * | purple_conv_chat_cb_get_attribute (PurpleConvChatBuddy *cb, const char *key) |
Get an attribute of a chat buddy. | |
GList * | purple_conv_chat_cb_get_attribute_keys (PurpleConvChatBuddy *cb) |
Get the keys of all atributes of a chat buddy. | |
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_cb_set_attributes (PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values) |
Set attributes of a chat buddy. | |
void | purple_conversation_set_logging (PurpleConversation *conv, gboolean log) |
Enables or disables logging for this conversation. | |
gboolean | purple_conversation_is_logging (const PurpleConversation *conv) |
Returns whether or not logging is enabled for this conversation. | |
void | purple_conversation_close_logs (PurpleConversation *conv) |
Closes any open logs for this conversation. | |
PurpleConvIm * | purple_conversation_get_im_data (const PurpleConversation *conv) |
Returns the specified conversation's IM-specific data. | |
PurpleConvChat * | purple_conversation_get_chat_data (const PurpleConversation *conv) |
Returns the specified conversation's chat-specific data. | |
void | purple_conversation_set_data (PurpleConversation *conv, const char *key, gpointer data) |
Sets extra data for a conversation. | |
gpointer | purple_conversation_get_data (PurpleConversation *conv, const char *key) |
Returns extra data in a conversation. | |
GList * | purple_get_conversations (void) |
Returns a list of all conversations. | |
GList * | purple_get_ims (void) |
Returns a list of all IMs. | |
GList * | purple_get_chats (void) |
Returns a list of all chats. | |
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_conversation_write (PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime) |
Writes to a conversation window. | |
void | purple_conversation_set_features (PurpleConversation *conv, PurpleConnectionFlags features) |
Set the features as supported for the given conversation. | |
PurpleConnectionFlags | purple_conversation_get_features (PurpleConversation *conv) |
Get the features supported by the given conversation. | |
gboolean | purple_conversation_has_focus (PurpleConversation *conv) |
Determines if a conversation has focus. | |
void | purple_conversation_update (PurpleConversation *conv, PurpleConvUpdateType type) |
Updates the visual status and UI of a conversation. | |
void | purple_conversation_foreach (void(*func)(PurpleConversation *conv)) |
Calls a function on each conversation. | |
GList * | purple_conversation_get_message_history (PurpleConversation *conv) |
Retrieve the message history of a conversation. | |
void | purple_conversation_clear_message_history (PurpleConversation *conv) |
Clear the message history of a conversation. | |
const char * | purple_conversation_message_get_sender (PurpleConvMessage *msg) |
Get the sender from a PurpleConvMessage. | |
const char * | purple_conversation_message_get_message (PurpleConvMessage *msg) |
Get the message from a PurpleConvMessage. | |
PurpleMessageFlags | purple_conversation_message_get_flags (PurpleConvMessage *msg) |
Get the message-flags of a PurpleConvMessage. | |
time_t | purple_conversation_message_get_timestamp (PurpleConvMessage *msg) |
Get the timestamp of a PurpleConvMessage. | |
#define PURPLE_CONV_CHAT | ( | c | ) | (purple_conversation_get_chat_data(c)) |
Definition at line 620 of file conversation.h.
#define PURPLE_CONV_IM | ( | c | ) | (purple_conversation_get_im_data(c)) |
Definition at line 607 of file conversation.h.
typedef struct _PurpleConvChat PurpleConvChat |
Data specific to Chats.
Definition at line 42 of file conversation.h.
typedef struct _PurpleConvChatBuddy PurpleConvChatBuddy |
Data for "Chat Buddies".
Definition at line 44 of file conversation.h.
typedef struct _PurpleConversation PurpleConversation |
A core representation of a conversation between two or more people.
The conversation can be an IM or a chat.
Definition at line 38 of file conversation.h.
typedef struct _PurpleConversationUiOps PurpleConversationUiOps |
Data Structures
Conversation operations and events.
Any UI representing a conversation must assign a filled-out PurpleConversationUiOps structure to the PurpleConversation.
Definition at line 36 of file conversation.h.
typedef struct _PurpleConvIm PurpleConvIm |
Data specific to Instant Messages.
Definition at line 40 of file conversation.h.
typedef struct _PurpleConvMessage PurpleConvMessage |
Flags applicable to users in Chats.
Definition at line 138 of file conversation.h.
A type of conversation.
Definition at line 51 of file conversation.h.
enum PurpleConvUpdateType |
Conversation update type.
Definition at line 64 of file conversation.h.
enum PurpleMessageFlags |
Flags applicable to a message.
Most will have send, recv or system.
Definition at line 105 of file conversation.h.
enum PurpleTypingState |
The typing state of a user.
Enumerator | |
---|---|
PURPLE_NOT_TYPING | Not typing.
|
PURPLE_TYPING | Currently typing.
|
PURPLE_TYPED | Stopped typing momentarily. |
Definition at line 94 of file conversation.h.
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.
chat | The chat. |
user | The user to add. |
extra_msg | An extra message to display with the join message. |
flags | The users flags |
new_arrival | Decides whether or not to show a join notice. |
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.
The data is copied from users, extra_msgs, and flags, so it is up to the caller to free this list after calling this function.
chat | The chat. |
users | The list of users to add. |
extra_msgs | An extra message to display with the join message for each user. This list may be shorter than users, in which case, the users after the end of extra_msgs will not have an extra message. By extension, this means that extra_msgs can simply be NULL and none of the users will have an extra message. |
flags | The list of flags for each user. |
new_arrivals | Decides whether or not to show join notices. |
void purple_conv_chat_cb_destroy | ( | PurpleConvChatBuddy * | cb | ) |
Destroys a chat buddy.
cb | The chat buddy to destroy |
PurpleConvChatBuddy * purple_conv_chat_cb_find | ( | PurpleConvChat * | chat, |
const char * | name | ||
) |
Find a chat buddy in a chat.
chat | The chat. |
name | The name of the chat buddy to find. |
const char * purple_conv_chat_cb_get_attribute | ( | PurpleConvChatBuddy * | cb, |
const char * | key | ||
) |
Get an attribute of a chat buddy.
cb | The chat buddy. |
key | The key of the attribute. |
GList * purple_conv_chat_cb_get_attribute_keys | ( | PurpleConvChatBuddy * | cb | ) |
Get the keys of all atributes of a chat buddy.
cb | The chat buddy. |
const char * purple_conv_chat_cb_get_name | ( | PurpleConvChatBuddy * | cb | ) |
Get the name of a chat buddy.
cb | The chat buddy. |
PurpleConvChatBuddy * purple_conv_chat_cb_new | ( | const char * | name, |
const char * | alias, | ||
PurpleConvChatBuddyFlags | flags | ||
) |
Creates a new chat buddy.
name | The name. |
alias | The alias. |
flags | The flags. |
void purple_conv_chat_cb_set_attribute | ( | PurpleConvChat * | chat, |
PurpleConvChatBuddy * | cb, | ||
const char * | key, | ||
const char * | value | ||
) |
Set an attribute of a chat buddy.
chat | The chat. |
cb | The chat buddy. |
key | The key of the attribute. |
value | The value of the attribute. |
void purple_conv_chat_cb_set_attributes | ( | PurpleConvChat * | chat, |
PurpleConvChatBuddy * | cb, | ||
GList * | keys, | ||
GList * | values | ||
) |
Set attributes of a chat buddy.
chat | The chat. |
cb | The chat buddy. |
keys | A GList of the keys. |
values | A GList of the values. |
void purple_conv_chat_clear_users | ( | PurpleConvChat * | chat | ) |
Clears all users from a chat.
chat | The chat. |
gboolean purple_conv_chat_find_user | ( | PurpleConvChat * | chat, |
const char * | user | ||
) |
Finds a user in a chat.
chat | The chat. |
user | The user to look for. |
PurpleConversation * purple_conv_chat_get_conversation | ( | const PurpleConvChat * | chat | ) |
Gets a chat's parent conversation.
chat | The chat. |
int purple_conv_chat_get_id | ( | const PurpleConvChat * | chat | ) |
Returns the chat room's ID.
chat | The chat. |
GList * purple_conv_chat_get_ignored | ( | const PurpleConvChat * | chat | ) |
Returns the list of ignored users in the chat room.
chat | The chat. |
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.
If the user found contains a prefix, such as '+' or '@', this is also returned. The username passed to the function does not have to have this formatting.
chat | The chat. |
user | The user to check in the ignore list. |
NULL
if not found. const char * purple_conv_chat_get_nick | ( | PurpleConvChat * | chat | ) |
Gets your nickname (used for hilighting) for a chat.
chat | The chat. |
const char * purple_conv_chat_get_topic | ( | const PurpleConvChat * | chat | ) |
Returns the chat room's topic.
chat | The chat. |
GList * purple_conv_chat_get_users | ( | const PurpleConvChat * | chat | ) |
Returns a list of users in the chat room.
The members of the list are PurpleConvChatBuddy objects.
chat | The chat. |
gboolean purple_conv_chat_has_left | ( | PurpleConvChat * | chat | ) |
Returns true if we're no longer in this chat, and just left the window open.
chat | The chat. |
TRUE
if we left the chat already, FALSE
if we're still there. void purple_conv_chat_ignore | ( | PurpleConvChat * | chat, |
const char * | name | ||
) |
Ignores a user in a chat room.
chat | The chat. |
name | The name of the user. |
void purple_conv_chat_invite_user | ( | PurpleConvChat * | chat, |
const char * | user, | ||
const char * | message, | ||
gboolean | confirm | ||
) |
Invite a user to a chat.
The user will be prompted to enter the user's name or a message if one is not given.
chat | The chat. |
user | The user to invite to the chat. |
message | The message to send with the invitation. |
confirm | Prompt before sending the invitation. The user is always prompted if either user or message is NULL . |
gboolean purple_conv_chat_is_user_ignored | ( | const PurpleConvChat * | chat, |
const char * | user | ||
) |
Returns TRUE
if the specified user is ignored.
chat | The chat. |
user | The user. |
TRUE
if the user is in the ignore list; FALSE
otherwise. void purple_conv_chat_left | ( | PurpleConvChat * | chat | ) |
Lets the core know we left a chat, without destroying it.
Called from serv_got_chat_left().
chat | The chat. |
void purple_conv_chat_remove_user | ( | PurpleConvChat * | chat, |
const char * | user, | ||
const char * | reason | ||
) |
Removes a user from a chat, optionally with a reason.
It is up to the developer to free this list after calling this function.
chat | The chat. |
user | The user that is being removed. |
reason | The optional reason given for the removal. Can be NULL . |
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.
chat | The chat. |
users | The users that are being removed. |
reason | The optional reason given for the removal. Can be NULL . |
void purple_conv_chat_rename_user | ( | PurpleConvChat * | chat, |
const char * | old_user, | ||
const char * | new_user | ||
) |
Renames a user in a chat.
chat | The chat. |
old_user | The old username. |
new_user | The new username. |
void purple_conv_chat_send | ( | PurpleConvChat * | chat, |
const char * | message | ||
) |
Sends a message to this chat conversation.
chat | The chat. |
message | The message to send. |
void purple_conv_chat_send_with_flags | ( | PurpleConvChat * | chat, |
const char * | message, | ||
PurpleMessageFlags | flags | ||
) |
Sends a message to this chat conversation with specified flags.
chat | The chat. |
message | The message to send. |
flags | The PurpleMessageFlags flags to use. |
void purple_conv_chat_set_id | ( | PurpleConvChat * | chat, |
int | id | ||
) |
Sets the chat room's ID.
chat | The chat. |
id | The ID. |
GList * purple_conv_chat_set_ignored | ( | PurpleConvChat * | chat, |
GList * | ignored | ||
) |
Sets the list of ignored users in the chat room.
chat | The chat. |
ignored | The list of ignored users. |
void purple_conv_chat_set_nick | ( | PurpleConvChat * | chat, |
const char * | nick | ||
) |
Sets your nickname (used for hilighting) for a chat.
chat | The chat. |
nick | The nick. |
void purple_conv_chat_set_topic | ( | PurpleConvChat * | chat, |
const char * | who, | ||
const char * | topic | ||
) |
Sets the chat room's topic.
chat | The chat. |
who | The user that set the topic. |
topic | The topic. |
GList * purple_conv_chat_set_users | ( | PurpleConvChat * | chat, |
GList * | users | ||
) |
Sets the list of users in the chat room.
chat | The chat. |
users | The list of users. |
void purple_conv_chat_unignore | ( | PurpleConvChat * | chat, |
const char * | name | ||
) |
Unignores a user in a chat room.
chat | The chat. |
name | The name of the user. |
PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags | ( | PurpleConvChat * | chat, |
const char * | user | ||
) |
Get the flags for a user in a chat.
chat | The chat. |
user | The user to find the flags for |
void purple_conv_chat_user_set_flags | ( | PurpleConvChat * | chat, |
const char * | user, | ||
PurpleConvChatBuddyFlags | flags | ||
) |
Set a users flags in a chat.
chat | The chat. |
user | The user to update. |
flags | The new flags. |
void purple_conv_chat_write | ( | PurpleConvChat * | chat, |
const char * | who, | ||
const char * | message, | ||
PurpleMessageFlags | flags, | ||
time_t | mtime | ||
) |
Writes to a chat.
chat | The chat. |
who | The user who sent the message. |
message | The message to write. |
flags | The flags. |
mtime | The time the message was sent. |
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.
If this returns TRUE
you should call purple_conv_custom_smiley_write() one or more times, and then purple_conv_custom_smiley_close(). If this returns FALSE
, either the conv or smile were invalid, or the icon was found in the cache. In either case, calling write or close would be an error.
conv | The conversation to associate the smiley with. |
smile | The text associated with the smiley |
cksum_type | The type of checksum. |
chksum | The checksum, as a NUL terminated base64 string. |
remote | TRUE if the custom smiley is set by the remote user (buddy). |
TRUE
if an icon is expected, else FALSE. Note that it is an error to never call purple_conv_custom_smiley_close if this function returns TRUE
, but an error to call it if FALSE
is returned. 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.
conv | The purple conversation associated with the smiley. |
smile | The text associated with the smiley |
void purple_conv_custom_smiley_write | ( | PurpleConversation * | conv, |
const char * | smile, | ||
const guchar * | data, | ||
gsize | size | ||
) |
Updates the image associated with the current smiley.
conv | The conversation associated with the smiley. |
smile | The text associated with the smiley. |
data | The actual image data. |
size | The length of the data. |
PurpleConversation * purple_conv_im_get_conversation | ( | const PurpleConvIm * | im | ) |
Gets an IM's parent conversation.
im | The IM. |
PurpleBuddyIcon * purple_conv_im_get_icon | ( | const PurpleConvIm * | im | ) |
Returns the IM's buddy icon.
im | The IM. |
guint purple_conv_im_get_send_typed_timeout | ( | const PurpleConvIm * | im | ) |
Returns the IM's type again timeout interval.
im | The IM. |
time_t purple_conv_im_get_type_again | ( | const PurpleConvIm * | im | ) |
Returns the time after which another PURPLE_TYPING message should be sent.
im | The IM. |
PurpleTypingState purple_conv_im_get_typing_state | ( | const PurpleConvIm * | im | ) |
Returns the IM's typing state.
im | The IM. |
guint purple_conv_im_get_typing_timeout | ( | const PurpleConvIm * | im | ) |
Returns the IM's typing timeout.
im | The IM. |
void purple_conv_im_send | ( | PurpleConvIm * | im, |
const char * | message | ||
) |
Sends a message to this IM conversation.
im | The IM. |
message | The message to send. |
void purple_conv_im_send_with_flags | ( | PurpleConvIm * | im, |
const char * | message, | ||
PurpleMessageFlags | flags | ||
) |
Sends a message to this IM conversation with specified flags.
im | The IM. |
message | The message to send. |
flags | The PurpleMessageFlags flags to use in addition to PURPLE_MESSAGE_SEND. |
void purple_conv_im_set_icon | ( | PurpleConvIm * | im, |
PurpleBuddyIcon * | icon | ||
) |
Sets the IM's buddy icon.
This should only be called from within Purple. You probably want to call purple_buddy_icon_set_data().
im | The IM. |
icon | The buddy icon. |
void purple_conv_im_set_type_again | ( | PurpleConvIm * | im, |
unsigned int | val | ||
) |
Sets the quiet-time when no PURPLE_TYPING messages will be sent.
Few protocols need this. If the user is still typing after this quiet-period, then another PURPLE_TYPING message will be sent.
im | The IM. |
val | The number of seconds to wait before allowing another PURPLE_TYPING message to be sent to the user. Or 0 to not send another PURPLE_TYPING message. |
void purple_conv_im_set_typing_state | ( | PurpleConvIm * | im, |
PurpleTypingState | state | ||
) |
Sets the IM's typing state.
im | The IM. |
state | The typing state. |
void purple_conv_im_start_send_typed_timeout | ( | PurpleConvIm * | im | ) |
Starts the IM's type again timeout.
im | The IM. |
void purple_conv_im_start_typing_timeout | ( | PurpleConvIm * | im, |
int | timeout | ||
) |
Starts the IM's typing timeout.
im | The IM. |
timeout | The timeout. |
void purple_conv_im_stop_send_typed_timeout | ( | PurpleConvIm * | im | ) |
Stops the IM's type again timeout.
im | The IM. |
void purple_conv_im_stop_typing_timeout | ( | PurpleConvIm * | im | ) |
Stops the IM's typing timeout.
im | The IM. |
void purple_conv_im_update_typing | ( | PurpleConvIm * | im | ) |
Updates the visual typing notification for an IM conversation.
im | The IM. |
void purple_conv_im_write | ( | PurpleConvIm * | im, |
const char * | who, | ||
const char * | message, | ||
PurpleMessageFlags | flags, | ||
time_t | mtime | ||
) |
Writes to an IM.
im | The IM. |
who | The user who sent the message. |
message | The message to write. |
flags | The message flags. |
mtime | The time the message was sent. |
gboolean purple_conv_present_error | ( | const char * | who, |
PurpleAccount * | account, | ||
const char * | what | ||
) |
Presents an IM-error to the user.
This is a helper function to find a conversation, write an error to it, and raise the window. If a conversation with this user doesn't already exist, the function will return FALSE and the calling function can attempt to present the error another way (purple_notify_error, most likely)
who | The user this error is about |
account | The account this error is on |
what | The error |
void purple_conv_send_confirm | ( | PurpleConversation * | conv, |
const char * | message | ||
) |
Sends a message to a conversation after confirming with the user.
This function is intended for use in cases where the user hasn't explicitly and knowingly caused a message to be sent. The confirmation ensures that the user isn't sending a message by mistake.
conv | The conversation. |
message | The message to send. |
void purple_conversation_autoset_title | ( | PurpleConversation * | conv | ) |
Automatically sets the specified conversation's title.
This function takes OPT_IM_ALIAS_TAB into account, as well as the user's alias.
conv | The conversation. |
void purple_conversation_clear_message_history | ( | PurpleConversation * | conv | ) |
Clear the message history of a conversation.
conv | The conversation |
void purple_conversation_close_logs | ( | PurpleConversation * | conv | ) |
Closes any open logs for this conversation.
Note that new logs will be opened as necessary (e.g. upon receipt of a message, if the conversation has logging enabled. To disable logging for the remainder of the conversation, use purple_conversation_set_logging().
conv | The conversation. |
void purple_conversation_destroy | ( | PurpleConversation * | conv | ) |
Destroys the specified conversation and removes it from the parent window.
If this conversation is the only one contained in the parent window, that window is also destroyed.
conv | The conversation to destroy. |
gboolean purple_conversation_do_command | ( | PurpleConversation * | conv, |
const gchar * | cmdline, | ||
const gchar * | markup, | ||
gchar ** | error | ||
) |
Perform a command in a conversation.
Similar to
conv | The conversation. |
cmdline | The entire command including the arguments. |
markup | NULL , or the formatted command line. |
error | If the command failed errormsg is filled in with the appropriate error message, if not NULL . It must be freed by the caller with g_free(). |
TRUE
if the command was executed successfully, FALSE
otherwise.void purple_conversation_foreach | ( | void(*)(PurpleConversation *conv) | func | ) |
Calls a function on each conversation.
func | The function. |
PurpleAccount * purple_conversation_get_account | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's purple_account.
This purple_account represents the user using purple, not the person the user is having a conversation/chat/flame with.
conv | The conversation. |
PurpleConvChat * purple_conversation_get_chat_data | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's chat-specific data.
If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return NULL
.
conv | The conversation. |
gpointer purple_conversation_get_data | ( | PurpleConversation * | conv, |
const char * | key | ||
) |
Returns extra data in a conversation.
conv | The conversation. |
key | The unqiue key. |
GList * purple_conversation_get_extended_menu | ( | PurpleConversation * | conv | ) |
Retrieves the extended menu items for the conversation.
conv | The conversation. |
PurpleConnectionFlags purple_conversation_get_features | ( | PurpleConversation * | conv | ) |
Get the features supported by the given conversation.
conv | The conversation |
PurpleConnection * purple_conversation_get_gc | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's purple_connection.
This is the same as purple_conversation_get_user(conv)->gc.
conv | The conversation. |
PurpleConvIm * purple_conversation_get_im_data | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's IM-specific data.
If the conversation type is not PURPLE_CONV_TYPE_IM, this will return NULL
.
conv | The conversation. |
GList * purple_conversation_get_message_history | ( | PurpleConversation * | conv | ) |
Retrieve the message history of a conversation.
conv | The conversation |
const char * purple_conversation_get_name | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's name.
conv | The conversation. |
const char * purple_conversation_get_title | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's title.
conv | The conversation. |
PurpleConversationType purple_conversation_get_type | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's type.
conv | The conversation. |
PurpleConversationUiOps * purple_conversation_get_ui_ops | ( | const PurpleConversation * | conv | ) |
Returns the specified conversation's UI operations structure.
conv | The conversation. |
gboolean purple_conversation_has_focus | ( | PurpleConversation * | conv | ) |
Determines if a conversation has focus.
conv | The conversation. |
TRUE
if the conversation has focus, FALSE
if it does not or the UI does not have a concept of conversation focus gboolean purple_conversation_is_logging | ( | const PurpleConversation * | conv | ) |
Returns whether or not logging is enabled for this conversation.
conv | The conversation. |
TRUE
if logging is enabled, or FALSE
otherwise. PurpleMessageFlags purple_conversation_message_get_flags | ( | PurpleConvMessage * | msg | ) |
Get the message-flags of a PurpleConvMessage.
msg | A PurpleConvMessage |
const char * purple_conversation_message_get_message | ( | PurpleConvMessage * | msg | ) |
Get the message from a PurpleConvMessage.
msg | A PurpleConvMessage |
const char * purple_conversation_message_get_sender | ( | PurpleConvMessage * | msg | ) |
Get the sender from a PurpleConvMessage.
msg | A PurpleConvMessage |
time_t purple_conversation_message_get_timestamp | ( | PurpleConvMessage * | msg | ) |
Get the timestamp of a PurpleConvMessage.
msg | A PurpleConvMessage |
PurpleConversation * purple_conversation_new | ( | PurpleConversationType | type, |
PurpleAccount * | account, | ||
const char * | name | ||
) |
Creates a new conversation of the specified type.
type | The type of conversation. |
account | The account opening the conversation window on the purple user's end. |
name | The name of the conversation. For PURPLE_CONV_TYPE_IM, this is the name of the buddy. |
void purple_conversation_present | ( | PurpleConversation * | conv | ) |
Present a conversation to the user.
This allows core code to initiate a conversation by displaying the IM dialog.
conv | The conversation to present |
void purple_conversation_set_account | ( | PurpleConversation * | conv, |
PurpleAccount * | account | ||
) |
Sets the specified conversation's purple_account.
This purple_account represents the user using purple, not the person the user is having a conversation/chat/flame with.
conv | The conversation. |
account | The purple_account. |
void purple_conversation_set_data | ( | PurpleConversation * | conv, |
const char * | key, | ||
gpointer | data | ||
) |
Sets extra data for a conversation.
conv | The conversation. |
key | The unique key. |
data | The data to assign. |
void purple_conversation_set_features | ( | PurpleConversation * | conv, |
PurpleConnectionFlags | features | ||
) |
Set the features as supported for the given conversation.
conv | The conversation |
features | Bitset defining supported features |
void purple_conversation_set_logging | ( | PurpleConversation * | conv, |
gboolean | log | ||
) |
Enables or disables logging for this conversation.
conv | The conversation. |
log | TRUE if logging should be enabled, or FALSE otherwise. |
void purple_conversation_set_name | ( | PurpleConversation * | conv, |
const char * | name | ||
) |
Sets the specified conversation's name.
conv | The conversation. |
name | The conversation's name. |
void purple_conversation_set_title | ( | PurpleConversation * | conv, |
const char * | title | ||
) |
Sets the specified conversation's title.
conv | The conversation. |
title | The title. |
void purple_conversation_set_ui_ops | ( | PurpleConversation * | conv, |
PurpleConversationUiOps * | ops | ||
) |
Sets the specified conversation's UI operations structure.
conv | The conversation. |
ops | The UI conversation operations structure. |
void purple_conversation_update | ( | PurpleConversation * | conv, |
PurpleConvUpdateType | type | ||
) |
Updates the visual status and UI of a conversation.
conv | The conversation. |
type | The update type. |
void purple_conversation_write | ( | PurpleConversation * | conv, |
const char * | who, | ||
const char * | message, | ||
PurpleMessageFlags | flags, | ||
time_t | mtime | ||
) |
Writes to a conversation window.
This function should not be used to write IM or chat messages. Use purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will most likely call this anyway, but they may do their own formatting, sound playback, etc.
This can be used to write generic messages, such as "so and so closed the conversation window."
conv | The conversation. |
who | The user who sent the message. |
message | The message. |
flags | The message flags. |
mtime | The time the message was sent. |
void * purple_conversations_get_handle | ( | void | ) |
Returns the conversation subsystem handle.
void purple_conversations_set_ui_ops | ( | PurpleConversationUiOps * | ops | ) |
Sets the default conversation UI operations structure.
ops | The UI conversation operations structure. |
PurpleConversation * purple_find_chat | ( | const PurpleConnection * | gc, |
int | id | ||
) |
Finds a chat with the specified chat ID.
gc | The purple_connection. |
id | The chat ID. |
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.
type | The type of the conversation. |
name | The name of the conversation. |
account | The purple_account associated with the conversation. |
NULL
otherwise. GList * purple_get_chats | ( | void | ) |
Returns a list of all chats.
GList * purple_get_conversations | ( | void | ) |
Returns a list of all conversations.
This list includes both IMs and chats.
GList * purple_get_ims | ( | void | ) |
Returns a list of all IMs.