Frameworks/libpurple.framework/Versions/0.5.6/Headers/conversation.h
branchadium-1.3
changeset 350 708bedafdc3a
parent 349 17ef128722b7
child 351 b01ab9b157f9
     1.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/conversation.h	Sun Jun 21 22:04:11 2009 -0400
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,1407 +0,0 @@
     1.4 -/**
     1.5 - * @file conversation.h Conversation API
     1.6 - * @ingroup core
     1.7 - * @see @ref conversation-signals
     1.8 - */
     1.9 -
    1.10 -/* purple
    1.11 - *
    1.12 - * Purple is the legal property of its developers, whose names are too numerous
    1.13 - * to list here.  Please refer to the COPYRIGHT file distributed with this
    1.14 - * source distribution.
    1.15 - *
    1.16 - * This program is free software; you can redistribute it and/or modify
    1.17 - * it under the terms of the GNU General Public License as published by
    1.18 - * the Free Software Foundation; either version 2 of the License, or
    1.19 - * (at your option) any later version.
    1.20 - *
    1.21 - * This program is distributed in the hope that it will be useful,
    1.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.24 - * GNU General Public License for more details.
    1.25 - *
    1.26 - * You should have received a copy of the GNU General Public License
    1.27 - * along with this program; if not, write to the Free Software
    1.28 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    1.29 - */
    1.30 -#ifndef _PURPLE_CONVERSATION_H_
    1.31 -#define _PURPLE_CONVERSATION_H_
    1.32 -
    1.33 -/**************************************************************************/
    1.34 -/** Data Structures                                                       */
    1.35 -/**************************************************************************/
    1.36 -
    1.37 -
    1.38 -/** @copydoc _PurpleConversationUiOps */
    1.39 -typedef struct _PurpleConversationUiOps PurpleConversationUiOps;
    1.40 -/** @copydoc _PurpleConversation */
    1.41 -typedef struct _PurpleConversation      PurpleConversation;
    1.42 -/** @copydoc _PurpleConvIm */
    1.43 -typedef struct _PurpleConvIm            PurpleConvIm;
    1.44 -/** @copydoc _PurpleConvChat */
    1.45 -typedef struct _PurpleConvChat          PurpleConvChat;
    1.46 -/** @copydoc _PurpleConvChatBuddy */
    1.47 -typedef struct _PurpleConvChatBuddy     PurpleConvChatBuddy;
    1.48 -/** @copydoc _PurpleConvMessage */
    1.49 -typedef struct _PurpleConvMessage       PurpleConvMessage;
    1.50 -
    1.51 -/**
    1.52 - * A type of conversation.
    1.53 - */
    1.54 -typedef enum
    1.55 -{
    1.56 -	PURPLE_CONV_TYPE_UNKNOWN = 0, /**< Unknown conversation type. */
    1.57 -	PURPLE_CONV_TYPE_IM,          /**< Instant Message.           */
    1.58 -	PURPLE_CONV_TYPE_CHAT,        /**< Chat room.                 */
    1.59 -	PURPLE_CONV_TYPE_MISC,        /**< A misc. conversation.      */
    1.60 -	PURPLE_CONV_TYPE_ANY          /**< Any type of conversation.  */
    1.61 -
    1.62 -} PurpleConversationType;
    1.63 -
    1.64 -/**
    1.65 - * Conversation update type.
    1.66 - */
    1.67 -typedef enum
    1.68 -{
    1.69 -	PURPLE_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation
    1.70 -	                               was added.   */
    1.71 -	PURPLE_CONV_UPDATE_REMOVE,  /**< The buddy associated with the conversation
    1.72 -	                               was removed. */
    1.73 -	PURPLE_CONV_UPDATE_ACCOUNT, /**< The purple_account was changed. */
    1.74 -	PURPLE_CONV_UPDATE_TYPING,  /**< The typing state was updated. */
    1.75 -	PURPLE_CONV_UPDATE_UNSEEN,  /**< The unseen state was updated. */
    1.76 -	PURPLE_CONV_UPDATE_LOGGING, /**< Logging for this conversation was
    1.77 -	                               enabled or disabled. */
    1.78 -	PURPLE_CONV_UPDATE_TOPIC,   /**< The topic for a chat was updated. */
    1.79 -	/*
    1.80 -	 * XXX These need to go when we implement a more generic core/UI event
    1.81 -	 * system.
    1.82 -	 */
    1.83 -	PURPLE_CONV_ACCOUNT_ONLINE,  /**< One of the user's accounts went online.  */
    1.84 -	PURPLE_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */
    1.85 -	PURPLE_CONV_UPDATE_AWAY,     /**< The other user went away.                */
    1.86 -	PURPLE_CONV_UPDATE_ICON,     /**< The other user's buddy icon changed.     */
    1.87 -	PURPLE_CONV_UPDATE_TITLE,
    1.88 -	PURPLE_CONV_UPDATE_CHATLEFT,
    1.89 -
    1.90 -	PURPLE_CONV_UPDATE_FEATURES  /**< The features for a chat have changed */
    1.91 -
    1.92 -} PurpleConvUpdateType;
    1.93 -
    1.94 -/**
    1.95 - * The typing state of a user.
    1.96 - */
    1.97 -typedef enum
    1.98 -{
    1.99 -	PURPLE_NOT_TYPING = 0,  /**< Not typing.                 */
   1.100 -	PURPLE_TYPING,          /**< Currently typing.           */
   1.101 -	PURPLE_TYPED            /**< Stopped typing momentarily. */
   1.102 -
   1.103 -} PurpleTypingState;
   1.104 -
   1.105 -/**
   1.106 - * Flags applicable to a message. Most will have send, recv or system.
   1.107 - */
   1.108 -typedef enum
   1.109 -{
   1.110 -	PURPLE_MESSAGE_SEND        = 0x0001, /**< Outgoing message.        */
   1.111 -	PURPLE_MESSAGE_RECV        = 0x0002, /**< Incoming message.        */
   1.112 -	PURPLE_MESSAGE_SYSTEM      = 0x0004, /**< System message.          */
   1.113 -	PURPLE_MESSAGE_AUTO_RESP   = 0x0008, /**< Auto response.           */
   1.114 -	PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010,  /**< Hint to the UI that this
   1.115 -	                                        message should not be
   1.116 -	                                        shown in conversations
   1.117 -	                                        which are only open for
   1.118 -	                                        internal UI purposes
   1.119 -	                                        (e.g. for contact-aware
   1.120 -	                                         conversations).           */
   1.121 -	PURPLE_MESSAGE_NICK        = 0x0020, /**< Contains your nick.      */
   1.122 -	PURPLE_MESSAGE_NO_LOG      = 0x0040, /**< Do not log.              */
   1.123 -	PURPLE_MESSAGE_WHISPER     = 0x0080, /**< Whispered message.       */
   1.124 -	PURPLE_MESSAGE_ERROR       = 0x0200, /**< Error message.           */
   1.125 -	PURPLE_MESSAGE_DELAYED     = 0x0400, /**< Delayed message.         */
   1.126 -	PURPLE_MESSAGE_RAW         = 0x0800, /**< "Raw" message - don't
   1.127 -	                                        apply formatting         */
   1.128 -	PURPLE_MESSAGE_IMAGES      = 0x1000, /**< Message contains images  */
   1.129 -	PURPLE_MESSAGE_NOTIFY      = 0x2000, /**< Message is a notification */
   1.130 -	PURPLE_MESSAGE_NO_LINKIFY  = 0x4000, /**< Message should not be auto-
   1.131 -										   linkified @since 2.1.0 */
   1.132 -	PURPLE_MESSAGE_INVISIBLE   = 0x8000  /**< Message should not be displayed */
   1.133 -} PurpleMessageFlags;
   1.134 -
   1.135 -/**
   1.136 - * Flags applicable to users in Chats.
   1.137 - */
   1.138 -typedef enum
   1.139 -{
   1.140 -	PURPLE_CBFLAGS_NONE          = 0x0000, /**< No flags                     */
   1.141 -	PURPLE_CBFLAGS_VOICE         = 0x0001, /**< Voiced user or "Participant" */
   1.142 -	PURPLE_CBFLAGS_HALFOP        = 0x0002, /**< Half-op                      */
   1.143 -	PURPLE_CBFLAGS_OP            = 0x0004, /**< Channel Op or Moderator      */
   1.144 -	PURPLE_CBFLAGS_FOUNDER       = 0x0008, /**< Channel Founder              */
   1.145 -	PURPLE_CBFLAGS_TYPING        = 0x0010  /**< Currently typing             */
   1.146 -
   1.147 -} PurpleConvChatBuddyFlags;
   1.148 -
   1.149 -#include "account.h"
   1.150 -#include "buddyicon.h"
   1.151 -#include "log.h"
   1.152 -#include "server.h"
   1.153 -
   1.154 -/**
   1.155 - * Conversation operations and events.
   1.156 - *
   1.157 - * Any UI representing a conversation must assign a filled-out
   1.158 - * PurpleConversationUiOps structure to the PurpleConversation.
   1.159 - */
   1.160 -struct _PurpleConversationUiOps
   1.161 -{
   1.162 -	/** Called when @a conv is created (but before the @ref
   1.163 -	 *  conversation-created signal is emitted).
   1.164 -	 */
   1.165 -	void (*create_conversation)(PurpleConversation *conv);
   1.166 -
   1.167 -	/** Called just before @a conv is freed. */
   1.168 -	void (*destroy_conversation)(PurpleConversation *conv);
   1.169 -	/** Write a message to a chat.  If this field is @c NULL, libpurple will
   1.170 -	 *  fall back to using #write_conv.
   1.171 -	 *  @see purple_conv_chat_write()
   1.172 -	 */
   1.173 -	void (*write_chat)(PurpleConversation *conv, const char *who,
   1.174 -	                   const char *message, PurpleMessageFlags flags,
   1.175 -	                   time_t mtime);
   1.176 -	/** Write a message to an IM conversation.  If this field is @c NULL,
   1.177 -	 *  libpurple will fall back to using #write_conv.
   1.178 -	 *  @see purple_conv_im_write()
   1.179 -	 */
   1.180 -	void (*write_im)(PurpleConversation *conv, const char *who,
   1.181 -	                 const char *message, PurpleMessageFlags flags,
   1.182 -	                 time_t mtime);
   1.183 -	/** Write a message to a conversation.  This is used rather than the
   1.184 -	 *  chat- or im-specific ops for errors, system messages (such as "x is
   1.185 -	 *  now know as y"), and as the fallback if #write_im and #write_chat
   1.186 -	 *  are not implemented.  It should be implemented, or the UI will miss
   1.187 -	 *  conversation error messages and your users will hate you.
   1.188 -	 *
   1.189 -	 *  @see purple_conversation_write()
   1.190 -	 */
   1.191 -	void (*write_conv)(PurpleConversation *conv,
   1.192 -	                   const char *name,
   1.193 -	                   const char *alias,
   1.194 -	                   const char *message,
   1.195 -	                   PurpleMessageFlags flags,
   1.196 -	                   time_t mtime);
   1.197 -
   1.198 -	/** Add @a cbuddies to a chat.
   1.199 -	 *  @param cbuddies      A @c GList of #PurpleConvChatBuddy structs.
   1.200 -	 *  @param new_arrivals  Whether join notices should be shown.
   1.201 -	 *                       (Join notices are actually written to the
   1.202 -	 *                       conversation by #purple_conv_chat_add_users().)
   1.203 -	 */
   1.204 -	void (*chat_add_users)(PurpleConversation *conv,
   1.205 -	                       GList *cbuddies,
   1.206 -	                       gboolean new_arrivals);
   1.207 -	/** Rename the user in this chat named @a old_name to @a new_name.  (The
   1.208 -	 *  rename message is written to the conversation by libpurple.)
   1.209 -	 *  @param new_alias  @a new_name's new alias, if they have one.
   1.210 -	 *  @see purple_conv_chat_add_users()
   1.211 -	 */
   1.212 -	void (*chat_rename_user)(PurpleConversation *conv, const char *old_name,
   1.213 -	                         const char *new_name, const char *new_alias);
   1.214 -	/** Remove @a users from a chat.
   1.215 -	 *  @param users    A @c GList of <tt>const char *</tt>s.
   1.216 -	 *  @see purple_conv_chat_rename_user()
   1.217 -	 */
   1.218 -	void (*chat_remove_users)(PurpleConversation *conv, GList *users);
   1.219 -	/** Called when a user's flags are changed.
   1.220 -	 *  @see purple_conv_chat_user_set_flags()
   1.221 -	 */
   1.222 -	void (*chat_update_user)(PurpleConversation *conv, const char *user);
   1.223 -
   1.224 -	/** Present this conversation to the user; for example, by displaying
   1.225 -	 *  the IM dialog.
   1.226 -	 */
   1.227 -	void (*present)(PurpleConversation *conv);
   1.228 -
   1.229 -	/** If this UI has a concept of focus (as in a windowing system) and
   1.230 -	 *  this conversation has the focus, return @c TRUE; otherwise, return
   1.231 -	 *  @c FALSE.
   1.232 -	 */
   1.233 -	gboolean (*has_focus)(PurpleConversation *conv);
   1.234 -
   1.235 -	/* Custom Smileys */
   1.236 -	gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote);
   1.237 -	void (*custom_smiley_write)(PurpleConversation *conv, const char *smile,
   1.238 -	                            const guchar *data, gsize size);
   1.239 -	void (*custom_smiley_close)(PurpleConversation *conv, const char *smile);
   1.240 -
   1.241 -	/** Prompt the user for confirmation to send @a message.  This function
   1.242 -	 *  should arrange for the message to be sent if the user accepts.  If
   1.243 -	 *  this field is @c NULL, libpurple will fall back to using
   1.244 -	 *  #purple_request_action().
   1.245 -	 */
   1.246 -	void (*send_confirm)(PurpleConversation *conv, const char *message);
   1.247 -
   1.248 -	void (*_purple_reserved1)(void);
   1.249 -	void (*_purple_reserved2)(void);
   1.250 -	void (*_purple_reserved3)(void);
   1.251 -	void (*_purple_reserved4)(void);
   1.252 -};
   1.253 -
   1.254 -/**
   1.255 - * Data specific to Instant Messages.
   1.256 - */
   1.257 -struct _PurpleConvIm
   1.258 -{
   1.259 -	PurpleConversation *conv;            /**< The parent conversation.     */
   1.260 -
   1.261 -	PurpleTypingState typing_state;      /**< The current typing state.    */
   1.262 -	guint  typing_timeout;             /**< The typing timer handle.     */
   1.263 -	time_t type_again;                 /**< The type again time.         */
   1.264 -	guint  send_typed_timeout;         /**< The type again timer handle. */
   1.265 -
   1.266 -	PurpleBuddyIcon *icon;               /**< The buddy icon.              */
   1.267 -};
   1.268 -
   1.269 -/**
   1.270 - * Data specific to Chats.
   1.271 - */
   1.272 -struct _PurpleConvChat
   1.273 -{
   1.274 -	PurpleConversation *conv;          /**< The parent conversation.      */
   1.275 -
   1.276 -	GList *in_room;                  /**< The users in the room.        */
   1.277 -	GList *ignored;                  /**< Ignored users.                */
   1.278 -	char  *who;                      /**< The person who set the topic. */
   1.279 -	char  *topic;                    /**< The topic.                    */
   1.280 -	int    id;                       /**< The chat ID.                  */
   1.281 -	char *nick;                      /**< Your nick in this chat.       */
   1.282 -
   1.283 -	gboolean left;                   /**< We left the chat and kept the window open */
   1.284 -};
   1.285 -
   1.286 -/**
   1.287 - * Data for "Chat Buddies"
   1.288 - */
   1.289 -struct _PurpleConvChatBuddy
   1.290 -{
   1.291 -	char *name;                      /**< The chat participant's name in the chat. */
   1.292 -	char *alias;                     /**< The chat participant's alias, if known;
   1.293 -	                                  *   @a NULL otherwise.
   1.294 -	                                  */
   1.295 -	char *alias_key;                 /**< A string by which this buddy will be sorted,
   1.296 -	                                  *   or @c NULL if the buddy should be sorted by
   1.297 -	                                  *   its @c name.  (This is currently always @c
   1.298 -	                                  *   NULL.)
   1.299 -	                                  */
   1.300 -	gboolean buddy;                  /**< @a TRUE if this chat participant is on the
   1.301 -	                                  *   buddy list; @a FALSE otherwise.
   1.302 -	                                  */
   1.303 -	PurpleConvChatBuddyFlags flags;  /**< A bitwise OR of flags for this participant,
   1.304 -	                                  *   such as whether they are a channel operator.
   1.305 -	                                  */
   1.306 -};
   1.307 -
   1.308 -/**
   1.309 - * Description of a conversation message
   1.310 - *
   1.311 - * @since 2.2.0
   1.312 - */
   1.313 -struct _PurpleConvMessage
   1.314 -{
   1.315 -	char *who;
   1.316 -	char *what;
   1.317 -	PurpleMessageFlags flags;
   1.318 -	time_t when;
   1.319 -	PurpleConversation *conv;  /**< @since 2.3.0 */
   1.320 -	char *alias;               /**< @since 2.3.0 */
   1.321 -};
   1.322 -
   1.323 -/**
   1.324 - * A core representation of a conversation between two or more people.
   1.325 - *
   1.326 - * The conversation can be an IM or a chat.
   1.327 - */
   1.328 -struct _PurpleConversation
   1.329 -{
   1.330 -	PurpleConversationType type;  /**< The type of conversation.          */
   1.331 -
   1.332 -	PurpleAccount *account;       /**< The user using this conversation.  */
   1.333 -
   1.334 -
   1.335 -	char *name;                 /**< The name of the conversation.      */
   1.336 -	char *title;                /**< The window title.                  */
   1.337 -
   1.338 -	gboolean logging;           /**< The status of logging.             */
   1.339 -
   1.340 -	GList *logs;                /**< This conversation's logs           */
   1.341 -
   1.342 -	union
   1.343 -	{
   1.344 -		PurpleConvIm   *im;       /**< IM-specific data.                  */
   1.345 -		PurpleConvChat *chat;     /**< Chat-specific data.                */
   1.346 -		void *misc;             /**< Misc. data.                        */
   1.347 -
   1.348 -	} u;
   1.349 -
   1.350 -	PurpleConversationUiOps *ui_ops;           /**< UI-specific operations. */
   1.351 -	void *ui_data;                           /**< UI-specific data.       */
   1.352 -
   1.353 -	GHashTable *data;                        /**< Plugin-specific data.   */
   1.354 -
   1.355 -	PurpleConnectionFlags features; /**< The supported features */
   1.356 -	GList *message_history;         /**< Message history, as a GList of PurpleConvMessage's */
   1.357 -};
   1.358 -
   1.359 -#ifdef __cplusplus
   1.360 -extern "C" {
   1.361 -#endif
   1.362 -
   1.363 -/**************************************************************************/
   1.364 -/** @name Conversation API                                                */
   1.365 -/**************************************************************************/
   1.366 -/*@{*/
   1.367 -
   1.368 -/**
   1.369 - * Creates a new conversation of the specified type.
   1.370 - *
   1.371 - * @param type    The type of conversation.
   1.372 - * @param account The account opening the conversation window on the purple
   1.373 - *                user's end.
   1.374 - * @param name    The name of the conversation.
   1.375 - *
   1.376 - * @return The new conversation.
   1.377 - */
   1.378 -PurpleConversation *purple_conversation_new(PurpleConversationType type,
   1.379 -										PurpleAccount *account,
   1.380 -										const char *name);
   1.381 -
   1.382 -/**
   1.383 - * Destroys the specified conversation and removes it from the parent
   1.384 - * window.
   1.385 - *
   1.386 - * If this conversation is the only one contained in the parent window,
   1.387 - * that window is also destroyed.
   1.388 - *
   1.389 - * @param conv The conversation to destroy.
   1.390 - */
   1.391 -void purple_conversation_destroy(PurpleConversation *conv);
   1.392 -
   1.393 -
   1.394 -/**
   1.395 - * Present a conversation to the user. This allows core code to initiate a
   1.396 - * conversation by displaying the IM dialog.
   1.397 - * @param conv The conversation to present
   1.398 - */
   1.399 -void purple_conversation_present(PurpleConversation *conv);
   1.400 -
   1.401 -
   1.402 -/**
   1.403 - * Returns the specified conversation's type.
   1.404 - *
   1.405 - * @param conv The conversation.
   1.406 - *
   1.407 - * @return The conversation's type.
   1.408 - */
   1.409 -PurpleConversationType purple_conversation_get_type(const PurpleConversation *conv);
   1.410 -
   1.411 -/**
   1.412 - * Sets the specified conversation's UI operations structure.
   1.413 - *
   1.414 - * @param conv The conversation.
   1.415 - * @param ops  The UI conversation operations structure.
   1.416 - */
   1.417 -void purple_conversation_set_ui_ops(PurpleConversation *conv,
   1.418 -								  PurpleConversationUiOps *ops);
   1.419 -
   1.420 -/**
   1.421 - * Sets the default conversation UI operations structure.
   1.422 - *
   1.423 - * @param ops  The UI conversation operations structure.
   1.424 - */
   1.425 -void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
   1.426 -
   1.427 -/**
   1.428 - * Returns the specified conversation's UI operations structure.
   1.429 - *
   1.430 - * @param conv The conversation.
   1.431 - *
   1.432 - * @return The operations structure.
   1.433 - */
   1.434 -PurpleConversationUiOps *purple_conversation_get_ui_ops(
   1.435 -		const PurpleConversation *conv);
   1.436 -
   1.437 -/**
   1.438 - * Sets the specified conversation's purple_account.
   1.439 - *
   1.440 - * This purple_account represents the user using purple, not the person the user
   1.441 - * is having a conversation/chat/flame with.
   1.442 - *
   1.443 - * @param conv The conversation.
   1.444 - * @param account The purple_account.
   1.445 - */
   1.446 -void purple_conversation_set_account(PurpleConversation *conv,
   1.447 -                                   PurpleAccount *account);
   1.448 -
   1.449 -/**
   1.450 - * Returns the specified conversation's purple_account.
   1.451 - *
   1.452 - * This purple_account represents the user using purple, not the person the user
   1.453 - * is having a conversation/chat/flame with.
   1.454 - *
   1.455 - * @param conv The conversation.
   1.456 - *
   1.457 - * @return The conversation's purple_account.
   1.458 - */
   1.459 -PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv);
   1.460 -
   1.461 -/**
   1.462 - * Returns the specified conversation's purple_connection.
   1.463 - *
   1.464 - * This is the same as purple_conversation_get_user(conv)->gc.
   1.465 - *
   1.466 - * @param conv The conversation.
   1.467 - *
   1.468 - * @return The conversation's purple_connection.
   1.469 - */
   1.470 -PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv);
   1.471 -
   1.472 -/**
   1.473 - * Sets the specified conversation's title.
   1.474 - *
   1.475 - * @param conv  The conversation.
   1.476 - * @param title The title.
   1.477 - */
   1.478 -void purple_conversation_set_title(PurpleConversation *conv, const char *title);
   1.479 -
   1.480 -/**
   1.481 - * Returns the specified conversation's title.
   1.482 - *
   1.483 - * @param conv The conversation.
   1.484 - *
   1.485 - * @return The title.
   1.486 - */
   1.487 -const char *purple_conversation_get_title(const PurpleConversation *conv);
   1.488 -
   1.489 -/**
   1.490 - * Automatically sets the specified conversation's title.
   1.491 - *
   1.492 - * This function takes OPT_IM_ALIAS_TAB into account, as well as the
   1.493 - * user's alias.
   1.494 - *
   1.495 - * @param conv The conversation.
   1.496 - */
   1.497 -void purple_conversation_autoset_title(PurpleConversation *conv);
   1.498 -
   1.499 -/**
   1.500 - * Sets the specified conversation's name.
   1.501 - *
   1.502 - * @param conv The conversation.
   1.503 - * @param name The conversation's name.
   1.504 - */
   1.505 -void purple_conversation_set_name(PurpleConversation *conv, const char *name);
   1.506 -
   1.507 -/**
   1.508 - * Returns the specified conversation's name.
   1.509 - *
   1.510 - * @param conv The conversation.
   1.511 - *
   1.512 - * @return The conversation's name. If the conversation is an IM with a PurpleBuddy,
   1.513 - *         then it's the name of the PurpleBuddy.
   1.514 - */
   1.515 -const char *purple_conversation_get_name(const PurpleConversation *conv);
   1.516 -
   1.517 -/**
   1.518 - * Enables or disables logging for this conversation.
   1.519 - *
   1.520 - * @param conv The conversation.
   1.521 - * @param log  @c TRUE if logging should be enabled, or @c FALSE otherwise.
   1.522 - */
   1.523 -void purple_conversation_set_logging(PurpleConversation *conv, gboolean log);
   1.524 -
   1.525 -/**
   1.526 - * Returns whether or not logging is enabled for this conversation.
   1.527 - *
   1.528 - * @param conv The conversation.
   1.529 - *
   1.530 - * @return @c TRUE if logging is enabled, or @c FALSE otherwise.
   1.531 - */
   1.532 -gboolean purple_conversation_is_logging(const PurpleConversation *conv);
   1.533 -
   1.534 -/**
   1.535 - * Closes any open logs for this conversation.
   1.536 - *
   1.537 - * Note that new logs will be opened as necessary (e.g. upon receipt of a
   1.538 - * message, if the conversation has logging enabled. To disable logging for
   1.539 - * the remainder of the conversation, use purple_conversation_set_logging().
   1.540 - *
   1.541 - * @param conv The conversation.
   1.542 - */
   1.543 -void purple_conversation_close_logs(PurpleConversation *conv);
   1.544 -
   1.545 -/**
   1.546 - * Returns the specified conversation's IM-specific data.
   1.547 - *
   1.548 - * If the conversation type is not PURPLE_CONV_TYPE_IM, this will return @c NULL.
   1.549 - *
   1.550 - * @param conv The conversation.
   1.551 - *
   1.552 - * @return The IM-specific data.
   1.553 - */
   1.554 -PurpleConvIm *purple_conversation_get_im_data(const PurpleConversation *conv);
   1.555 -
   1.556 -#define PURPLE_CONV_IM(c) (purple_conversation_get_im_data(c))
   1.557 -
   1.558 -/**
   1.559 - * Returns the specified conversation's chat-specific data.
   1.560 - *
   1.561 - * If the conversation type is not PURPLE_CONV_TYPE_CHAT, this will return @c NULL.
   1.562 - *
   1.563 - * @param conv The conversation.
   1.564 - *
   1.565 - * @return The chat-specific data.
   1.566 - */
   1.567 -PurpleConvChat *purple_conversation_get_chat_data(const PurpleConversation *conv);
   1.568 -
   1.569 -#define PURPLE_CONV_CHAT(c) (purple_conversation_get_chat_data(c))
   1.570 -
   1.571 -/**
   1.572 - * Sets extra data for a conversation.
   1.573 - *
   1.574 - * @param conv The conversation.
   1.575 - * @param key  The unique key.
   1.576 - * @param data The data to assign.
   1.577 - */
   1.578 -void purple_conversation_set_data(PurpleConversation *conv, const char *key,
   1.579 -								gpointer data);
   1.580 -
   1.581 -/**
   1.582 - * Returns extra data in a conversation.
   1.583 - *
   1.584 - * @param conv The conversation.
   1.585 - * @param key  The unqiue key.
   1.586 - *
   1.587 - * @return The data associated with the key.
   1.588 - */
   1.589 -gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key);
   1.590 -
   1.591 -/**
   1.592 - * Returns a list of all conversations.
   1.593 - *
   1.594 - * This list includes both IMs and chats.
   1.595 - *
   1.596 - * @constreturn A GList of all conversations.
   1.597 - */
   1.598 -GList *purple_get_conversations(void);
   1.599 -
   1.600 -/**
   1.601 - * Returns a list of all IMs.
   1.602 - *
   1.603 - * @constreturn A GList of all IMs.
   1.604 - */
   1.605 -GList *purple_get_ims(void);
   1.606 -
   1.607 -/**
   1.608 - * Returns a list of all chats.
   1.609 - *
   1.610 - * @constreturn A GList of all chats.
   1.611 - */
   1.612 -GList *purple_get_chats(void);
   1.613 -
   1.614 -/**
   1.615 - * Finds a conversation with the specified type, name, and Purple account.
   1.616 - *
   1.617 - * @param type The type of the conversation.
   1.618 - * @param name The name of the conversation.
   1.619 - * @param account The purple_account associated with the conversation.
   1.620 - *
   1.621 - * @return The conversation if found, or @c NULL otherwise.
   1.622 - */
   1.623 -PurpleConversation *purple_find_conversation_with_account(
   1.624 -		PurpleConversationType type, const char *name,
   1.625 -		const PurpleAccount *account);
   1.626 -
   1.627 -/**
   1.628 - * Writes to a conversation window.
   1.629 - *
   1.630 - * This function should not be used to write IM or chat messages. Use
   1.631 - * purple_conv_im_write() and purple_conv_chat_write() instead. Those functions will
   1.632 - * most likely call this anyway, but they may do their own formatting,
   1.633 - * sound playback, etc.
   1.634 - *
   1.635 - * This can be used to write generic messages, such as "so and so closed
   1.636 - * the conversation window."
   1.637 - *
   1.638 - * @param conv    The conversation.
   1.639 - * @param who     The user who sent the message.
   1.640 - * @param message The message.
   1.641 - * @param flags   The message flags.
   1.642 - * @param mtime   The time the message was sent.
   1.643 - *
   1.644 - * @see purple_conv_im_write()
   1.645 - * @see purple_conv_chat_write()
   1.646 - */
   1.647 -void purple_conversation_write(PurpleConversation *conv, const char *who,
   1.648 -		const char *message, PurpleMessageFlags flags,
   1.649 -		time_t mtime);
   1.650 -
   1.651 -
   1.652 -/**
   1.653 -	Set the features as supported for the given conversation.
   1.654 -	@param conv      The conversation
   1.655 -	@param features  Bitset defining supported features
   1.656 -*/
   1.657 -void purple_conversation_set_features(PurpleConversation *conv,
   1.658 -		PurpleConnectionFlags features);
   1.659 -
   1.660 -
   1.661 -/**
   1.662 -	Get the features supported by the given conversation.
   1.663 -	@param conv  The conversation
   1.664 -*/
   1.665 -PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv);
   1.666 -
   1.667 -/**
   1.668 - * Determines if a conversation has focus
   1.669 - *
   1.670 - * @param conv    The conversation.
   1.671 - *
   1.672 - * @return @c TRUE if the conversation has focus, @c FALSE if
   1.673 - * it does not or the UI does not have a concept of conversation focus
   1.674 - */
   1.675 -gboolean purple_conversation_has_focus(PurpleConversation *conv);
   1.676 -
   1.677 -/**
   1.678 - * Updates the visual status and UI of a conversation.
   1.679 - *
   1.680 - * @param conv The conversation.
   1.681 - * @param type The update type.
   1.682 - */
   1.683 -void purple_conversation_update(PurpleConversation *conv, PurpleConvUpdateType type);
   1.684 -
   1.685 -/**
   1.686 - * Calls a function on each conversation.
   1.687 - *
   1.688 - * @param func The function.
   1.689 - */
   1.690 -void purple_conversation_foreach(void (*func)(PurpleConversation *conv));
   1.691 -
   1.692 -/**
   1.693 - * Retrieve the message history of a conversation.
   1.694 - *
   1.695 - * @param conv   The conversation
   1.696 - *
   1.697 - * @return  A GList of PurpleConvMessage's. The must not modify the list or the data within.
   1.698 - *          The list contains the newest message at the beginning, and the oldest message at
   1.699 - *          the end.
   1.700 - *
   1.701 - * @since 2.2.0
   1.702 - */
   1.703 -GList *purple_conversation_get_message_history(PurpleConversation *conv);
   1.704 -
   1.705 -/**
   1.706 - * Clear the message history of a conversation.
   1.707 - *
   1.708 - * @param conv  The conversation
   1.709 - *
   1.710 - * @since 2.2.0
   1.711 - */
   1.712 -void purple_conversation_clear_message_history(PurpleConversation *conv);
   1.713 -
   1.714 -/**
   1.715 - * Get the sender from a PurpleConvMessage
   1.716 - *
   1.717 - * @param msg   A PurpleConvMessage
   1.718 - *
   1.719 - * @return   The name of the sender of the message
   1.720 - *
   1.721 - * @since 2.2.0
   1.722 - */
   1.723 -const char *purple_conversation_message_get_sender(PurpleConvMessage *msg);
   1.724 -
   1.725 -/**
   1.726 - * Get the message from a PurpleConvMessage
   1.727 - *
   1.728 - * @param msg   A PurpleConvMessage
   1.729 - *
   1.730 - * @return   The name of the sender of the message
   1.731 - *
   1.732 - * @since 2.2.0
   1.733 - */
   1.734 -const char *purple_conversation_message_get_message(PurpleConvMessage *msg);
   1.735 -
   1.736 -/**
   1.737 - * Get the message-flags of a PurpleConvMessage
   1.738 - *
   1.739 - * @param msg   A PurpleConvMessage
   1.740 - *
   1.741 - * @return   The message flags
   1.742 - *
   1.743 - * @since 2.2.0
   1.744 - */
   1.745 -PurpleMessageFlags purple_conversation_message_get_flags(PurpleConvMessage *msg);
   1.746 -
   1.747 -/**
   1.748 - * Get the timestamp of a PurpleConvMessage
   1.749 - *
   1.750 - * @param msg   A PurpleConvMessage
   1.751 - *
   1.752 - * @return   The timestamp of the message
   1.753 - *
   1.754 - * @since 2.2.0
   1.755 - */
   1.756 -time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg);
   1.757 -
   1.758 -/*@}*/
   1.759 -
   1.760 -
   1.761 -/**************************************************************************/
   1.762 -/** @name IM Conversation API                                             */
   1.763 -/**************************************************************************/
   1.764 -/*@{*/
   1.765 -
   1.766 -/**
   1.767 - * Gets an IM's parent conversation.
   1.768 - *
   1.769 - * @param im The IM.
   1.770 - *
   1.771 - * @return The parent conversation.
   1.772 - */
   1.773 -PurpleConversation *purple_conv_im_get_conversation(const PurpleConvIm *im);
   1.774 -
   1.775 -/**
   1.776 - * Sets the IM's buddy icon.
   1.777 - *
   1.778 - * This should only be called from within Purple. You probably want to
   1.779 - * call purple_buddy_icon_set_data().
   1.780 - *
   1.781 - * @param im   The IM.
   1.782 - * @param icon The buddy icon.
   1.783 - *
   1.784 - * @see purple_buddy_icon_set_data()
   1.785 - */
   1.786 -void purple_conv_im_set_icon(PurpleConvIm *im, PurpleBuddyIcon *icon);
   1.787 -
   1.788 -/**
   1.789 - * Returns the IM's buddy icon.
   1.790 - *
   1.791 - * @param im The IM.
   1.792 - *
   1.793 - * @return The buddy icon.
   1.794 - */
   1.795 -PurpleBuddyIcon *purple_conv_im_get_icon(const PurpleConvIm *im);
   1.796 -
   1.797 -/**
   1.798 - * Sets the IM's typing state.
   1.799 - *
   1.800 - * @param im    The IM.
   1.801 - * @param state The typing state.
   1.802 - */
   1.803 -void purple_conv_im_set_typing_state(PurpleConvIm *im, PurpleTypingState state);
   1.804 -
   1.805 -/**
   1.806 - * Returns the IM's typing state.
   1.807 - *
   1.808 - * @param im The IM.
   1.809 - *
   1.810 - * @return The IM's typing state.
   1.811 - */
   1.812 -PurpleTypingState purple_conv_im_get_typing_state(const PurpleConvIm *im);
   1.813 -
   1.814 -/**
   1.815 - * Starts the IM's typing timeout.
   1.816 - *
   1.817 - * @param im      The IM.
   1.818 - * @param timeout The timeout.
   1.819 - */
   1.820 -void purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout);
   1.821 -
   1.822 -/**
   1.823 - * Stops the IM's typing timeout.
   1.824 - *
   1.825 - * @param im The IM.
   1.826 - */
   1.827 -void purple_conv_im_stop_typing_timeout(PurpleConvIm *im);
   1.828 -
   1.829 -/**
   1.830 - * Returns the IM's typing timeout.
   1.831 - *
   1.832 - * @param im The IM.
   1.833 - *
   1.834 - * @return The timeout.
   1.835 - */
   1.836 -guint purple_conv_im_get_typing_timeout(const PurpleConvIm *im);
   1.837 -
   1.838 -/**
   1.839 - * Sets the quiet-time when no PURPLE_TYPING messages will be sent.
   1.840 - * Few protocols need this (maybe only MSN).  If the user is still
   1.841 - * typing after this quiet-period, then another PURPLE_TYPING message
   1.842 - * will be sent.
   1.843 - *
   1.844 - * @param im  The IM.
   1.845 - * @param val The number of seconds to wait before allowing another
   1.846 - *            PURPLE_TYPING message to be sent to the user.  Or 0 to
   1.847 - *            not send another PURPLE_TYPING message.
   1.848 - */
   1.849 -void purple_conv_im_set_type_again(PurpleConvIm *im, unsigned int val);
   1.850 -
   1.851 -/**
   1.852 - * Returns the time after which another PURPLE_TYPING message should be sent.
   1.853 - *
   1.854 - * @param im The IM.
   1.855 - *
   1.856 - * @return The time in seconds since the epoch.  Or 0 if no additional
   1.857 - *         PURPLE_TYPING message should be sent.
   1.858 - */
   1.859 -time_t purple_conv_im_get_type_again(const PurpleConvIm *im);
   1.860 -
   1.861 -/**
   1.862 - * Starts the IM's type again timeout.
   1.863 - *
   1.864 - * @param im      The IM.
   1.865 - */
   1.866 -void purple_conv_im_start_send_typed_timeout(PurpleConvIm *im);
   1.867 -
   1.868 -/**
   1.869 - * Stops the IM's type again timeout.
   1.870 - *
   1.871 - * @param im The IM.
   1.872 - */
   1.873 -void purple_conv_im_stop_send_typed_timeout(PurpleConvIm *im);
   1.874 -
   1.875 -/**
   1.876 - * Returns the IM's type again timeout interval.
   1.877 - *
   1.878 - * @param im The IM.
   1.879 - *
   1.880 - * @return The type again timeout interval.
   1.881 - */
   1.882 -guint purple_conv_im_get_send_typed_timeout(const PurpleConvIm *im);
   1.883 -
   1.884 -/**
   1.885 - * Updates the visual typing notification for an IM conversation.
   1.886 - *
   1.887 - * @param im The IM.
   1.888 - */
   1.889 -void purple_conv_im_update_typing(PurpleConvIm *im);
   1.890 -
   1.891 -/**
   1.892 - * Writes to an IM.
   1.893 - *
   1.894 - * @param im      The IM.
   1.895 - * @param who     The user who sent the message.
   1.896 - * @param message The message to write.
   1.897 - * @param flags   The message flags.
   1.898 - * @param mtime   The time the message was sent.
   1.899 - */
   1.900 -void purple_conv_im_write(PurpleConvIm *im, const char *who,
   1.901 -						const char *message, PurpleMessageFlags flags,
   1.902 -						time_t mtime);
   1.903 -
   1.904 -/**
   1.905 - * Presents an IM-error to the user
   1.906 - *
   1.907 - * This is a helper function to find a conversation, write an error to it, and
   1.908 - * raise the window.  If a conversation with this user doesn't already exist,
   1.909 - * the function will return FALSE and the calling function can attempt to present
   1.910 - * the error another way (purple_notify_error, most likely)
   1.911 - *
   1.912 - * @param who     The user this error is about
   1.913 - * @param account The account this error is on
   1.914 - * @param what    The error
   1.915 - * @return        TRUE if the error was presented, else FALSE
   1.916 - */
   1.917 -gboolean purple_conv_present_error(const char *who, PurpleAccount *account, const char *what);
   1.918 -
   1.919 -/**
   1.920 - * Sends a message to this IM conversation.
   1.921 - *
   1.922 - * @param im      The IM.
   1.923 - * @param message The message to send.
   1.924 - */
   1.925 -void purple_conv_im_send(PurpleConvIm *im, const char *message);
   1.926 -
   1.927 -/**
   1.928 - * Sends a message to a conversation after confirming with
   1.929 - * the user.
   1.930 - *
   1.931 - * This function is intended for use in cases where the user
   1.932 - * hasn't explicitly and knowingly caused a message to be sent.
   1.933 - * The confirmation ensures that the user isn't sending a
   1.934 - * message by mistake.
   1.935 - *
   1.936 - * @param conv    The conversation.
   1.937 - * @param message The message to send.
   1.938 - */
   1.939 -void purple_conv_send_confirm(PurpleConversation *conv, const char *message);
   1.940 -
   1.941 -/**
   1.942 - * Sends a message to this IM conversation with specified flags.
   1.943 - *
   1.944 - * @param im      The IM.
   1.945 - * @param message The message to send.
   1.946 - * @param flags   The PurpleMessageFlags flags to use in addition to PURPLE_MESSAGE_SEND.
   1.947 - */
   1.948 -void purple_conv_im_send_with_flags(PurpleConvIm *im, const char *message, PurpleMessageFlags flags);
   1.949 -
   1.950 -/**
   1.951 - * Adds a smiley to the conversation's smiley tree. If this returns
   1.952 - * @c TRUE you should call purple_conv_custom_smiley_write() one or more
   1.953 - * times, and then purple_conv_custom_smiley_close(). If this returns
   1.954 - * @c FALSE, either the conv or smile were invalid, or the icon was
   1.955 - * found in the cache. In either case, calling write or close would
   1.956 - * be an error.
   1.957 - *
   1.958 - * @param conv The conversation to associate the smiley with.
   1.959 - * @param smile The text associated with the smiley
   1.960 - * @param cksum_type The type of checksum.
   1.961 - * @param chksum The checksum, as a NUL terminated base64 string.
   1.962 - * @param remote @c TRUE if the custom smiley is set by the remote user (buddy).
   1.963 - * @return      @c TRUE if an icon is expected, else FALSE. Note that
   1.964 - *              it is an error to never call purple_conv_custom_smiley_close if
   1.965 - *              this function returns @c TRUE, but an error to call it if
   1.966 - *              @c FALSE is returned.
   1.967 - */
   1.968 -
   1.969 -gboolean purple_conv_custom_smiley_add(PurpleConversation *conv, const char *smile,
   1.970 -                                      const char *cksum_type, const char *chksum,
   1.971 -									  gboolean remote);
   1.972 -
   1.973 -
   1.974 -/**
   1.975 - * Updates the image associated with the current smiley.
   1.976 - *
   1.977 - * @param conv The conversation associated with the smiley.
   1.978 - * @param smile The text associated with the smiley.
   1.979 - * @param data The actual image data.
   1.980 - * @param size The length of the data.
   1.981 - */
   1.982 -
   1.983 -void purple_conv_custom_smiley_write(PurpleConversation *conv,
   1.984 -                                   const char *smile,
   1.985 -                                   const guchar *data,
   1.986 -                                   gsize size);
   1.987 -
   1.988 -/**
   1.989 - * Close the custom smiley, all data has been written with
   1.990 - * purple_conv_custom_smiley_write, and it is no longer valid
   1.991 - * to call that function on that smiley.
   1.992 - *
   1.993 - * @param conv The purple conversation associated with the smiley.
   1.994 - * @param smile The text associated with the smiley
   1.995 - */
   1.996 -
   1.997 -void purple_conv_custom_smiley_close(PurpleConversation *conv, const char *smile);
   1.998 -
   1.999 -/*@}*/
  1.1000 -
  1.1001 -
  1.1002 -/**************************************************************************/
  1.1003 -/** @name Chat Conversation API                                           */
  1.1004 -/**************************************************************************/
  1.1005 -/*@{*/
  1.1006 -
  1.1007 -/**
  1.1008 - * Gets a chat's parent conversation.
  1.1009 - *
  1.1010 - * @param chat The chat.
  1.1011 - *
  1.1012 - * @return The parent conversation.
  1.1013 - */
  1.1014 -PurpleConversation *purple_conv_chat_get_conversation(const PurpleConvChat *chat);
  1.1015 -
  1.1016 -/**
  1.1017 - * Sets the list of users in the chat room.
  1.1018 - *
  1.1019 - * @note Calling this function will not update the display of the users.
  1.1020 - *       Please use purple_conv_chat_add_user(), purple_conv_chat_add_users(),
  1.1021 - *       purple_conv_chat_remove_user(), and purple_conv_chat_remove_users() instead.
  1.1022 - *
  1.1023 - * @param chat  The chat.
  1.1024 - * @param users The list of users.
  1.1025 - *
  1.1026 - * @return The list passed.
  1.1027 - */
  1.1028 -GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users);
  1.1029 -
  1.1030 -/**
  1.1031 - * Returns a list of users in the chat room.
  1.1032 - *
  1.1033 - * @param chat The chat.
  1.1034 - *
  1.1035 - * @constreturn The list of users.
  1.1036 - */
  1.1037 -GList *purple_conv_chat_get_users(const PurpleConvChat *chat);
  1.1038 -
  1.1039 -/**
  1.1040 - * Ignores a user in a chat room.
  1.1041 - *
  1.1042 - * @param chat The chat.
  1.1043 - * @param name The name of the user.
  1.1044 - */
  1.1045 -void purple_conv_chat_ignore(PurpleConvChat *chat, const char *name);
  1.1046 -
  1.1047 -/**
  1.1048 - * Unignores a user in a chat room.
  1.1049 - *
  1.1050 - * @param chat The chat.
  1.1051 - * @param name The name of the user.
  1.1052 - */
  1.1053 -void purple_conv_chat_unignore(PurpleConvChat *chat, const char *name);
  1.1054 -
  1.1055 -/**
  1.1056 - * Sets the list of ignored users in the chat room.
  1.1057 - *
  1.1058 - * @param chat    The chat.
  1.1059 - * @param ignored The list of ignored users.
  1.1060 - *
  1.1061 - * @return The list passed.
  1.1062 - */
  1.1063 -GList *purple_conv_chat_set_ignored(PurpleConvChat *chat, GList *ignored);
  1.1064 -
  1.1065 -/**
  1.1066 - * Returns the list of ignored users in the chat room.
  1.1067 - *
  1.1068 - * @param chat The chat.
  1.1069 - *
  1.1070 - * @constreturn The list of ignored users.
  1.1071 - */
  1.1072 -GList *purple_conv_chat_get_ignored(const PurpleConvChat *chat);
  1.1073 -
  1.1074 -/**
  1.1075 - * Returns the actual name of the specified ignored user, if it exists in
  1.1076 - * the ignore list.
  1.1077 - *
  1.1078 - * If the user found contains a prefix, such as '+' or '\@', this is also
  1.1079 - * returned. The username passed to the function does not have to have this
  1.1080 - * formatting.
  1.1081 - *
  1.1082 - * @param chat The chat.
  1.1083 - * @param user The user to check in the ignore list.
  1.1084 - *
  1.1085 - * @return The ignored user if found, complete with prefixes, or @c NULL
  1.1086 - *         if not found.
  1.1087 - */
  1.1088 -const char *purple_conv_chat_get_ignored_user(const PurpleConvChat *chat,
  1.1089 -											const char *user);
  1.1090 -
  1.1091 -/**
  1.1092 - * Returns @c TRUE if the specified user is ignored.
  1.1093 - *
  1.1094 - * @param chat The chat.
  1.1095 - * @param user The user.
  1.1096 - *
  1.1097 - * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise.
  1.1098 - */
  1.1099 -gboolean purple_conv_chat_is_user_ignored(const PurpleConvChat *chat,
  1.1100 -										const char *user);
  1.1101 -
  1.1102 -/**
  1.1103 - * Sets the chat room's topic.
  1.1104 - *
  1.1105 - * @param chat  The chat.
  1.1106 - * @param who   The user that set the topic.
  1.1107 - * @param topic The topic.
  1.1108 - */
  1.1109 -void purple_conv_chat_set_topic(PurpleConvChat *chat, const char *who,
  1.1110 -							  const char *topic);
  1.1111 -
  1.1112 -/**
  1.1113 - * Returns the chat room's topic.
  1.1114 - *
  1.1115 - * @param chat The chat.
  1.1116 - *
  1.1117 - * @return The chat's topic.
  1.1118 - */
  1.1119 -const char *purple_conv_chat_get_topic(const PurpleConvChat *chat);
  1.1120 -
  1.1121 -/**
  1.1122 - * Sets the chat room's ID.
  1.1123 - *
  1.1124 - * @param chat The chat.
  1.1125 - * @param id   The ID.
  1.1126 - */
  1.1127 -void purple_conv_chat_set_id(PurpleConvChat *chat, int id);
  1.1128 -
  1.1129 -/**
  1.1130 - * Returns the chat room's ID.
  1.1131 - *
  1.1132 - * @param chat The chat.
  1.1133 - *
  1.1134 - * @return The ID.
  1.1135 - */
  1.1136 -int purple_conv_chat_get_id(const PurpleConvChat *chat);
  1.1137 -
  1.1138 -/**
  1.1139 - * Writes to a chat.
  1.1140 - *
  1.1141 - * @param chat    The chat.
  1.1142 - * @param who     The user who sent the message.
  1.1143 - * @param message The message to write.
  1.1144 - * @param flags   The flags.
  1.1145 - * @param mtime   The time the message was sent.
  1.1146 - */
  1.1147 -void purple_conv_chat_write(PurpleConvChat *chat, const char *who,
  1.1148 -						  const char *message, PurpleMessageFlags flags,
  1.1149 -						  time_t mtime);
  1.1150 -
  1.1151 -/**
  1.1152 - * Sends a message to this chat conversation.
  1.1153 - *
  1.1154 - * @param chat    The chat.
  1.1155 - * @param message The message to send.
  1.1156 - */
  1.1157 -void purple_conv_chat_send(PurpleConvChat *chat, const char *message);
  1.1158 -
  1.1159 -/**
  1.1160 - * Sends a message to this chat conversation with specified flags.
  1.1161 - *
  1.1162 - * @param chat    The chat.
  1.1163 - * @param message The message to send.
  1.1164 - * @param flags   The PurpleMessageFlags flags to use.
  1.1165 - */
  1.1166 -void purple_conv_chat_send_with_flags(PurpleConvChat *chat, const char *message, PurpleMessageFlags flags);
  1.1167 -
  1.1168 -/**
  1.1169 - * Adds a user to a chat.
  1.1170 - *
  1.1171 - * @param chat        The chat.
  1.1172 - * @param user        The user to add.
  1.1173 - * @param extra_msg   An extra message to display with the join message.
  1.1174 - * @param flags       The users flags
  1.1175 - * @param new_arrival Decides whether or not to show a join notice.
  1.1176 - */
  1.1177 -void purple_conv_chat_add_user(PurpleConvChat *chat, const char *user,
  1.1178 -							 const char *extra_msg, PurpleConvChatBuddyFlags flags,
  1.1179 -							 gboolean new_arrival);
  1.1180 -
  1.1181 -/**
  1.1182 - * Adds a list of users to a chat.
  1.1183 - *
  1.1184 - * The data is copied from @a users, @a extra_msgs, and @a flags, so it is up to
  1.1185 - * the caller to free this list after calling this function.
  1.1186 - *
  1.1187 - * @param chat         The chat.
  1.1188 - * @param users        The list of users to add.
  1.1189 - * @param extra_msgs   An extra message to display with the join message for each
  1.1190 - *                     user.  This list may be shorter than @a users, in which
  1.1191 - *                     case, the users after the end of extra_msgs will not have
  1.1192 - *                     an extra message.  By extension, this means that extra_msgs
  1.1193 - *                     can simply be @c NULL and none of the users will have an
  1.1194 - *                     extra message.
  1.1195 - * @param flags        The list of flags for each user.
  1.1196 - * @param new_arrivals Decides whether or not to show join notices.
  1.1197 - */
  1.1198 -void purple_conv_chat_add_users(PurpleConvChat *chat, GList *users, GList *extra_msgs,
  1.1199 -							  GList *flags, gboolean new_arrivals);
  1.1200 -
  1.1201 -/**
  1.1202 - * Renames a user in a chat.
  1.1203 - *
  1.1204 - * @param chat     The chat.
  1.1205 - * @param old_user The old username.
  1.1206 - * @param new_user The new username.
  1.1207 - */
  1.1208 -void purple_conv_chat_rename_user(PurpleConvChat *chat, const char *old_user,
  1.1209 -								const char *new_user);
  1.1210 -
  1.1211 -/**
  1.1212 - * Removes a user from a chat, optionally with a reason.
  1.1213 - *
  1.1214 - * It is up to the developer to free this list after calling this function.
  1.1215 - *
  1.1216 - * @param chat   The chat.
  1.1217 - * @param user   The user that is being removed.
  1.1218 - * @param reason The optional reason given for the removal. Can be @c NULL.
  1.1219 - */
  1.1220 -void purple_conv_chat_remove_user(PurpleConvChat *chat, const char *user,
  1.1221 -								const char *reason);
  1.1222 -
  1.1223 -/**
  1.1224 - * Removes a list of users from a chat, optionally with a single reason.
  1.1225 - *
  1.1226 - * @param chat   The chat.
  1.1227 - * @param users  The users that are being removed.
  1.1228 - * @param reason The optional reason given for the removal. Can be @c NULL.
  1.1229 - */
  1.1230 -void purple_conv_chat_remove_users(PurpleConvChat *chat, GList *users,
  1.1231 -								 const char *reason);
  1.1232 -
  1.1233 -/**
  1.1234 - * Finds a user in a chat
  1.1235 - *
  1.1236 - * @param chat   The chat.
  1.1237 - * @param user   The user to look for.
  1.1238 - *
  1.1239 - * @return TRUE if the user is in the chat, FALSE if not
  1.1240 - */
  1.1241 -gboolean purple_conv_chat_find_user(PurpleConvChat *chat, const char *user);
  1.1242 -
  1.1243 -/**
  1.1244 - * Set a users flags in a chat
  1.1245 - *
  1.1246 - * @param chat   The chat.
  1.1247 - * @param user   The user to update.
  1.1248 - * @param flags  The new flags.
  1.1249 - */
  1.1250 -void purple_conv_chat_user_set_flags(PurpleConvChat *chat, const char *user,
  1.1251 -								   PurpleConvChatBuddyFlags flags);
  1.1252 -
  1.1253 -/**
  1.1254 - * Get the flags for a user in a chat
  1.1255 - *
  1.1256 - * @param chat   The chat.
  1.1257 - * @param user   The user to find the flags for
  1.1258 - *
  1.1259 - * @return The flags for the user
  1.1260 - */
  1.1261 -PurpleConvChatBuddyFlags purple_conv_chat_user_get_flags(PurpleConvChat *chat,
  1.1262 -													 const char *user);
  1.1263 -
  1.1264 -/**
  1.1265 - * Clears all users from a chat.
  1.1266 - *
  1.1267 - * @param chat The chat.
  1.1268 - */
  1.1269 -void purple_conv_chat_clear_users(PurpleConvChat *chat);
  1.1270 -
  1.1271 -/**
  1.1272 - * Sets your nickname (used for hilighting) for a chat.
  1.1273 - *
  1.1274 - * @param chat The chat.
  1.1275 - * @param nick The nick.
  1.1276 - */
  1.1277 -void purple_conv_chat_set_nick(PurpleConvChat *chat, const char *nick);
  1.1278 -
  1.1279 -/**
  1.1280 - * Gets your nickname (used for hilighting) for a chat.
  1.1281 - *
  1.1282 - * @param chat The chat.
  1.1283 - * @return  The nick.
  1.1284 - */
  1.1285 -const char *purple_conv_chat_get_nick(PurpleConvChat *chat);
  1.1286 -
  1.1287 -/**
  1.1288 - * Finds a chat with the specified chat ID.
  1.1289 - *
  1.1290 - * @param gc The purple_connection.
  1.1291 - * @param id The chat ID.
  1.1292 - *
  1.1293 - * @return The chat conversation.
  1.1294 - */
  1.1295 -PurpleConversation *purple_find_chat(const PurpleConnection *gc, int id);
  1.1296 -
  1.1297 -/**
  1.1298 - * Lets the core know we left a chat, without destroying it.
  1.1299 - * Called from serv_got_chat_left().
  1.1300 - *
  1.1301 - * @param chat The chat.
  1.1302 - */
  1.1303 -void purple_conv_chat_left(PurpleConvChat *chat);
  1.1304 -
  1.1305 -/**
  1.1306 - * Returns true if we're no longer in this chat,
  1.1307 - * and just left the window open.
  1.1308 - *
  1.1309 - * @param chat The chat.
  1.1310 - *
  1.1311 - * @return @c TRUE if we left the chat already, @c FALSE if
  1.1312 - * we're still there.
  1.1313 - */
  1.1314 -gboolean purple_conv_chat_has_left(PurpleConvChat *chat);
  1.1315 -
  1.1316 -/**
  1.1317 - * Creates a new chat buddy
  1.1318 - *
  1.1319 - * @param name The name.
  1.1320 - * @param alias The alias.
  1.1321 - * @param flags The flags.
  1.1322 - *
  1.1323 - * @return The new chat buddy
  1.1324 - */
  1.1325 -PurpleConvChatBuddy *purple_conv_chat_cb_new(const char *name, const char *alias,
  1.1326 -										PurpleConvChatBuddyFlags flags);
  1.1327 -
  1.1328 -/**
  1.1329 - * Find a chat buddy in a chat
  1.1330 - *
  1.1331 - * @param chat The chat.
  1.1332 - * @param name The name of the chat buddy to find.
  1.1333 - */
  1.1334 -PurpleConvChatBuddy *purple_conv_chat_cb_find(PurpleConvChat *chat, const char *name);
  1.1335 -
  1.1336 -/**
  1.1337 - * Get the name of a chat buddy
  1.1338 - *
  1.1339 - * @param cb    The chat buddy.
  1.1340 - *
  1.1341 - * @return The name of the chat buddy.
  1.1342 - */
  1.1343 -const char *purple_conv_chat_cb_get_name(PurpleConvChatBuddy *cb);
  1.1344 -
  1.1345 -/**
  1.1346 - * Destroys a chat buddy
  1.1347 - *
  1.1348 - * @param cb The chat buddy to destroy
  1.1349 - */
  1.1350 -void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb);
  1.1351 -
  1.1352 -/**
  1.1353 - * Retrieves the extended menu items for the conversation.
  1.1354 - *
  1.1355 - * @param conv The conversation.
  1.1356 - * 
  1.1357 - * @return  A list of PurpleMenuAction items, harvested by the
  1.1358 - *          chat-extended-menu signal. The list and the menuaction
  1.1359 - *          items should be freed by the caller.
  1.1360 - *
  1.1361 - * @since 2.1.0
  1.1362 - */
  1.1363 -GList * purple_conversation_get_extended_menu(PurpleConversation *conv);
  1.1364 -
  1.1365 -/**
  1.1366 - * Perform a command in a conversation. Similar to @see purple_cmd_do_command
  1.1367 - *
  1.1368 - * @param conv    The conversation.
  1.1369 - * @param cmdline The entire command including the arguments.
  1.1370 - * @param markup  @c NULL, or the formatted command line.
  1.1371 - * @param error   If the command failed errormsg is filled in with the appropriate error
  1.1372 - *                message, if not @c NULL. It must be freed by the caller with g_free().
  1.1373 - *
  1.1374 - * @return  @c TRUE if the command was executed successfully, @c FALSE otherwise.
  1.1375 - *
  1.1376 - * @since 2.1.0
  1.1377 - */
  1.1378 -gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error);
  1.1379 -
  1.1380 -/*@}*/
  1.1381 -
  1.1382 -/**************************************************************************/
  1.1383 -/** @name Conversations Subsystem                                         */
  1.1384 -/**************************************************************************/
  1.1385 -/*@{*/
  1.1386 -
  1.1387 -/**
  1.1388 - * Returns the conversation subsystem handle.
  1.1389 - *
  1.1390 - * @return The conversation subsystem handle.
  1.1391 - */
  1.1392 -void *purple_conversations_get_handle(void);
  1.1393 -
  1.1394 -/**
  1.1395 - * Initializes the conversation subsystem.
  1.1396 - */
  1.1397 -void purple_conversations_init(void);
  1.1398 -
  1.1399 -/**
  1.1400 - * Uninitializes the conversation subsystem.
  1.1401 - */
  1.1402 -void purple_conversations_uninit(void);
  1.1403 -
  1.1404 -/*@}*/
  1.1405 -
  1.1406 -#ifdef __cplusplus
  1.1407 -}
  1.1408 -#endif
  1.1409 -
  1.1410 -#endif /* _PURPLE_CONVERSATION_H_ */