Loading...
Searching...
No Matches
conversation.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_CONVERSATION_H_
#define _PURPLE_CONVERSATION_H_
/**************************************************************************/
/**************************************************************************/
typedef struct _PurpleConversationUiOps PurpleConversationUiOps;
typedef struct _PurpleConversation PurpleConversation;
typedef struct _PurpleConvIm PurpleConvIm;
typedef struct _PurpleConvChat PurpleConvChat;
typedef struct _PurpleConvChatBuddy PurpleConvChatBuddy;
typedef struct _PurpleConvMessage PurpleConvMessage;
typedef enum
{
PURPLE_CONV_TYPE_UNKNOWN = 0,
PURPLE_CONV_TYPE_IM,
PURPLE_CONV_TYPE_CHAT,
PURPLE_CONV_TYPE_MISC,
PURPLE_CONV_TYPE_ANY
} PurpleConversationType;
typedef enum
{
PURPLE_CONV_UPDATE_ADD = 0,
PURPLE_CONV_UPDATE_REMOVE,
PURPLE_CONV_UPDATE_ACCOUNT,
PURPLE_CONV_UPDATE_TYPING,
PURPLE_CONV_UPDATE_UNSEEN,
PURPLE_CONV_UPDATE_LOGGING,
PURPLE_CONV_UPDATE_TOPIC,
/*
* XXX These need to go when we implement a more generic core/UI event
* system.
*/
PURPLE_CONV_ACCOUNT_ONLINE,
PURPLE_CONV_ACCOUNT_OFFLINE,
PURPLE_CONV_UPDATE_AWAY,
PURPLE_CONV_UPDATE_ICON,
PURPLE_CONV_UPDATE_TITLE,
PURPLE_CONV_UPDATE_CHATLEFT,
PURPLE_CONV_UPDATE_FEATURES
} PurpleConvUpdateType;
typedef enum
{
PURPLE_NOT_TYPING = 0,
PURPLE_TYPING,
PURPLE_TYPED
} PurpleTypingState;
typedef enum
{
PURPLE_MESSAGE_SEND = 0x0001,
PURPLE_MESSAGE_RECV = 0x0002,
PURPLE_MESSAGE_SYSTEM = 0x0004,
PURPLE_MESSAGE_AUTO_RESP = 0x0008,
PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010,
PURPLE_MESSAGE_NICK = 0x0020,
PURPLE_MESSAGE_NO_LOG = 0x0040,
PURPLE_MESSAGE_WHISPER = 0x0080,
PURPLE_MESSAGE_ERROR = 0x0200,
PURPLE_MESSAGE_DELAYED = 0x0400,
PURPLE_MESSAGE_RAW = 0x0800,
PURPLE_MESSAGE_IMAGES = 0x1000,
PURPLE_MESSAGE_NOTIFY = 0x2000,
PURPLE_MESSAGE_NO_LINKIFY = 0x4000,
PURPLE_MESSAGE_INVISIBLE = 0x8000,
PURPLE_MESSAGE_REMOTE_SEND = 0x10000
} PurpleMessageFlags;
typedef enum
{
PURPLE_CBFLAGS_NONE = 0x0000,
PURPLE_CBFLAGS_VOICE = 0x0001,
PURPLE_CBFLAGS_HALFOP = 0x0002,
PURPLE_CBFLAGS_OP = 0x0004,
PURPLE_CBFLAGS_FOUNDER = 0x0008,
PURPLE_CBFLAGS_TYPING = 0x0010,
PURPLE_CBFLAGS_AWAY = 0x0020
} PurpleConvChatBuddyFlags;
#include "account.h"
#include "buddyicon.h"
#include "log.h"
#include "server.h"
struct _PurpleConversationUiOps
{
void (*create_conversation)(PurpleConversation *conv);
void (*destroy_conversation)(PurpleConversation *conv);
void (*write_chat)(PurpleConversation *conv, const char *who,
const char *message, PurpleMessageFlags flags,
time_t mtime);
void (*write_im)(PurpleConversation *conv, const char *who,
const char *message, PurpleMessageFlags flags,
time_t mtime);
void (*write_conv)(PurpleConversation *conv,
const char *name,
const char *alias,
const char *message,
PurpleMessageFlags flags,
time_t mtime);
void (*chat_add_users)(PurpleConversation *conv,
GList *cbuddies,
gboolean new_arrivals);
void (*chat_rename_user)(PurpleConversation *conv, const char *old_name,
const char *new_name, const char *new_alias);
void (*chat_remove_users)(PurpleConversation *conv, GList *users);
void (*chat_update_user)(PurpleConversation *conv, const char *user);
void (*present)(PurpleConversation *conv);
gboolean (*has_focus)(PurpleConversation *conv);
/* Custom Smileys */
gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote);
void (*custom_smiley_write)(PurpleConversation *conv, const char *smile,
const guchar *data, gsize size);
void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
void (*send_confirm)(PurpleConversation *conv, const char *message);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
void (*_purple_reserved4)(void);
};
struct _PurpleConvIm
{
PurpleConversation *conv;
PurpleTypingState typing_state;
guint typing_timeout;
time_t type_again;
guint send_typed_timeout;
PurpleBuddyIcon *icon;
};
struct _PurpleConvChat
{
PurpleConversation *conv;
GList *in_room;
GList *ignored;
char *who;
char *topic;
int id;
char *nick;
gboolean left;
GHashTable *users;
};
struct _PurpleConvChatBuddy
{
char *name;
char *alias;
char *alias_key;
gboolean buddy;
PurpleConvChatBuddyFlags flags;
GHashTable *attributes;
gpointer ui_data;
};
struct _PurpleConvMessage
{
char *who;
char *what;
PurpleMessageFlags flags;
time_t when;
PurpleConversation *conv;
char *alias;
};
struct _PurpleConversation
{
PurpleConversationType type;
PurpleAccount *account;
char *name;
char *title;
gboolean logging;
GList *logs;
union
{
PurpleConvIm *im;
PurpleConvChat *chat;
void *misc;
} u;
PurpleConversationUiOps *ui_ops;
void *ui_data;
GHashTable *data;
PurpleConnectionFlags features;
GList *message_history;
};
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************/
/**************************************************************************/
PurpleConversation *purple_conversation_new(PurpleConversationType type,
PurpleAccount *account,
const char *name);
void purple_conversation_destroy(PurpleConversation *conv);
void purple_conversation_present(PurpleConversation *conv);
PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv);
void purple_conversation_set_ui_ops(PurpleConversation *conv,
PurpleConversationUiOps *ops);
void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
PurpleConversationUiOps *purple_conversation_get_ui_ops(
const PurpleConversation *conv);
void purple_conversation_set_account(PurpleConversation *conv,
PurpleAccount *account);
PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv);
PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv);
void purple_conversation_set_title(PurpleConversation *conv, const char *title);
const char *purple_conversation_get_title(const PurpleConversation *conv);
void purple_conversation_autoset_title(PurpleConversation *conv);
void purple_conversation_set_name(PurpleConversation *conv, const char *name);
const char *purple_conversation_get_name(const PurpleConversation *conv);
const char *purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key);
GList *purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb);
void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value);
void
purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values);
void purple_conversation_set_logging(PurpleConversation *conv, gboolean log);
gboolean purple_conversation_is_logging(const PurpleConversation *conv);
void purple_conversation_close_logs(PurpleConversation *conv);
PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv);
#define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c))
PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv);
#define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c))
void purple_conversation_set_data(PurpleConversation *conv, const char *key,
gpointer data);
gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
GList *purple_get_conversations(void);
GList *purple_get_ims(void);
GList *purple_get_chats(void);
PurpleConversation *purple_find_conversation_with_account(
PurpleConversationType type, const char *name,
const PurpleAccount *account);
void purple_conversation_write(PurpleConversation *conv, const char *who,
const char *message, PurpleMessageFlags flags,
time_t mtime);
void purple_conversation_set_features(PurpleConversation *conv,
PurpleConnectionFlags features);
PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv);
gboolean purple_conversation_has_focus(PurpleConversation *conv);
void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type);
void purple_conversation_foreach(void (*func)(PurpleConversation *conv));
GList *purple_conversation_get_message_history(PurpleConversation *conv);
void purple_conversation_clear_message_history(PurpleConversation *conv);
const char *purple_conversation_message_get_sender(PurpleConvMessage *msg);
const char *purple_conversation_message_get_message(PurpleConvMessage *msg);
PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg);
time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg);
/**************************************************************************/
/**************************************************************************/
PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im);
void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon);
PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im);
void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state);
PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im);
void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout);
void purple_conv_im_stop_typing_timeout(PurpleConvIm *im);
guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im);
void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val);
time_t purple_conv_im_get_type_again(const PurpleConvIm *im);
void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im);
void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im);
guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im);
void purple_conv_im_update_typing(PurpleConvIm *im);
void purple_conv_im_write(PurpleConvIm *im, const char *who,
const char *message, PurpleMessageFlags flags,
time_t mtime);
gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what);
void purple_conv_im_send(PurpleConvIm *im, const char *message);
void purple_conv_send_confirm(PurpleConversation *conv, const char *message);
void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags);
gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile,
const char *cksum_type, const char *chksum,
gboolean remote);
void purple_conv_custom_smiley_write(PurpleConversation *conv,
const char *smile,
const guchar *data,
gsize size);
void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile);
/**************************************************************************/
/**************************************************************************/
PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat);
GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users);
GList *purple_conv_chat_get_users(const PurpleConvChat *chat);
void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name);
void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name);
GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored);
GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat);
const char *purple_conv_chat_get_ignored_user(const PurpleConvChat *chat,
const char *user);
gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat,
const char *user);
void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who,
const char *topic);
const char *purple_conv_chat_get_topic(const PurpleConvChat *chat);
void purple_conv_chat_set_id(PurpleConvChat *chat, int id);
int purple_conv_chat_get_id(const PurpleConvChat *chat);
void purple_conv_chat_write(PurpleConvChat *chat, const char *who,
const char *message, PurpleMessageFlags flags,
time_t mtime);
void purple_conv_chat_send(PurpleConvChat *chat, const char *message);
void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags);
void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user,
const char *extra_msg, PurpleConvChatBuddyFlags flags,
gboolean new_arrival);
void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs,
GList *flags, gboolean new_arrivals);
void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user,
const char *new_user);
void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user,
const char *reason);
void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users,
const char *reason);
gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user);
void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user,
PurpleConvChatBuddyFlags flags);
PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat,
const char *user);
void purple_conv_chat_clear_users(PurpleConvChat *chat);
void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick);
const char *purple_conv_chat_get_nick(PurpleConvChat *chat);
PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id);
void purple_conv_chat_left(PurpleConvChat *chat);
void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
const char *message, gboolean confirm);
gboolean purple_conv_chat_has_left(PurpleConvChat *chat);
PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias,
PurpleConvChatBuddyFlags flags);
PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name);
const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb);
void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb);
GList * purple_conversation_get_extended_menu(PurpleConversation *conv);
gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error);
/**************************************************************************/
/**************************************************************************/
void *purple_conversations_get_handle(void);
void purple_conversations_init(void);
void purple_conversations_uninit(void);
#ifdef __cplusplus
}
#endif
#endif /* _PURPLE_CONVERSATION_H_ */
account.h
Account API.
PurpleAccount
struct _PurpleAccount PurpleAccount
Structure representing an account.
Definition account.h:38
buddyicon.h
Buddy Icon API.
PurpleBuddyIcon
struct _PurpleBuddyIcon PurpleBuddyIcon
An opaque structure representing a buddy icon for a particular user on a particular PurpleAccount.
Definition buddyicon.h:34
PurpleConnectionFlags
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
Definition connection.h:37
PurpleConnection
struct _PurpleConnection PurpleConnection
Definition connection.h:31
PurpleConvIm
struct _PurpleConvIm PurpleConvIm
Data specific to Instant Messages.
Definition conversation.h:40
purple_conv_chat_cb_set_attributes
void purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values)
Set attributes of a chat buddy.
PurpleTypingState
PurpleTypingState
The typing state of a user.
Definition conversation.h:95
PURPLE_NOT_TYPING
@ PURPLE_NOT_TYPING
Not typing.
Definition conversation.h:96
PURPLE_TYPING
@ PURPLE_TYPING
Currently typing.
Definition conversation.h:97
PURPLE_TYPED
@ PURPLE_TYPED
Stopped typing momentarily.
Definition conversation.h:98
purple_conversations_get_handle
void * purple_conversations_get_handle(void)
Returns the conversation subsystem handle.
purple_conv_im_update_typing
void purple_conv_im_update_typing(PurpleConvIm *im)
Updates the visual typing notification for an IM conversation.
purple_conversation_get_features
PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv)
Get the features supported by the given conversation.
purple_conv_im_get_typing_state
PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im)
Returns the IM's typing state.
purple_conv_chat_invite_user
void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user, const char *message, gboolean confirm)
Invite a user to a chat.
purple_conversation_set_ui_ops
void purple_conversation_set_ui_ops(PurpleConversation *conv, PurpleConversationUiOps *ops)
Sets the specified conversation's UI operations structure.
purple_conv_chat_cb_get_attribute
const char * purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key)
Get an attribute of a chat buddy.
purple_conv_chat_cb_destroy
void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb)
Destroys a chat buddy.
PurpleConvChatBuddy
struct _PurpleConvChatBuddy PurpleConvChatBuddy
Data for "Chat Buddies".
Definition conversation.h:44
purple_conversation_get_ui_ops
PurpleConversationUiOps * purple_conversation_get_ui_ops(const PurpleConversation *conv)
Returns the specified conversation's UI operations structure.
purple_conv_im_get_send_typed_timeout
guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im)
Returns the IM's type again timeout interval.
purple_conversation_set_account
void purple_conversation_set_account(PurpleConversation *conv, PurpleAccount *account)
Sets the specified conversation's purple_account.
purple_conv_custom_smiley_add
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.
purple_conv_chat_set_users
GList * purple_conv_chat_set_users(PurpleConvChat *chat, GList *users)
Sets the list of users in the chat room.
purple_conversation_set_features
void purple_conversation_set_features(PurpleConversation *conv, PurpleConnectionFlags features)
Set the features as supported for the given conversation.
purple_conversation_get_data
gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key)
Returns extra data in a conversation.
purple_conv_chat_send
void purple_conv_chat_send(PurpleConvChat *chat, const char *message)
Sends a message to this chat conversation.
purple_conv_chat_left
void purple_conv_chat_left(PurpleConvChat *chat)
Lets the core know we left a chat, without destroying it.
purple_conv_send_confirm
void purple_conv_send_confirm(PurpleConversation *conv, const char *message)
Sends a message to a conversation after confirming with the user.
purple_conv_im_start_send_typed_timeout
void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im)
Starts the IM's type again timeout.
PurpleConvChatBuddyFlags
PurpleConvChatBuddyFlags
Flags applicable to users in Chats.
Definition conversation.h:139
PURPLE_CBFLAGS_TYPING
@ PURPLE_CBFLAGS_TYPING
Currently typing.
Definition conversation.h:145
PURPLE_CBFLAGS_HALFOP
@ PURPLE_CBFLAGS_HALFOP
Half-op.
Definition conversation.h:142
PURPLE_CBFLAGS_OP
@ PURPLE_CBFLAGS_OP
Channel Op or Moderator.
Definition conversation.h:143
PURPLE_CBFLAGS_FOUNDER
@ PURPLE_CBFLAGS_FOUNDER
Channel Founder.
Definition conversation.h:144
PURPLE_CBFLAGS_AWAY
@ PURPLE_CBFLAGS_AWAY
Currently away.
Definition conversation.h:146
PURPLE_CBFLAGS_VOICE
@ PURPLE_CBFLAGS_VOICE
Voiced user or "Participant".
Definition conversation.h:141
PURPLE_CBFLAGS_NONE
@ PURPLE_CBFLAGS_NONE
No flags.
Definition conversation.h:140
purple_conversations_set_ui_ops
void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops)
Sets the default conversation UI operations structure.
purple_conversation_get_name
const char * purple_conversation_get_name(const PurpleConversation *conv)
Returns the specified conversation's name.
purple_conv_chat_get_ignored_user
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.
purple_conversation_write
void purple_conversation_write(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a conversation window.
purple_conv_chat_clear_users
void purple_conv_chat_clear_users(PurpleConvChat *chat)
Clears all users from a chat.
purple_conversation_get_extended_menu
GList * purple_conversation_get_extended_menu(PurpleConversation *conv)
Retrieves the extended menu items for the conversation.
purple_conv_im_get_type_again
time_t purple_conv_im_get_type_again(const PurpleConvIm *im)
Returns the time after which another PURPLE_TYPING message should be sent.
purple_conversation_present
void purple_conversation_present(PurpleConversation *conv)
Present a conversation to the user.
purple_conv_chat_has_left
gboolean purple_conv_chat_has_left(PurpleConvChat *chat)
Returns true if we're no longer in this chat, and just left the window open.
purple_conversation_message_get_message
const char * purple_conversation_message_get_message(PurpleConvMessage *msg)
Get the message from a PurpleConvMessage.
purple_conv_chat_send_with_flags
void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags)
Sends a message to this chat conversation with specified flags.
purple_conv_im_send
void purple_conv_im_send(PurpleConvIm *im, const char *message)
Sends a message to this IM conversation.
purple_conversation_do_command
gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error)
Perform a command in a conversation.
purple_conversation_get_type
PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv)
Returns the specified conversation's type.
purple_conversation_get_account
PurpleAccount * purple_conversation_get_account(const PurpleConversation *conv)
Returns the specified conversation's purple_account.
purple_conversation_get_title
const char * purple_conversation_get_title(const PurpleConversation *conv)
Returns the specified conversation's title.
purple_conv_im_get_conversation
PurpleConversation * purple_conv_im_get_conversation(const PurpleConvIm *im)
Gets an IM's parent conversation.
purple_get_chats
GList * purple_get_chats(void)
Returns a list of all chats.
PurpleConvMessage
struct _PurpleConvMessage PurpleConvMessage
Description of a conversation message.
Definition conversation.h:46
purple_conv_chat_user_get_flags
PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat, const char *user)
Get the flags for a user in a chat.
purple_conversation_message_get_sender
const char * purple_conversation_message_get_sender(PurpleConvMessage *msg)
Get the sender from a PurpleConvMessage.
purple_conversation_get_chat_data
PurpleConvChat * purple_conversation_get_chat_data(const PurpleConversation *conv)
Returns the specified conversation's chat-specific data.
purple_conv_chat_get_topic
const char * purple_conv_chat_get_topic(const PurpleConvChat *chat)
Returns the chat room's topic.
purple_conv_chat_user_set_flags
void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user, PurpleConvChatBuddyFlags flags)
Set a users flags in a chat.
purple_conv_present_error
gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what)
Presents an IM-error to the user.
purple_conv_chat_write
void purple_conv_chat_write(PurpleConvChat *chat, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to a chat.
purple_conv_chat_set_id
void purple_conv_chat_set_id(PurpleConvChat *chat, int id)
Sets the chat room's ID.
purple_conversation_is_logging
gboolean purple_conversation_is_logging(const PurpleConversation *conv)
Returns whether or not logging is enabled for this conversation.
purple_find_chat
PurpleConversation * purple_find_chat(const PurpleConnection *gc, int id)
Finds a chat with the specified chat ID.
PurpleMessageFlags
PurpleMessageFlags
Flags applicable to a message.
Definition conversation.h:106
PURPLE_MESSAGE_IMAGES
@ PURPLE_MESSAGE_IMAGES
Message contains images.
Definition conversation.h:125
PURPLE_MESSAGE_NO_LOG
@ PURPLE_MESSAGE_NO_LOG
Do not log.
Definition conversation.h:119
PURPLE_MESSAGE_RAW
@ PURPLE_MESSAGE_RAW
"Raw" message - don't apply formatting
Definition conversation.h:123
PURPLE_MESSAGE_REMOTE_SEND
@ PURPLE_MESSAGE_REMOTE_SEND
Message sent from another location, not an echo of a local one.
Definition conversation.h:130
PURPLE_MESSAGE_INVISIBLE
@ PURPLE_MESSAGE_INVISIBLE
Message should not be displayed.
Definition conversation.h:129
PURPLE_MESSAGE_NICK
@ PURPLE_MESSAGE_NICK
Contains your nick.
Definition conversation.h:118
PURPLE_MESSAGE_SYSTEM
@ PURPLE_MESSAGE_SYSTEM
System message.
Definition conversation.h:109
PURPLE_MESSAGE_NO_LINKIFY
@ PURPLE_MESSAGE_NO_LINKIFY
Message should not be auto- linkified.
Definition conversation.h:127
PURPLE_MESSAGE_WHISPER
@ PURPLE_MESSAGE_WHISPER
Whispered message.
Definition conversation.h:120
PURPLE_MESSAGE_SEND
@ PURPLE_MESSAGE_SEND
Outgoing message.
Definition conversation.h:107
PURPLE_MESSAGE_NOTIFY
@ PURPLE_MESSAGE_NOTIFY
Message is a notification.
Definition conversation.h:126
PURPLE_MESSAGE_ACTIVE_ONLY
@ 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
@ PURPLE_MESSAGE_ERROR
Error message.
Definition conversation.h:121
PURPLE_MESSAGE_RECV
@ PURPLE_MESSAGE_RECV
Incoming message.
Definition conversation.h:108
PURPLE_MESSAGE_DELAYED
@ PURPLE_MESSAGE_DELAYED
Delayed message.
Definition conversation.h:122
PURPLE_MESSAGE_AUTO_RESP
@ PURPLE_MESSAGE_AUTO_RESP
Auto response.
Definition conversation.h:110
purple_conv_chat_add_user
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.
purple_conv_chat_cb_get_name
const char * purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb)
Get the name of a chat buddy.
PurpleConvUpdateType
PurpleConvUpdateType
Conversation update type.
Definition conversation.h:65
PURPLE_CONV_UPDATE_TYPING
@ PURPLE_CONV_UPDATE_TYPING
The typing state was updated.
Definition conversation.h:71
PURPLE_CONV_UPDATE_AWAY
@ PURPLE_CONV_UPDATE_AWAY
The other user went away.
Definition conversation.h:82
PURPLE_CONV_UPDATE_REMOVE
@ PURPLE_CONV_UPDATE_REMOVE
The buddy associated with the conversation was removed.
Definition conversation.h:68
PURPLE_CONV_UPDATE_TOPIC
@ PURPLE_CONV_UPDATE_TOPIC
The topic for a chat was updated.
Definition conversation.h:75
PURPLE_CONV_UPDATE_ACCOUNT
@ PURPLE_CONV_UPDATE_ACCOUNT
The purple_account was changed.
Definition conversation.h:70
PURPLE_CONV_ACCOUNT_ONLINE
@ PURPLE_CONV_ACCOUNT_ONLINE
One of the user's accounts went online.
Definition conversation.h:80
PURPLE_CONV_UPDATE_ADD
@ PURPLE_CONV_UPDATE_ADD
The buddy associated with the conversation was added.
Definition conversation.h:66
PURPLE_CONV_UPDATE_UNSEEN
@ PURPLE_CONV_UPDATE_UNSEEN
The unseen state was updated.
Definition conversation.h:72
PURPLE_CONV_UPDATE_FEATURES
@ PURPLE_CONV_UPDATE_FEATURES
The features for a chat have changed.
Definition conversation.h:87
PURPLE_CONV_UPDATE_ICON
@ PURPLE_CONV_UPDATE_ICON
The other user's buddy icon changed.
Definition conversation.h:83
PURPLE_CONV_UPDATE_LOGGING
@ PURPLE_CONV_UPDATE_LOGGING
Logging for this conversation was enabled or disabled.
Definition conversation.h:73
PURPLE_CONV_ACCOUNT_OFFLINE
@ PURPLE_CONV_ACCOUNT_OFFLINE
One of the user's accounts went offline.
Definition conversation.h:81
purple_conversation_get_message_history
GList * purple_conversation_get_message_history(PurpleConversation *conv)
Retrieve the message history of a conversation.
purple_conv_chat_get_conversation
PurpleConversation * purple_conv_chat_get_conversation(const PurpleConvChat *chat)
Gets a chat's parent conversation.
purple_conversation_foreach
void purple_conversation_foreach(void(*func)(PurpleConversation *conv))
Calls a function on each conversation.
purple_conversation_clear_message_history
void purple_conversation_clear_message_history(PurpleConversation *conv)
Clear the message history of a conversation.
purple_conv_chat_ignore
void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name)
Ignores a user in a chat room.
purple_conversation_new
PurpleConversation * purple_conversation_new(PurpleConversationType type, PurpleAccount *account, const char *name)
Creates a new conversation of the specified type.
purple_conv_chat_cb_get_attribute_keys
GList * purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb)
Get the keys of all atributes of a chat buddy.
purple_conv_chat_get_id
int purple_conv_chat_get_id(const PurpleConvChat *chat)
Returns the chat room's ID.
purple_conv_chat_add_users
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.
purple_conversation_set_title
void purple_conversation_set_title(PurpleConversation *conv, const char *title)
Sets the specified conversation's title.
purple_conv_chat_remove_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.
purple_conversation_set_data
void purple_conversation_set_data(PurpleConversation *conv, const char *key, gpointer data)
Sets extra data for a conversation.
purple_get_ims
GList * purple_get_ims(void)
Returns a list of all IMs.
purple_conv_chat_get_nick
const char * purple_conv_chat_get_nick(PurpleConvChat *chat)
Gets your nickname (used for hilighting) for a chat.
purple_conversation_autoset_title
void purple_conversation_autoset_title(PurpleConversation *conv)
Automatically sets the specified conversation's title.
purple_conv_im_write
void purple_conv_im_write(PurpleConvIm *im, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime)
Writes to an IM.
purple_conversation_message_get_timestamp
time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg)
Get the timestamp of a PurpleConvMessage.
purple_conv_chat_is_user_ignored
gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat, const char *user)
Returns TRUE if the specified user is ignored.
purple_conversation_set_logging
void purple_conversation_set_logging(PurpleConversation *conv, gboolean log)
Enables or disables logging for this conversation.
PurpleConversationType
PurpleConversationType
A type of conversation.
Definition conversation.h:52
PURPLE_CONV_TYPE_MISC
@ PURPLE_CONV_TYPE_MISC
A misc.
Definition conversation.h:56
PURPLE_CONV_TYPE_ANY
@ PURPLE_CONV_TYPE_ANY
Any type of conversation.
Definition conversation.h:57
PURPLE_CONV_TYPE_IM
@ PURPLE_CONV_TYPE_IM
Instant Message.
Definition conversation.h:54
PURPLE_CONV_TYPE_CHAT
@ PURPLE_CONV_TYPE_CHAT
Chat room.
Definition conversation.h:55
PURPLE_CONV_TYPE_UNKNOWN
@ PURPLE_CONV_TYPE_UNKNOWN
Unknown conversation type.
Definition conversation.h:53
purple_conv_chat_remove_users
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.
purple_conversations_init
void purple_conversations_init(void)
Initializes the conversation subsystem.
purple_conv_im_start_typing_timeout
void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout)
Starts the IM's typing timeout.
PurpleConvChat
struct _PurpleConvChat PurpleConvChat
Data specific to Chats.
Definition conversation.h:42
purple_conversation_update
void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type)
Updates the visual status and UI of a conversation.
purple_conv_chat_get_users
GList * purple_conv_chat_get_users(const PurpleConvChat *chat)
Returns a list of users in the chat room.
PurpleConversationUiOps
struct _PurpleConversationUiOps PurpleConversationUiOps
Data Structures.
Definition conversation.h:36
purple_conv_custom_smiley_close
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,...
purple_get_conversations
GList * purple_get_conversations(void)
Returns a list of all conversations.
purple_conv_im_get_icon
PurpleBuddyIcon * purple_conv_im_get_icon(const PurpleConvIm *im)
Returns the IM's buddy icon.
purple_conversation_set_name
void purple_conversation_set_name(PurpleConversation *conv, const char *name)
Sets the specified conversation's name.
purple_conv_chat_get_ignored
GList * purple_conv_chat_get_ignored(const PurpleConvChat *chat)
Returns the list of ignored users in the chat room.
purple_conversation_has_focus
gboolean purple_conversation_has_focus(PurpleConversation *conv)
Determines if a conversation has focus.
purple_conversation_destroy
void purple_conversation_destroy(PurpleConversation *conv)
Destroys the specified conversation and removes it from the parent window.
purple_conv_chat_rename_user
void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user, const char *new_user)
Renames a user in a chat.
purple_conv_im_set_typing_state
void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state)
Sets the IM's typing state.
purple_conv_chat_unignore
void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name)
Unignores a user in a chat room.
purple_conv_im_stop_send_typed_timeout
void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im)
Stops the IM's type again timeout.
purple_conversation_message_get_flags
PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg)
Get the message-flags of a PurpleConvMessage.
purple_conversation_close_logs
void purple_conversation_close_logs(PurpleConversation *conv)
Closes any open logs for this conversation.
PurpleConversation
struct _PurpleConversation PurpleConversation
A core representation of a conversation between two or more people.
Definition conversation.h:38
purple_conv_chat_set_topic
void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who, const char *topic)
Sets the chat room's topic.
purple_conv_chat_set_nick
void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick)
Sets your nickname (used for hilighting) for a chat.
purple_conversation_get_im_data
PurpleConvIm * purple_conversation_get_im_data(const PurpleConversation *conv)
Returns the specified conversation's IM-specific data.
purple_conv_custom_smiley_write
void purple_conv_custom_smiley_write(PurpleConversation *conv, const char *smile, const guchar *data, gsize size)
Updates the image associated with the current smiley.
purple_conversations_uninit
void purple_conversations_uninit(void)
Uninitializes the conversation subsystem.
purple_conv_chat_cb_set_attribute
void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value)
Set an attribute of a chat buddy.
purple_conversation_get_gc
PurpleConnection * purple_conversation_get_gc(const PurpleConversation *conv)
Returns the specified conversation's purple_connection.
purple_conv_chat_find_user
gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user)
Finds a user in a chat.
purple_conv_im_get_typing_timeout
guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im)
Returns the IM's typing timeout.
purple_conv_im_send_with_flags
void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags)
Sends a message to this IM conversation with specified flags.
purple_conv_chat_set_ignored
GList * purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored)
Sets the list of ignored users in the chat room.
purple_find_conversation_with_account
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.
purple_conv_im_stop_typing_timeout
void purple_conv_im_stop_typing_timeout(PurpleConvIm *im)
Stops the IM's typing timeout.
purple_conv_im_set_type_again
void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val)
Sets the quiet-time when no PURPLE_TYPING messages will be sent.
purple_conv_chat_cb_find
PurpleConvChatBuddy * purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name)
Find a chat buddy in a chat.
purple_conv_im_set_icon
void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon)
Sets the IM's buddy icon.
purple_conv_chat_cb_new
PurpleConvChatBuddy * purple_conv_chat_cb_new(const char *name, const char *alias, PurpleConvChatBuddyFlags flags)
Creates a new chat buddy.
log.h
Logging API.
server.h
Server API.
_PurpleConvChatBuddy
Data for "Chat Buddies".
Definition conversation.h:296
_PurpleConvChatBuddy::alias_key
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
_PurpleConvChatBuddy::buddy
gboolean buddy
TRUE if this chat participant is on the buddy list; FALSE otherwise.
Definition conversation.h:306
_PurpleConvChatBuddy::flags
PurpleConvChatBuddyFlags flags
A bitwise OR of flags for this participant, such as whether they are a channel operator.
Definition conversation.h:309
_PurpleConvChatBuddy::alias
char * alias
The chat participant's alias, if known; NULL otherwise.
Definition conversation.h:298
_PurpleConvChatBuddy::attributes
GHashTable * attributes
A hash table of attributes about the user, such as real name, user@host, etc.
Definition conversation.h:312
_PurpleConvChatBuddy::name
char * name
The chat participant's name in the chat.
Definition conversation.h:297
_PurpleConvChat
Data specific to Chats.
Definition conversation.h:274
_PurpleConvChat::in_room
GList * in_room
The users in the room.
Definition conversation.h:277
_PurpleConvChat::id
int id
The chat ID.
Definition conversation.h:283
_PurpleConvChat::ignored
GList * ignored
Ignored users.
Definition conversation.h:280
_PurpleConvChat::conv
PurpleConversation * conv
The parent conversation.
Definition conversation.h:275
_PurpleConvChat::who
char * who
The person who set the topic.
Definition conversation.h:281
_PurpleConvChat::users
GHashTable * users
Hash table of the users in the room.
Definition conversation.h:287
_PurpleConvChat::topic
char * topic
The topic.
Definition conversation.h:282
_PurpleConvChat::nick
char * nick
Your nick in this chat.
Definition conversation.h:284
_PurpleConvChat::left
gboolean left
We left the chat and kept the window open.
Definition conversation.h:286
_PurpleConvIm
Data specific to Instant Messages.
Definition conversation.h:259
_PurpleConvIm::type_again
time_t type_again
The type again time.
Definition conversation.h:264
_PurpleConvIm::icon
PurpleBuddyIcon * icon
The buddy icon.
Definition conversation.h:267
_PurpleConvIm::typing_state
PurpleTypingState typing_state
The current typing state.
Definition conversation.h:262
_PurpleConvIm::conv
PurpleConversation * conv
The parent conversation.
Definition conversation.h:260
_PurpleConvIm::typing_timeout
guint typing_timeout
The typing timer handle.
Definition conversation.h:263
_PurpleConvIm::send_typed_timeout
guint send_typed_timeout
The type again timer handle.
Definition conversation.h:265
_PurpleConvMessage
Description of a conversation message.
Definition conversation.h:324
_PurpleConvMessage::conv
PurpleConversation * conv
Definition conversation.h:329
_PurpleConvMessage::alias
char * alias
Definition conversation.h:330
_PurpleConversationUiOps
Conversation operations and events.
Definition conversation.h:162
_PurpleConversationUiOps::chat_remove_users
void(* chat_remove_users)(PurpleConversation *conv, GList *users)
Remove users from a chat.
Definition conversation.h:219
_PurpleConversationUiOps::write_conv
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
_PurpleConversationUiOps::present
void(* present)(PurpleConversation *conv)
Present this conversation to the user; for example, by displaying the IM dialog.
Definition conversation.h:228
_PurpleConversationUiOps::has_focus
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
_PurpleConversationUiOps::create_conversation
void(* create_conversation)(PurpleConversation *conv)
Called when conv is created (but before the conversation-created signal is emitted).
Definition conversation.h:166
_PurpleConversationUiOps::chat_add_users
void(* chat_add_users)(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals)
Add cbuddies to a chat.
Definition conversation.h:205
_PurpleConversationUiOps::send_confirm
void(* send_confirm)(PurpleConversation *conv, const char *message)
Prompt the user for confirmation to send message.
Definition conversation.h:247
_PurpleConversationUiOps::destroy_conversation
void(* destroy_conversation)(PurpleConversation *conv)
Called just before conv is freed.
Definition conversation.h:169
_PurpleConversationUiOps::chat_rename_user
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
_PurpleConversationUiOps::write_chat
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
_PurpleConversationUiOps::chat_update_user
void(* chat_update_user)(PurpleConversation *conv, const char *user)
Called when a user's flags are changed.
Definition conversation.h:223
_PurpleConversationUiOps::write_im
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
_PurpleConversation
A core representation of a conversation between two or more people.
Definition conversation.h:339
_PurpleConversation::data
GHashTable * data
Plugin-specific data.
Definition conversation.h:363
_PurpleConversation::message_history
GList * message_history
Message history, as a GList of PurpleConvMessage's.
Definition conversation.h:366
_PurpleConversation::title
char * title
The window title.
Definition conversation.h:346
_PurpleConversation::account
PurpleAccount * account
The user using this conversation.
Definition conversation.h:342
_PurpleConversation::logs
GList * logs
This conversation's logs.
Definition conversation.h:350
_PurpleConversation::ui_data
void * ui_data
UI-specific data.
Definition conversation.h:361
_PurpleConversation::name
char * name
The name of the conversation.
Definition conversation.h:345
_PurpleConversation::im
PurpleConvIm * im
IM-specific data.
Definition conversation.h:354
_PurpleConversation::chat
PurpleConvChat * chat
Chat-specific data.
Definition conversation.h:355
_PurpleConversation::misc
void * misc
Misc.
Definition conversation.h:356
_PurpleConversation::logging
gboolean logging
The status of logging.
Definition conversation.h:348
_PurpleConversation::type
PurpleConversationType type
The type of conversation.
Definition conversation.h:340
_PurpleConversation::ui_ops
PurpleConversationUiOps * ui_ops
UI-specific operations.
Definition conversation.h:360
_PurpleConversation::features
PurpleConnectionFlags features
The supported features.
Definition conversation.h:365