#include "account.h"
#include "log.h"
#include "buddyicon.h"
#include "server.h"
Include dependency graph for conversation.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _GaimConvChat |
Data specific to Chats. More... | |
struct | _GaimConversation |
A core representation of a conversation between two or more people. More... | |
struct | _GaimConversationUiOps |
Conversation operations and events. More... | |
struct | _GaimConvIm |
Data specific to Instant Messages. More... | |
struct | _GaimConvWindow |
A core representation of a graphical window containing one or more conversations. More... | |
struct | _GaimConvWindowUiOps |
Conversation window operations. More... | |
Conversation API | |
#define | GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) |
#define | GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) |
GaimConversation * | gaim_conversation_new (GaimConversationType type, GaimAccount *account, const char *name) |
Creates a new conversation of the specified type. | |
void | gaim_conversation_destroy (GaimConversation *conv) |
Destroys the specified conversation and removes it from the parent window. | |
GaimConversationType | gaim_conversation_get_type (const GaimConversation *conv) |
Returns the specified conversation's type. | |
void | gaim_conversation_set_ui_ops (GaimConversation *conv, GaimConversationUiOps *ops) |
Sets the specified conversation's UI operations structure. | |
GaimConversationUiOps * | gaim_conversation_get_ui_ops (const GaimConversation *conv) |
Returns the specified conversation's UI operations structure. | |
void | gaim_conversation_set_account (GaimConversation *conv, GaimAccount *account) |
Sets the specified conversation's gaim_account. | |
GaimAccount * | gaim_conversation_get_account (const GaimConversation *conv) |
Returns the specified conversation's gaim_account. | |
GaimConnection * | gaim_conversation_get_gc (const GaimConversation *conv) |
Returns the specified conversation's gaim_connection. | |
void | gaim_conversation_set_title (GaimConversation *conv, const char *title) |
Sets the specified conversation's title. | |
const char * | gaim_conversation_get_title (const GaimConversation *conv) |
Returns the specified conversation's title. | |
void | gaim_conversation_autoset_title (GaimConversation *conv) |
Automatically sets the specified conversation's title. | |
int | gaim_conversation_get_index (const GaimConversation *conv) |
Returns the specified conversation's index in the parent window. | |
void | gaim_conversation_set_unseen (GaimConversation *conv, GaimUnseenState state) |
Sets the conversation's unseen state. | |
GaimUnseenState | gaim_conversation_get_unseen (const GaimConversation *conv) |
Returns the conversation's unseen state. | |
void | gaim_conversation_set_name (GaimConversation *conv, const char *name) |
Sets the specified conversation's name. | |
const char * | gaim_conversation_get_name (const GaimConversation *conv) |
Returns the specified conversation's name. | |
void | gaim_conversation_set_logging (GaimConversation *conv, gboolean log) |
Enables or disables logging for this conversation. | |
gboolean | gaim_conversation_is_logging (const GaimConversation *conv) |
Returns whether or not logging is enabled for this conversation. | |
GList * | gaim_conversation_get_send_history (const GaimConversation *conv) |
Returns the specified conversation's send history. | |
void | gaim_conversation_set_history (GaimConversation *conv, GString *history) |
Sets the specified conversation's history. | |
GString * | gaim_conversation_get_history (const GaimConversation *conv) |
Returns the specified conversation's history. | |
GaimConvWindow * | gaim_conversation_get_window (const GaimConversation *conv) |
Returns the specified conversation's parent window. | |
GaimConvIm * | gaim_conversation_get_im_data (const GaimConversation *conv) |
Returns the specified conversation's IM-specific data. | |
GaimConvChat * | gaim_conversation_get_chat_data (const GaimConversation *conv) |
Returns the specified conversation's chat-specific data. | |
void | gaim_conversation_set_data (GaimConversation *conv, const char *key, gpointer data) |
Sets extra data for a conversation. | |
gpointer | gaim_conversation_get_data (GaimConversation *conv, const char *key) |
Returns extra data in a conversation. | |
GList * | gaim_get_conversations (void) |
Returns a list of all conversations. | |
GList * | gaim_get_ims (void) |
Returns a list of all IMs. | |
GList * | gaim_get_chats (void) |
Returns a list of all chats. | |
GaimConversation * | gaim_find_conversation (const char *name) |
Finds the conversation with the specified name. | |
GaimConversation * | gaim_find_conversation_with_account (const char *name, const GaimAccount *account) |
Finds a conversation with the specified name and user. | |
void | gaim_conversation_write (GaimConversation *conv, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) |
Writes to a conversation window. | |
void | gaim_conversation_update_progress (GaimConversation *conv, float percent) |
Updates the progress bar on a conversation window (if one exists in the UI). | |
void | gaim_conversation_update (GaimConversation *conv, GaimConvUpdateType type) |
Updates the visual status and UI of a conversation. | |
void | gaim_conversation_foreach (void(*func)(GaimConversation *conv)) |
Calls a function on each conversation. | |
Conversation Window API | |
GaimConvWindow * | gaim_conv_window_new (void) |
Creates a new conversation window. | |
void | gaim_conv_window_destroy (GaimConvWindow *win) |
Destroys the specified conversation window and all conversations in it. | |
void | gaim_conv_window_show (GaimConvWindow *win) |
Shows the specified conversation window. | |
void | gaim_conv_window_hide (GaimConvWindow *win) |
Hides the specified conversation window. | |
void | gaim_conv_window_raise (GaimConvWindow *win) |
Raises the specified conversation window. | |
void | gaim_conv_window_flash (GaimConvWindow *win) |
Causes the window to flash for IM notification, if the UI supports this. | |
void | gaim_conv_window_set_ui_ops (GaimConvWindow *win, GaimConvWindowUiOps *ops) |
Sets the specified window's UI window operations structure. | |
GaimConvWindowUiOps * | gaim_conv_window_get_ui_ops (const GaimConvWindow *win) |
Returns the specified window's UI window operations structure. | |
int | gaim_conv_window_add_conversation (GaimConvWindow *win, GaimConversation *conv) |
Adds a conversation to this window. | |
GaimConversation * | gaim_conv_window_remove_conversation (GaimConvWindow *win, unsigned int index) |
Removes the conversation at the specified index from the window. | |
void | gaim_conv_window_move_conversation (GaimConvWindow *win, unsigned int index, unsigned int new_index) |
Moves the conversation at the specified index in a window to a new index. | |
GaimConversation * | gaim_conv_window_get_conversation_at (const GaimConvWindow *win, unsigned int index) |
Returns the conversation in the window at the specified index. | |
size_t | gaim_conv_window_get_conversation_count (const GaimConvWindow *win) |
Returns the number of conversations in the window. | |
void | gaim_conv_window_switch_conversation (GaimConvWindow *win, unsigned int index) |
Switches the active conversation to the one at the specified index. | |
GaimConversation * | gaim_conv_window_get_active_conversation (const GaimConvWindow *win) |
Returns the active conversation in the window. | |
GList * | gaim_conv_window_get_conversations (const GaimConvWindow *win) |
Returns the list of conversations in the specified window. | |
GList * | gaim_get_windows (void) |
Returns a list of all windows. | |
GaimConvWindow * | gaim_get_first_window_with_type (GaimConversationType type) |
Returns the first window containing a conversation of the specified type. | |
GaimConvWindow * | gaim_get_last_window_with_type (GaimConversationType type) |
Returns the last window containing a conversation of the specified type. | |
IM Conversation API | |
GaimConversation * | gaim_conv_im_get_conversation (const GaimConvIm *im) |
Gets an IM's parent conversation. | |
void | gaim_conv_im_set_icon (GaimConvIm *im, GaimBuddyIcon *icon) |
Sets the IM's buddy icon. | |
GaimBuddyIcon * | gaim_conv_im_get_icon (const GaimConvIm *im) |
Returns the IM's buddy icon. | |
void | gaim_conv_im_set_typing_state (GaimConvIm *im, GaimTypingState state) |
Sets the IM's typing state. | |
GaimTypingState | gaim_conv_im_get_typing_state (const GaimConvIm *im) |
Returns the IM's typing state. | |
void | gaim_conv_im_start_typing_timeout (GaimConvIm *im, int timeout) |
Starts the IM's typing timeout. | |
void | gaim_conv_im_stop_typing_timeout (GaimConvIm *im) |
Stops the IM's typing timeout. | |
guint | gaim_conv_im_get_typing_timeout (const GaimConvIm *im) |
Returns the IM's typing timeout. | |
void | gaim_conv_im_set_type_again (GaimConvIm *im, time_t val) |
Sets the IM's time until it should send another typing notification. | |
time_t | gaim_conv_im_get_type_again (const GaimConvIm *im) |
Returns the IM's time until it should send another typing notification. | |
void | gaim_conv_im_start_type_again_timeout (GaimConvIm *im) |
Starts the IM's type again timeout. | |
void | gaim_conv_im_stop_type_again_timeout (GaimConvIm *im) |
Stops the IM's type again timeout. | |
guint | gaim_conv_im_get_type_again_timeout (const GaimConvIm *im) |
Returns the IM's type again timeout interval. | |
void | gaim_conv_im_update_typing (GaimConvIm *im) |
Updates the visual typing notification for an IM conversation. | |
void | gaim_conv_im_write (GaimConvIm *im, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) |
Writes to an IM. | |
void | gaim_conv_im_send (GaimConvIm *im, const char *message) |
Sends a message to this IM conversation. | |
Chat Conversation API | |
GaimConversation * | gaim_conv_chat_get_conversation (const GaimConvChat *chat) |
Gets a chat's parent conversation. | |
GList * | gaim_conv_chat_set_users (GaimConvChat *chat, GList *users) |
Sets the list of users in the chat room. | |
GList * | gaim_conv_chat_get_users (const GaimConvChat *chat) |
Returns a list of users in the chat room. | |
void | gaim_conv_chat_ignore (GaimConvChat *chat, const char *name) |
Ignores a user in a chat room. | |
void | gaim_conv_chat_unignore (GaimConvChat *chat, const char *name) |
Unignores a user in a chat room. | |
GList * | gaim_conv_chat_set_ignored (GaimConvChat *chat, GList *ignored) |
Sets the list of ignored users in the chat room. | |
GList * | gaim_conv_chat_get_ignored (const GaimConvChat *chat) |
Returns the list of ignored users in the chat room. | |
const char * | gaim_conv_chat_get_ignored_user (const GaimConvChat *chat, const char *user) |
Returns the actual name of the specified ignored user, if it exists in the ignore list. | |
gboolean | gaim_conv_chat_is_user_ignored (const GaimConvChat *chat, const char *user) |
Returns TRUE if the specified user is ignored. | |
void | gaim_conv_chat_set_topic (GaimConvChat *chat, const char *who, const char *topic) |
Sets the chat room's topic. | |
const char * | gaim_conv_chat_get_topic (const GaimConvChat *chat) |
Returns the chat room's topic. | |
void | gaim_conv_chat_set_id (GaimConvChat *chat, int id) |
Sets the chat room's ID. | |
int | gaim_conv_chat_get_id (const GaimConvChat *chat) |
Returns the chat room's ID. | |
void | gaim_conv_chat_write (GaimConvChat *chat, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) |
Writes to a chat. | |
void | gaim_conv_chat_send (GaimConvChat *chat, const char *message) |
Sends a message to this chat conversation. | |
void | gaim_conv_chat_add_user (GaimConvChat *chat, const char *user, const char *extra_msg) |
Adds a user to a chat. | |
void | gaim_conv_chat_add_users (GaimConvChat *chat, GList *users) |
Adds a list of users to a chat. | |
void | gaim_conv_chat_rename_user (GaimConvChat *chat, const char *old_user, const char *new_user) |
Renames a user in a chat. | |
void | gaim_conv_chat_remove_user (GaimConvChat *chat, const char *user, const char *reason) |
Removes a user from a chat, optionally with a reason. | |
void | gaim_conv_chat_remove_users (GaimConvChat *chat, GList *users, const char *reason) |
Removes a list of users from a chat, optionally with a single reason. | |
void | gaim_conv_chat_clear_users (GaimConvChat *chat) |
Clears all users from a chat. | |
void | gaim_conv_chat_set_nick (GaimConvChat *chat, const char *nick) |
Sets your nickname (used for hilighting) for a chat. | |
const char * | gaim_conv_chat_get_nick (GaimConvChat *chat) |
Gets your nickname (used for hilighting) for a chat. | |
GaimConversation * | gaim_find_chat (const GaimConnection *gc, int id) |
Finds a chat with the specified chat ID. | |
void | gaim_conv_chat_left (GaimConvChat *chat) |
Lets the core know we left a chat, without destroying it. | |
gboolean | gaim_conv_chat_has_left (GaimConvChat *chat) |
Returns true if we're no longer in this chat, and just left the window open. | |
Conversation Placement API | |
GList * | gaim_conv_placement_get_options (void) |
Returns a GList containing the IDs and Names of the registered placement functions. | |
void | gaim_conv_placement_add_fnc (const char *id, const char *name, GaimConvPlacementFunc fnc) |
Adds a conversation placement function to the list of possible functions. | |
void | gaim_conv_placement_remove_fnc (const char *id) |
Removes a conversation placement function from the list of possible functions. | |
const char * | gaim_conv_placement_get_name (const char *id) |
Returns the name of the conversation placement function at the specified id. | |
GaimConvPlacementFunc | gaim_conv_placement_get_fnc (const char *id) |
Returns a pointer to the conversation placement function at the specified id. | |
void | gaim_conv_placement_set_current_func (GaimConvPlacementFunc func) |
Sets the current conversation placement function. | |
GaimConvPlacementFunc | gaim_conv_placement_get_current_func (void) |
Returns the current conversation placement function. | |
const char * | gaim_conv_placement_get_fnc_id (GaimConvPlacementFunc fnc) |
Returns the id of the specified conversation placement function. | |
UI Registration Functions | |
void | gaim_conversations_set_win_ui_ops (GaimConvWindowUiOps *ops) |
Sets the UI operations structure to be used in all gaim conversation windows. | |
GaimConvWindowUiOps * | gaim_conversations_get_win_ui_ops (void) |
Returns the gaim window UI operations structure to be used in new windows. | |
Conversations Subsystem | |
void * | gaim_conversations_get_handle (void) |
Returns the conversation subsystem handle. | |
void | gaim_conversations_init (void) |
Initializes the conversation subsystem. | |
void | gaim_conversations_uninit (void) |
Uninitializes the conversation subsystem. | |
Typedefs | |
typedef _GaimConvWindowUiOps | GaimConvWindowUiOps |
Data Structures. | |
typedef _GaimConvWindow | GaimConvWindow |
typedef _GaimConversationUiOps | GaimConversationUiOps |
typedef _GaimConversation | GaimConversation |
typedef _GaimConvIm | GaimConvIm |
typedef _GaimConvChat | GaimConvChat |
typedef void(* | GaimConvPlacementFunc )(GaimConversation *) |
Enumerations | |
enum | GaimConversationType { GAIM_CONV_UNKNOWN = 0, GAIM_CONV_IM, GAIM_CONV_CHAT, GAIM_CONV_MISC } |
A type of conversation. More... | |
enum | GaimUnseenState { GAIM_UNSEEN_NONE = 0, GAIM_UNSEEN_TEXT, GAIM_UNSEEN_NICK, GAIM_UNSEEN_EVENT } |
Unseen text states. More... | |
enum | GaimConvUpdateType { GAIM_CONV_UPDATE_ADD = 0, GAIM_CONV_UPDATE_REMOVE, GAIM_CONV_UPDATE_ACCOUNT, GAIM_CONV_UPDATE_TYPING, GAIM_CONV_UPDATE_UNSEEN, GAIM_CONV_UPDATE_LOGGING, GAIM_CONV_UPDATE_TOPIC, GAIM_CONV_ACCOUNT_ONLINE, GAIM_CONV_ACCOUNT_OFFLINE, GAIM_CONV_UPDATE_AWAY, GAIM_CONV_UPDATE_ICON, GAIM_CONV_UPDATE_TITLE, GAIM_CONV_UPDATE_CHATLEFT } |
Conversation update type. More... | |
enum | GaimTypingState { GAIM_NOT_TYPING = 0, GAIM_TYPING, GAIM_TYPED } |
The typing state of a user. More... | |
enum | GaimMessageFlags { GAIM_MESSAGE_SEND = 0x0001, GAIM_MESSAGE_RECV = 0x0002, GAIM_MESSAGE_SYSTEM = 0x0004, GAIM_MESSAGE_AUTO_RESP = 0x0008, GAIM_MESSAGE_COLORIZE = 0x0010, GAIM_MESSAGE_NICK = 0x0020, GAIM_MESSAGE_NO_LOG = 0x0040, GAIM_MESSAGE_WHISPER = 0x0080, GAIM_MESSAGE_IMAGES = 0x0100, GAIM_MESSAGE_ERROR = 0x0200 } |
Flags applicable to a message. More... |
gaim
Gaim 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
A type of conversation.
|
|
|
Flags applicable to a message. Most will have send, recv or system.
|
|
The typing state of a user.
|
|
Unseen text states.
|
|
Adds a user to a chat.
|
|
Adds a list of users to a chat. The data is copied from users, so it is up to the developer to free this list after calling this function.
|
|
Clears all users from a chat.
|
|
Gets a chat's parent conversation.
|
|
Returns the chat room's ID.
|
|
Returns the list of ignored users in the chat room.
|
|
Returns the actual name of the specified ignored user, if it exists in the ignore list. If the user found contains a prefix, such as '+' or '@', this is also returned. The username passed to the function does not have to have this formatting.
|
|
Gets your nickname (used for hilighting) for a chat.
|
|
Returns the chat room's topic.
|
|
Returns a list of users in the chat room.
|
|
Returns true if we're no longer in this chat, and just left the window open.
|
|
Ignores a user in a chat room.
|
|
Returns
|
|
Lets the core know we left a chat, without destroying it. Called from serv_got_chat_left().
|
|
Removes a user from a chat, optionally with a reason. It is up to the developer to free this list after calling this function.
|
|
Removes a list of users from a chat, optionally with a single reason.
|
|
Renames a user in a chat.
|
|
Sends a message to this chat conversation.
|
|
Sets the chat room's ID.
|
|
Sets the list of ignored users in the chat room.
|
|
Sets your nickname (used for hilighting) for a chat.
|
|
Sets the chat room's topic.
|
|
Sets the list of users in the chat room.
|
|
Unignores a user in a chat room.
|
|
Writes to a chat.
|
|
Gets an IM's parent conversation.
|
|
Returns the IM's buddy icon.
|
|
Returns the IM's time until it should send another typing notification.
|
|
Returns the IM's type again timeout interval.
|
|
Returns the IM's typing state.
|
|
Returns the IM's typing timeout.
|
|
Sends a message to this IM conversation.
|
|
Sets the IM's buddy icon. This should only be called from within Gaim. You probably want to call gaim_buddy_icon_set_data().
|
|
Sets the IM's time until it should send another typing notification.
|
|
Sets the IM's typing state.
|
|
Starts the IM's type again timeout.
|
|
Starts the IM's typing timeout.
|
|
Stops the IM's type again timeout.
|
|
Stops the IM's typing timeout.
|
|
Updates the visual typing notification for an IM conversation.
|
|
Writes to an IM.
|
|
Adds a conversation placement function to the list of possible functions.
|
|
Returns the current conversation placement function.
|
|
Returns a pointer to the conversation placement function at the specified id.
|
|
Returns the id of the specified conversation placement function.
|
|
Returns the name of the conversation placement function at the specified id.
|
|
Returns a GList containing the IDs and Names of the registered placement functions.
|
|
Removes a conversation placement function from the list of possible functions.
|
|
Sets the current conversation placement function.
|
|
Adds a conversation to this window. If the conversation already has a parent window, this will do nothing.
|
|
Destroys the specified conversation window and all conversations in it.
|
|
Causes the window to flash for IM notification, if the UI supports this.
|
|
Returns the active conversation in the window.
|
|
Returns the conversation in the window at the specified index.
If the index is out of range, this returns
|
|
Returns the number of conversations in the window.
|
|
Returns the list of conversations in the specified window.
|
|
Returns the specified window's UI window operations structure.
|
|
Hides the specified conversation window.
|
|
Moves the conversation at the specified index in a window to a new index.
|
|
Creates a new conversation window. This window is added to the list of windows, but is not shown until gaim_conv_window_show() is called.
|
|
Raises the specified conversation window.
|
|
Removes the conversation at the specified index from the window. If there is no conversation at this index, this will do nothing.
|
|
Sets the specified window's UI window operations structure.
|
|
Shows the specified conversation window.
|
|
Switches the active conversation to the one at the specified index. If index is out of range, this does nothing.
|
|
Automatically sets the specified conversation's title. This function takes OPT_IM_ALIAS_TAB into account, as well as the user's alias.
|
|
Destroys the specified conversation and removes it from the parent window. If this conversation is the only one contained in the parent window, that window is also destroyed.
|
|
Calls a function on each conversation.
|
|
Returns the specified conversation's gaim_account. This gaim_account represents the user using gaim, not the person the user is having a conversation/chat/flame with.
|
|
Returns the specified conversation's chat-specific data.
If the conversation type is not GAIM_CONV_CHAT, this will return
|
|
Returns extra data in a conversation.
|
|
Returns the specified conversation's gaim_connection. This is the same as gaim_conversation_get_user(conv)->gc.
|
|
Returns the specified conversation's history.
|
|
Returns the specified conversation's IM-specific data.
If the conversation type is not GAIM_CONV_IM, this will return
|
|
Returns the specified conversation's index in the parent window.
|
|
Returns the specified conversation's name.
|
|
Returns the specified conversation's send history.
|
|
Returns the specified conversation's title.
|
|
Returns the specified conversation's type.
|
|
Returns the specified conversation's UI operations structure.
|
|
Returns the conversation's unseen state.
|
|
Returns the specified conversation's parent window.
|
|
Returns whether or not logging is enabled for this conversation.
|
|
Creates a new conversation of the specified type.
|
|
Sets the specified conversation's gaim_account. This gaim_account represents the user using gaim, not the person the user is having a conversation/chat/flame with.
|
|
Sets extra data for a conversation.
|
|
Sets the specified conversation's history.
|
|
Enables or disables logging for this conversation.
|
|
Sets the specified conversation's name.
|
|
Sets the specified conversation's title.
|
|
Sets the specified conversation's UI operations structure.
|
|
Sets the conversation's unseen state.
|
|
Updates the visual status and UI of a conversation.
|
|
Updates the progress bar on a conversation window (if one exists in the UI). This is used for loading images typically.
|
|
Writes to a conversation window. This function should not be used to write IM or chat messages. Use gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will most likely call this anyway, but they may do their own formatting, sound playback, etc. This can be used to write generic messages, such as "so and so closed the conversation window."
|
|
Returns the conversation subsystem handle.
|
|
Returns the gaim window UI operations structure to be used in new windows.
|
|
Sets the UI operations structure to be used in all gaim conversation windows.
|
|
Finds a chat with the specified chat ID.
|
|
Finds the conversation with the specified name.
|
|
Finds a conversation with the specified name and user.
|
|
Returns a list of all chats.
|
|
Returns a list of all conversations. This list includes both IMs and chats.
|
|
Returns the first window containing a conversation of the specified type.
|
|
Returns a list of all IMs.
|
|
Returns the last window containing a conversation of the specified type.
|
|
Returns a list of all windows.
|