gaim. More...
#include "account.h"
#include "buddyicon.h"
#include "log.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 | _GaimConvWindowUiOps |
Conversation window operations. More... | |
struct | _GaimConversationUiOps |
Conversation operations and events. More... | |
struct | _GaimConvWindow |
A core representation of a graphical window containing one or more conversations. More... | |
struct | _GaimConvIm |
Data specific to Instant Messages. More... | |
struct | _GaimConvChat |
Data specific to Chats. More... | |
struct | _GaimConvChatBuddy |
Data for "Chat Buddies". More... | |
struct | _GaimConversation |
A core representation of a conversation between two or more people. 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_set_features (GaimConversation *conv, GaimConnectionFlags features) |
Set the features as supported for the given conversation. | |
GaimConnectionFlags | gaim_conversation_get_features (GaimConversation *conv) |
Get the features supported by the given conversation. | |
void | gaim_conversation_update_progress (GaimConversation *conv, float percent) |
Updates the progress bar on a conversation window (if one exists in the UI). | |
gboolean | gaim_conversation_has_focus (GaimConversation *conv) |
Determines if a conversation has focus. | |
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. | |
gboolean | gaim_conv_window_has_focus (GaimConvWindow *win) |
Determines if a conversation window has focus. | |
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. | |
gboolean | gaim_conv_present_error (const char *who, GaimAccount *account, const char *what) |
Presents an IM-error to the user. | |
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, GaimConvChatBuddyFlags flags, gboolean new_arrival) |
Adds a user to a chat. | |
void | gaim_conv_chat_add_users (GaimConvChat *chat, GList *users, GList *flags) |
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. | |
gboolean | gaim_conv_chat_find_user (GaimConvChat *chat, const char *user) |
Finds a user in a chat. | |
void | gaim_conv_chat_user_set_flags (GaimConvChat *chat, const char *user, GaimConvChatBuddyFlags flags) |
Set a users flags in a chat. | |
GaimConvChatBuddyFlags | gaim_conv_chat_user_get_flags (GaimConvChat *chat, const char *user) |
Get the flags for a user in a chat. | |
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. | |
GaimConvChatBuddy * | gaim_conv_chat_cb_new (const char *name, GaimConvChatBuddyFlags flags) |
Creates a new chat buddy. | |
GaimConvChatBuddy * | gaim_conv_chat_cb_find (GaimConvChat *chat, const char *name) |
Find a chat buddy in a chat. | |
const char * | gaim_conv_chat_cb_get_name (GaimConvChatBuddy *cb) |
Get the name of a chat buddy. | |
void | gaim_conv_chat_cb_destroy (GaimConvChatBuddy *cb) |
Destroys a chat buddy. | |
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 _GaimConvChatBuddy | GaimConvChatBuddy |
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, GAIM_CONV_UPDATE_FEATURES } |
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_ERROR = 0x0200, GAIM_MESSAGE_DELAYED = 0x0400 } |
Flags applicable to a message. More... | |
enum | GaimConvChatBuddyFlags { GAIM_CBFLAGS_NONE = 0x0000, GAIM_CBFLAGS_VOICE = 0x0001, GAIM_CBFLAGS_HALFOP = 0x0002, GAIM_CBFLAGS_OP = 0x0004, GAIM_CBFLAGS_FOUNDER = 0x0008 } |
Flags applicable to users in Chats. 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
enum GaimConversationType |
enum GaimConvUpdateType |
Conversation update type.
enum GaimMessageFlags |
Flags applicable to a message.
Most will have send, recv or system.
enum GaimTypingState |
enum GaimUnseenState |
void gaim_conv_chat_add_user | ( | GaimConvChat * | chat, | |
const char * | user, | |||
const char * | extra_msg, | |||
GaimConvChatBuddyFlags | flags, | |||
gboolean | new_arrival | |||
) |
Adds a user to a chat.
chat | The chat. | |
user | The user to add. | |
extra_msg | An extra message to display with the join message. | |
flags | The users flags | |
new_arrival | Decides whether or not to show a join notice. |
void gaim_conv_chat_add_users | ( | GaimConvChat * | chat, | |
GList * | users, | |||
GList * | flags | |||
) |
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.
chat | The chat. | |
users | The list of users to add. | |
flags | The list of flags for each user. |
void gaim_conv_chat_cb_destroy | ( | GaimConvChatBuddy * | cb | ) |
Destroys a chat buddy.
cb | The chat buddy to destroy |
GaimConvChatBuddy* gaim_conv_chat_cb_find | ( | GaimConvChat * | chat, | |
const char * | name | |||
) |
Find a chat buddy in a chat.
chat | The chat. | |
name | The name of the chat buddy to find. |
const char* gaim_conv_chat_cb_get_name | ( | GaimConvChatBuddy * | cb | ) |
Get the name of a chat buddy.
cb | The chat buddy. |
GaimConvChatBuddy* gaim_conv_chat_cb_new | ( | const char * | name, | |
GaimConvChatBuddyFlags | flags | |||
) |
Creates a new chat buddy.
name | The name. | |
flags | The flags. |
void gaim_conv_chat_clear_users | ( | GaimConvChat * | chat | ) |
Clears all users from a chat.
chat | The chat. |
gboolean gaim_conv_chat_find_user | ( | GaimConvChat * | chat, | |
const char * | user | |||
) |
Finds a user in a chat.
chat | The chat. | |
user | The user to look for. |
GaimConversation* gaim_conv_chat_get_conversation | ( | const GaimConvChat * | chat | ) |
Gets a chat's parent conversation.
chat | The chat. |
int gaim_conv_chat_get_id | ( | const GaimConvChat * | chat | ) |
Returns the chat room's ID.
chat | The chat. |
GList* gaim_conv_chat_get_ignored | ( | const GaimConvChat * | chat | ) |
Returns the list of ignored users in the chat room.
chat | The chat. |
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.
If the user found contains a prefix, such as '+' or '@', this is also returned. The username passed to the function does not have to have this formatting.
chat | The chat. | |
user | The user to check in the ignore list. |
NULL
if not found. const char* gaim_conv_chat_get_nick | ( | GaimConvChat * | chat | ) |
Gets your nickname (used for hilighting) for a chat.
chat | The chat. |
const char* gaim_conv_chat_get_topic | ( | const GaimConvChat * | chat | ) |
Returns the chat room's topic.
chat | The chat. |
GList* gaim_conv_chat_get_users | ( | const GaimConvChat * | chat | ) |
Returns a list of users in the chat room.
chat | The chat. |
gboolean gaim_conv_chat_has_left | ( | GaimConvChat * | chat | ) |
Returns true if we're no longer in this chat, and just left the window open.
chat | The chat. |
TRUE
if we left the chat already, FALSE
if we're still there. void gaim_conv_chat_ignore | ( | GaimConvChat * | chat, | |
const char * | name | |||
) |
Ignores a user in a chat room.
chat | The chat. | |
name | The name of the user. |
gboolean gaim_conv_chat_is_user_ignored | ( | const GaimConvChat * | chat, | |
const char * | user | |||
) |
Returns TRUE
if the specified user is ignored.
chat | The chat. | |
user | The user. |
TRUE
if the user is in the ignore list; FALSE
otherwise. void gaim_conv_chat_left | ( | GaimConvChat * | chat | ) |
Lets the core know we left a chat, without destroying it.
Called from serv_got_chat_left().
chat | The 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.
It is up to the developer to free this list after calling this function.
chat | The chat. | |
user | The user that is being removed. | |
reason | The optional reason given for the removal. Can be NULL . |
void 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.
chat | The chat. | |
users | The users that are being removed. | |
reason | The optional reason given for the removal. Can be NULL . |
void gaim_conv_chat_rename_user | ( | GaimConvChat * | chat, | |
const char * | old_user, | |||
const char * | new_user | |||
) |
Renames a user in a chat.
chat | The chat. | |
old_user | The old username. | |
new_user | The new username. |
void gaim_conv_chat_send | ( | GaimConvChat * | chat, | |
const char * | message | |||
) |
Sends a message to this chat conversation.
chat | The chat. | |
message | The message to send. |
void gaim_conv_chat_set_id | ( | GaimConvChat * | chat, | |
int | id | |||
) |
Sets the chat room's ID.
chat | The chat. | |
id | The ID. |
GList* gaim_conv_chat_set_ignored | ( | GaimConvChat * | chat, | |
GList * | ignored | |||
) |
Sets the list of ignored users in the chat room.
chat | The chat. | |
ignored | The list of ignored users. |
void gaim_conv_chat_set_nick | ( | GaimConvChat * | chat, | |
const char * | nick | |||
) |
Sets your nickname (used for hilighting) for a chat.
chat | The chat. | |
nick | The nick. |
void gaim_conv_chat_set_topic | ( | GaimConvChat * | chat, | |
const char * | who, | |||
const char * | topic | |||
) |
Sets the chat room's topic.
chat | The chat. | |
who | The user that set the topic. | |
topic | The topic. |
GList* gaim_conv_chat_set_users | ( | GaimConvChat * | chat, | |
GList * | users | |||
) |
Sets the list of users in the chat room.
chat | The chat. | |
users | The list of users. |
void gaim_conv_chat_unignore | ( | GaimConvChat * | chat, | |
const char * | name | |||
) |
Unignores a user in a chat room.
chat | The chat. | |
name | The name of the user. |
GaimConvChatBuddyFlags gaim_conv_chat_user_get_flags | ( | GaimConvChat * | chat, | |
const char * | user | |||
) |
Get the flags for a user in a chat.
chat | The chat. | |
user | The user to find the flags for |
void gaim_conv_chat_user_set_flags | ( | GaimConvChat * | chat, | |
const char * | user, | |||
GaimConvChatBuddyFlags | flags | |||
) |
Set a users flags in a chat.
chat | The chat. | |
user | The user to update. | |
flags | The new flags. |
void gaim_conv_chat_write | ( | GaimConvChat * | chat, | |
const char * | who, | |||
const char * | message, | |||
GaimMessageFlags | flags, | |||
time_t | mtime | |||
) |
Writes to a chat.
chat | The chat. | |
who | The user who sent the message. | |
message | The message to write. | |
flags | The flags. | |
mtime | The time the message was sent. |
GaimConversation* gaim_conv_im_get_conversation | ( | const GaimConvIm * | im | ) |
Gets an IM's parent conversation.
im | The IM. |
GaimBuddyIcon* gaim_conv_im_get_icon | ( | const GaimConvIm * | im | ) |
Returns the IM's buddy icon.
im | The IM. |
time_t gaim_conv_im_get_type_again | ( | const GaimConvIm * | im | ) |
Returns the IM's time until it should send another typing notification.
im | The IM. |
guint gaim_conv_im_get_type_again_timeout | ( | const GaimConvIm * | im | ) |
Returns the IM's type again timeout interval.
im | The IM. |
GaimTypingState gaim_conv_im_get_typing_state | ( | const GaimConvIm * | im | ) |
Returns the IM's typing state.
im | The IM. |
guint gaim_conv_im_get_typing_timeout | ( | const GaimConvIm * | im | ) |
Returns the IM's typing timeout.
im | The IM. |
void gaim_conv_im_send | ( | GaimConvIm * | im, | |
const char * | message | |||
) |
Sends a message to this IM conversation.
im | The IM. | |
message | The message to send. |
void gaim_conv_im_set_icon | ( | GaimConvIm * | im, | |
GaimBuddyIcon * | icon | |||
) |
Sets the IM's buddy icon.
This should only be called from within Gaim. You probably want to call gaim_buddy_icon_set_data().
im | The IM. | |
icon | The buddy icon. |
void gaim_conv_im_set_type_again | ( | GaimConvIm * | im, | |
time_t | val | |||
) |
Sets the IM's time until it should send another typing notification.
im | The IM. | |
val | The time. |
void gaim_conv_im_set_typing_state | ( | GaimConvIm * | im, | |
GaimTypingState | state | |||
) |
Sets the IM's typing state.
im | The IM. | |
state | The typing state. |
void gaim_conv_im_start_type_again_timeout | ( | GaimConvIm * | im | ) |
Starts the IM's type again timeout.
im | The IM. |
void gaim_conv_im_start_typing_timeout | ( | GaimConvIm * | im, | |
int | timeout | |||
) |
Starts the IM's typing timeout.
im | The IM. | |
timeout | The timeout. |
void gaim_conv_im_stop_type_again_timeout | ( | GaimConvIm * | im | ) |
Stops the IM's type again timeout.
im | The IM. |
void gaim_conv_im_stop_typing_timeout | ( | GaimConvIm * | im | ) |
Stops the IM's typing timeout.
im | The IM. |
void gaim_conv_im_update_typing | ( | GaimConvIm * | im | ) |
Updates the visual typing notification for an IM conversation.
im | The IM. |
void gaim_conv_im_write | ( | GaimConvIm * | im, | |
const char * | who, | |||
const char * | message, | |||
GaimMessageFlags | flags, | |||
time_t | mtime | |||
) |
Writes to an IM.
im | The IM. | |
who | The user who sent the message. | |
message | The message to write. | |
flags | The message flags. | |
mtime | The time the message was sent. |
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.
id | The unique ID of the placement function. | |
name | The name of the function. | |
fnc | A pointer to the function. |
GaimConvPlacementFunc gaim_conv_placement_get_current_func | ( | void | ) |
Returns the current conversation placement function.
GaimConvPlacementFunc gaim_conv_placement_get_fnc | ( | const char * | id | ) |
Returns a pointer to the conversation placement function at the specified id.
id | The id. |
const char* gaim_conv_placement_get_fnc_id | ( | GaimConvPlacementFunc | fnc | ) |
Returns the id of the specified conversation placement function.
fnc | A pointer to the registered function. |
const char* gaim_conv_placement_get_name | ( | const char * | id | ) |
Returns the name of the conversation placement function at the specified id.
id | The id. |
NULL
if this id is invalid. GList* gaim_conv_placement_get_options | ( | void | ) |
Returns a GList containing the IDs and Names of the registered placement functions.
void gaim_conv_placement_remove_fnc | ( | const char * | id | ) |
Removes a conversation placement function from the list of possible functions.
id | The id of the function. |
void gaim_conv_placement_set_current_func | ( | GaimConvPlacementFunc | func | ) |
Sets the current conversation placement function.
func | The new conversation placement function. |
gboolean gaim_conv_present_error | ( | const char * | who, | |
GaimAccount * | account, | |||
const char * | what | |||
) |
Presents an IM-error to the user.
This is a helper function to find a conversation, write an error to it, and raise the window. If a conversation with this user doesn't already exist, the function will return FALSE and the calling function can attempt to present the error another way (gaim_notify_error, most likely)
who | The user this error is about | |
account | The account this error is on | |
what | The error |
int gaim_conv_window_add_conversation | ( | GaimConvWindow * | win, | |
GaimConversation * | conv | |||
) |
Adds a conversation to this window.
If the conversation already has a parent window, this will do nothing.
win | The window. | |
conv | The conversation. |
void gaim_conv_window_destroy | ( | GaimConvWindow * | win | ) |
Destroys the specified conversation window and all conversations in it.
win | The window to destroy. |
void gaim_conv_window_flash | ( | GaimConvWindow * | win | ) |
Causes the window to flash for IM notification, if the UI supports this.
win | The window. |
GaimConversation* gaim_conv_window_get_active_conversation | ( | const GaimConvWindow * | win | ) |
Returns the active conversation in the window.
win | The window. |
GaimConversation* gaim_conv_window_get_conversation_at | ( | const GaimConvWindow * | win, | |
unsigned int | index | |||
) |
Returns the conversation in the window at the specified index.
If the index is out of range, this returns NULL
.
win | The window. | |
index | The index containing a conversation. |
size_t gaim_conv_window_get_conversation_count | ( | const GaimConvWindow * | win | ) |
Returns the number of conversations in the window.
win | The window. |
GList* gaim_conv_window_get_conversations | ( | const GaimConvWindow * | win | ) |
Returns the list of conversations in the specified window.
win | The window. |
GaimConvWindowUiOps* gaim_conv_window_get_ui_ops | ( | const GaimConvWindow * | win | ) |
Returns the specified window's UI window operations structure.
win | The window. |
gboolean gaim_conv_window_has_focus | ( | GaimConvWindow * | win | ) |
Determines if a conversation window has focus.
win | The window. |
TRUE
if the conversation window has focus, FALSE
if it does not or the UI does not have a concept of window focus void gaim_conv_window_hide | ( | GaimConvWindow * | win | ) |
Hides the specified conversation window.
win | 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.
win | The window. | |
index | The index of the conversation to move. | |
new_index | The new index. |
GaimConvWindow* gaim_conv_window_new | ( | void | ) |
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.
void gaim_conv_window_raise | ( | GaimConvWindow * | win | ) |
Raises the specified conversation window.
win | The window. |
GaimConversation* gaim_conv_window_remove_conversation | ( | GaimConvWindow * | win, | |
unsigned int | index | |||
) |
Removes the conversation at the specified index from the window.
If there is no conversation at this index, this will do nothing.
win | The window. | |
index | The index of the conversation. |
void gaim_conv_window_set_ui_ops | ( | GaimConvWindow * | win, | |
GaimConvWindowUiOps * | ops | |||
) |
Sets the specified window's UI window operations structure.
win | The window. | |
ops | The UI window operations structure. |
void gaim_conv_window_show | ( | GaimConvWindow * | win | ) |
Shows the specified conversation window.
win | The window. |
void gaim_conv_window_switch_conversation | ( | GaimConvWindow * | win, | |
unsigned int | index | |||
) |
Switches the active conversation to the one at the specified index.
If index is out of range, this does nothing.
win | The window. | |
index | The new index. |
void gaim_conversation_autoset_title | ( | GaimConversation * | conv | ) |
Automatically sets the specified conversation's title.
This function takes OPT_IM_ALIAS_TAB into account, as well as the user's alias.
conv | The conversation. |
void gaim_conversation_destroy | ( | GaimConversation * | conv | ) |
Destroys the specified conversation and removes it from the parent window.
If this conversation is the only one contained in the parent window, that window is also destroyed.
conv | The conversation to destroy. |
void gaim_conversation_foreach | ( | void(*)(GaimConversation *conv) | func | ) |
Calls a function on each conversation.
func | The function. |
GaimAccount* gaim_conversation_get_account | ( | const GaimConversation * | conv | ) |
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.
conv | The conversation. |
GaimConvChat* gaim_conversation_get_chat_data | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's chat-specific data.
If the conversation type is not GAIM_CONV_CHAT, this will return NULL
.
conv | The conversation. |
gpointer gaim_conversation_get_data | ( | GaimConversation * | conv, | |
const char * | key | |||
) |
Returns extra data in a conversation.
conv | The conversation. | |
key | The unqiue key. |
GaimConnectionFlags gaim_conversation_get_features | ( | GaimConversation * | conv | ) |
Get the features supported by the given conversation.
conv | The conversation |
GaimConnection* gaim_conversation_get_gc | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's gaim_connection.
This is the same as gaim_conversation_get_user(conv)->gc.
conv | The conversation. |
GString* gaim_conversation_get_history | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's history.
conv | The conversation. |
GaimConvIm* gaim_conversation_get_im_data | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's IM-specific data.
If the conversation type is not GAIM_CONV_IM, this will return NULL
.
conv | The conversation. |
int gaim_conversation_get_index | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's index in the parent window.
conv | The conversation. |
const char* gaim_conversation_get_name | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's name.
conv | The conversation. |
GList* gaim_conversation_get_send_history | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's send history.
conv | The conversation. |
const char* gaim_conversation_get_title | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's title.
conv | The conversation. |
GaimConversationType gaim_conversation_get_type | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's type.
conv | The conversation. |
GaimConversationUiOps* gaim_conversation_get_ui_ops | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's UI operations structure.
conv | The conversation. |
GaimUnseenState gaim_conversation_get_unseen | ( | const GaimConversation * | conv | ) |
Returns the conversation's unseen state.
conv | The conversation. |
GaimConvWindow* gaim_conversation_get_window | ( | const GaimConversation * | conv | ) |
Returns the specified conversation's parent window.
conv | The conversation. |
gboolean gaim_conversation_has_focus | ( | GaimConversation * | conv | ) |
Determines if a conversation has focus.
conv | The conversation. |
TRUE
if the conversation has focus, FALSE
if it does not or the UI does not have a concept of conversation focus gboolean gaim_conversation_is_logging | ( | const GaimConversation * | conv | ) |
Returns whether or not logging is enabled for this conversation.
conv | The conversation. |
TRUE
if logging is enabled, or FALSE
otherwise. GaimConversation* gaim_conversation_new | ( | GaimConversationType | type, | |
GaimAccount * | account, | |||
const char * | name | |||
) |
Creates a new conversation of the specified type.
type | The type of conversation. | |
account | The account opening the conversation window on the gaim user's end. | |
name | The name of the conversation. |
void gaim_conversation_set_account | ( | GaimConversation * | conv, | |
GaimAccount * | account | |||
) |
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.
conv | The conversation. | |
account | The gaim_account. |
void gaim_conversation_set_data | ( | GaimConversation * | conv, | |
const char * | key, | |||
gpointer | data | |||
) |
Sets extra data for a conversation.
conv | The conversation. | |
key | The unique key. | |
data | The data to assign. |
void gaim_conversation_set_features | ( | GaimConversation * | conv, | |
GaimConnectionFlags | features | |||
) |
Set the features as supported for the given conversation.
conv | The conversation | |
features | Bitset defining supported features |
void gaim_conversation_set_history | ( | GaimConversation * | conv, | |
GString * | history | |||
) |
Sets the specified conversation's history.
conv | The conversation. | |
history | The history. |
void gaim_conversation_set_logging | ( | GaimConversation * | conv, | |
gboolean | log | |||
) |
Enables or disables logging for this conversation.
conv | The conversation. | |
log | TRUE if logging should be enabled, or FALSE otherwise. |
void gaim_conversation_set_name | ( | GaimConversation * | conv, | |
const char * | name | |||
) |
Sets the specified conversation's name.
conv | The conversation. | |
name | The conversation's name. |
void gaim_conversation_set_title | ( | GaimConversation * | conv, | |
const char * | title | |||
) |
Sets the specified conversation's title.
conv | The conversation. | |
title | The title. |
void gaim_conversation_set_ui_ops | ( | GaimConversation * | conv, | |
GaimConversationUiOps * | ops | |||
) |
Sets the specified conversation's UI operations structure.
conv | The conversation. | |
ops | The UI conversation operations structure. |
void gaim_conversation_set_unseen | ( | GaimConversation * | conv, | |
GaimUnseenState | state | |||
) |
Sets the conversation's unseen state.
conv | The conversation. | |
state | The new unseen state. |
void gaim_conversation_update | ( | GaimConversation * | conv, | |
GaimConvUpdateType | type | |||
) |
Updates the visual status and UI of a conversation.
conv | The conversation. | |
type | The update type. |
void gaim_conversation_update_progress | ( | GaimConversation * | conv, | |
float | percent | |||
) |
Updates the progress bar on a conversation window (if one exists in the UI).
This is used for loading images typically.
conv | The conversation. | |
percent | The percentage. |
void gaim_conversation_write | ( | GaimConversation * | conv, | |
const char * | who, | |||
const char * | message, | |||
GaimMessageFlags | flags, | |||
time_t | mtime | |||
) |
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."
conv | The conversation. | |
who | The user who sent the message. | |
message | The message. | |
flags | The message flags. | |
mtime | The time the message was sent. |
void* gaim_conversations_get_handle | ( | void | ) |
Returns the conversation subsystem handle.
GaimConvWindowUiOps* gaim_conversations_get_win_ui_ops | ( | void | ) |
Returns the gaim window UI operations structure to be used in new windows.
void gaim_conversations_set_win_ui_ops | ( | GaimConvWindowUiOps * | ops | ) |
Sets the UI operations structure to be used in all gaim conversation windows.
ops | The UI operations structure. |
GaimConversation* gaim_find_chat | ( | const GaimConnection * | gc, | |
int | id | |||
) |
Finds a chat with the specified chat ID.
gc | The gaim_connection. | |
id | The chat ID. |
GaimConversation* gaim_find_conversation | ( | const char * | name | ) |
Finds the conversation with the specified name.
name | The name of the conversation. |
NULL
otherwise. GaimConversation* gaim_find_conversation_with_account | ( | const char * | name, | |
const GaimAccount * | account | |||
) |
Finds a conversation with the specified name and user.
name | The name of the conversation. | |
account | The gaim_account associated with the conversation. |
NULL
otherwise. GList* gaim_get_chats | ( | void | ) |
Returns a list of all chats.
GList* gaim_get_conversations | ( | void | ) |
Returns a list of all conversations.
This list includes both IMs and chats.
GaimConvWindow* gaim_get_first_window_with_type | ( | GaimConversationType | type | ) |
Returns the first window containing a conversation of the specified type.
type | The conversation type. |
NULL
if not found. GList* gaim_get_ims | ( | void | ) |
Returns a list of all IMs.
GaimConvWindow* gaim_get_last_window_with_type | ( | GaimConversationType | type | ) |
Returns the last window containing a conversation of the specified type.
type | The conversation type. |
NULL
if not found. GList* gaim_get_windows | ( | void | ) |
Returns a list of all windows.