conversation.h File Reference

Conversation API. 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))
GaimConversationgaim_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.
GaimConversationUiOpsgaim_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.
GaimConvWindowgaim_conversation_get_window (const GaimConversation *conv)
 Returns the specified conversation's parent window.
GaimConvImgaim_conversation_get_im_data (const GaimConversation *conv)
 Returns the specified conversation's IM-specific data.
GaimConvChatgaim_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.
GaimConversationgaim_find_conversation (const char *name)
 Finds the conversation with the specified name.
GaimConversationgaim_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.

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...

Functions

Conversation Window API
GaimConvWindowgaim_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.
GaimConvWindowUiOpsgaim_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.
GaimConversationgaim_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.
GaimConversationgaim_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.
GaimConversationgaim_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.
GaimConvWindowgaim_get_first_window_with_type (GaimConversationType type)
 Returns the first window containing a conversation of the specified type.
GaimConvWindowgaim_get_last_window_with_type (GaimConversationType type)
 Returns the last window containing a conversation of the specified type.
IM Conversation API
GaimConversationgaim_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
GaimConversationgaim_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.
GaimConversationgaim_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.
GaimConvChatBuddygaim_conv_chat_cb_new (const char *name, GaimConvChatBuddyFlags flags)
 Creates a new chat buddy.
GaimConvChatBuddygaim_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.
GaimConvWindowUiOpsgaim_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.


Detailed Description

Conversation API.

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

See also:
Conversation Signals

Enumeration Type Documentation

enum GaimConvChatBuddyFlags

Flags applicable to users in Chats.

Enumerator:
GAIM_CBFLAGS_NONE  No flags.
GAIM_CBFLAGS_VOICE  Voiced user or "Participant".
GAIM_CBFLAGS_HALFOP  Half-op.
GAIM_CBFLAGS_OP  Channel Op or Moderator.
GAIM_CBFLAGS_FOUNDER  Channel Founder.

enum GaimConversationType

A type of conversation.

Enumerator:
GAIM_CONV_UNKNOWN  Unknown conversation type.
GAIM_CONV_IM  Instant Message.
GAIM_CONV_CHAT  Chat room.
GAIM_CONV_MISC  A misc.

conversation.

enum GaimConvUpdateType

Conversation update type.

Enumerator:
GAIM_CONV_UPDATE_ADD  The buddy associated with the conversation was added.
GAIM_CONV_UPDATE_REMOVE  The buddy associated with the conversation was removed.
GAIM_CONV_UPDATE_ACCOUNT  The gaim_account was changed.
GAIM_CONV_UPDATE_TYPING  The typing state was updated.
GAIM_CONV_UPDATE_UNSEEN  The unseen state was updated.
GAIM_CONV_UPDATE_LOGGING  Logging for this conversation was enabled or disabled.
GAIM_CONV_UPDATE_TOPIC  The topic for a chat was updated.
GAIM_CONV_ACCOUNT_ONLINE  One of the user's accounts went online.
GAIM_CONV_ACCOUNT_OFFLINE  One of the user's accounts went offline.
GAIM_CONV_UPDATE_AWAY  The other user went away.
GAIM_CONV_UPDATE_ICON  The other user's buddy icon changed.
GAIM_CONV_UPDATE_FEATURES  The features for a chat have changed.

enum GaimMessageFlags

Flags applicable to a message.

Most will have send, recv or system.

Enumerator:
GAIM_MESSAGE_SEND  Outgoing message.
GAIM_MESSAGE_RECV  Incoming message.
GAIM_MESSAGE_SYSTEM  System message.
GAIM_MESSAGE_AUTO_RESP  Auto response.
GAIM_MESSAGE_COLORIZE  Colorize nicks.
GAIM_MESSAGE_NICK  Contains your nick.
GAIM_MESSAGE_NO_LOG  Do not log.
GAIM_MESSAGE_WHISPER  Whispered message.
GAIM_MESSAGE_ERROR  Error message.
GAIM_MESSAGE_DELAYED  Delayed message.

enum GaimTypingState

The typing state of a user.

Enumerator:
GAIM_NOT_TYPING  Not typing.
GAIM_TYPING  Currently typing.
GAIM_TYPED  Stopped typing momentarily.

enum GaimUnseenState

Unseen text states.

Enumerator:
GAIM_UNSEEN_NONE  No unseen text in the conversation.
GAIM_UNSEEN_TEXT  Unseen text in the conversation.
GAIM_UNSEEN_NICK  Unseen text and the nick was said.
GAIM_UNSEEN_EVENT  Unseen events in the conversation.


Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
cb The chat buddy to destroy

GaimConvChatBuddy* gaim_conv_chat_cb_find ( GaimConvChat chat,
const char *  name 
)

Find a chat buddy in a chat.

Parameters:
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.

Parameters:
cb The chat buddy.
Returns:
The name of the chat buddy.

GaimConvChatBuddy* gaim_conv_chat_cb_new ( const char *  name,
GaimConvChatBuddyFlags  flags 
)

Creates a new chat buddy.

Parameters:
name The name.
flags The flags.
Returns:
The new chat buddy

void gaim_conv_chat_clear_users ( GaimConvChat chat  ) 

Clears all users from a chat.

Parameters:
chat The chat.

gboolean gaim_conv_chat_find_user ( GaimConvChat chat,
const char *  user 
)

Finds a user in a chat.

Parameters:
chat The chat.
user The user to look for.
Returns:
TRUE if the user is in the chat, FALSE if not

GaimConversation* gaim_conv_chat_get_conversation ( const GaimConvChat chat  ) 

Gets a chat's parent conversation.

Parameters:
chat The chat.
Returns:
The parent conversation.

int gaim_conv_chat_get_id ( const GaimConvChat chat  ) 

Returns the chat room's ID.

Parameters:
chat The chat.
Returns:
The ID.

GList* gaim_conv_chat_get_ignored ( const GaimConvChat chat  ) 

Returns the list of ignored users in the chat room.

Parameters:
chat The chat.
Returns:
The list of ignored users.

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.

Parameters:
chat The chat.
user The user to check in the ignore list.
Returns:
The ignored user if found, complete with prefixes, or NULL if not found.

const char* gaim_conv_chat_get_nick ( GaimConvChat chat  ) 

Gets your nickname (used for hilighting) for a chat.

Parameters:
chat The chat.
Returns:
The nick.

const char* gaim_conv_chat_get_topic ( const GaimConvChat chat  ) 

Returns the chat room's topic.

Parameters:
chat The chat.
Returns:
The chat's topic.

GList* gaim_conv_chat_get_users ( const GaimConvChat chat  ) 

Returns a list of users in the chat room.

Parameters:
chat The chat.
Returns:
The list of users.

gboolean gaim_conv_chat_has_left ( GaimConvChat chat  ) 

Returns true if we're no longer in this chat, and just left the window open.

Parameters:
chat The chat.
Returns:
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.

Parameters:
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.

Parameters:
chat The chat.
user The user.
Returns:
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().

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
chat The chat.
message The message to send.

void gaim_conv_chat_set_id ( GaimConvChat chat,
int  id 
)

Sets the chat room's ID.

Parameters:
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.

Parameters:
chat The chat.
ignored The list of ignored users.
Returns:
The list passed.

void gaim_conv_chat_set_nick ( GaimConvChat chat,
const char *  nick 
)

Sets your nickname (used for hilighting) for a chat.

Parameters:
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.

Parameters:
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.

Note:
Calling this function will not update the display of the users. Please use gaim_conv_chat_add_user(), gaim_conv_chat_add_users(), gaim_conv_chat_remove_user(), and gaim_conv_chat_remove_users() instead.
Parameters:
chat The chat.
users The list of users.
Returns:
The list passed.

void gaim_conv_chat_unignore ( GaimConvChat chat,
const char *  name 
)

Unignores a user in a chat room.

Parameters:
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.

Parameters:
chat The chat.
user The user to find the flags for
Returns:
The flags for the user

void gaim_conv_chat_user_set_flags ( GaimConvChat chat,
const char *  user,
GaimConvChatBuddyFlags  flags 
)

Set a users flags in a chat.

Parameters:
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.

Parameters:
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.

Parameters:
im The IM.
Returns:
The parent conversation.

GaimBuddyIcon* gaim_conv_im_get_icon ( const GaimConvIm im  ) 

Returns the IM's buddy icon.

Parameters:
im The IM.
Returns:
The buddy icon.

time_t gaim_conv_im_get_type_again ( const GaimConvIm im  ) 

Returns the IM's time until it should send another typing notification.

Parameters:
im The IM.
Returns:
The time.

guint gaim_conv_im_get_type_again_timeout ( const GaimConvIm im  ) 

Returns the IM's type again timeout interval.

Parameters:
im The IM.
Returns:
The type again timeout interval.

GaimTypingState gaim_conv_im_get_typing_state ( const GaimConvIm im  ) 

Returns the IM's typing state.

Parameters:
im The IM.
Returns:
The IM's typing state.

guint gaim_conv_im_get_typing_timeout ( const GaimConvIm im  ) 

Returns the IM's typing timeout.

Parameters:
im The IM.
Returns:
The timeout.

void gaim_conv_im_send ( GaimConvIm im,
const char *  message 
)

Sends a message to this IM conversation.

Parameters:
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().

Parameters:
im The IM.
icon The buddy icon.
See also:
gaim_buddy_icon_set_data()

void gaim_conv_im_set_type_again ( GaimConvIm im,
time_t  val 
)

Sets the IM's time until it should send another typing notification.

Parameters:
im The IM.
val The time.

void gaim_conv_im_set_typing_state ( GaimConvIm im,
GaimTypingState  state 
)

Sets the IM's typing state.

Parameters:
im The IM.
state The typing state.

void gaim_conv_im_start_type_again_timeout ( GaimConvIm im  ) 

Starts the IM's type again timeout.

Parameters:
im The IM.

void gaim_conv_im_start_typing_timeout ( GaimConvIm im,
int  timeout 
)

Starts the IM's typing timeout.

Parameters:
im The IM.
timeout The timeout.

void gaim_conv_im_stop_type_again_timeout ( GaimConvIm im  ) 

Stops the IM's type again timeout.

Parameters:
im The IM.

void gaim_conv_im_stop_typing_timeout ( GaimConvIm im  ) 

Stops the IM's typing timeout.

Parameters:
im The IM.

void gaim_conv_im_update_typing ( GaimConvIm im  ) 

Updates the visual typing notification for an IM conversation.

Parameters:
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.

Parameters:
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.

Parameters:
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.

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.

Parameters:
id The id.
Returns:
A pointer to the function.

const char* gaim_conv_placement_get_fnc_id ( GaimConvPlacementFunc  fnc  ) 

Returns the id of the specified conversation placement function.

Parameters:
fnc A pointer to the registered function.
Returns:
The id of the conversation, or NULL if the function is not registered.

const char* gaim_conv_placement_get_name ( const char *  id  ) 

Returns the name of the conversation placement function at the specified id.

Parameters:
id The id.
Returns:
The name of the function, or 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.

Returns:
The list of IDs and names.

void gaim_conv_placement_remove_fnc ( const char *  id  ) 

Removes a conversation placement function from the list of possible functions.

Parameters:
id The id of the function.

void gaim_conv_placement_set_current_func ( GaimConvPlacementFunc  func  ) 

Sets the current conversation placement function.

Parameters:
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)

Parameters:
who The user this error is about
account The account this error is on
what The error
Returns:
TRUE if the error was presented, else FALSE

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.

Parameters:
win The window.
conv The conversation.
Returns:
The new index of the conversation in the window.

void gaim_conv_window_destroy ( GaimConvWindow win  ) 

Destroys the specified conversation window and all conversations in it.

Parameters:
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.

Parameters:
win The window.

GaimConversation* gaim_conv_window_get_active_conversation ( const GaimConvWindow win  ) 

Returns the active conversation in the window.

Parameters:
win The window.
Returns:
The active conversation.

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.

Parameters:
win The window.
index The index containing a conversation.
Returns:
The conversation at the specified index.

size_t gaim_conv_window_get_conversation_count ( const GaimConvWindow win  ) 

Returns the number of conversations in the window.

Parameters:
win The window.
Returns:
The number of conversations.

GList* gaim_conv_window_get_conversations ( const GaimConvWindow win  ) 

Returns the list of conversations in the specified window.

Parameters:
win The window.
Returns:
The list of conversations.

GaimConvWindowUiOps* gaim_conv_window_get_ui_ops ( const GaimConvWindow win  ) 

Returns the specified window's UI window operations structure.

Parameters:
win The window.
Returns:
The UI window operations structure.

gboolean gaim_conv_window_has_focus ( GaimConvWindow win  ) 

Determines if a conversation window has focus.

Parameters:
win The window.
Returns:
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.

Parameters:
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.

Parameters:
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.

Returns:
The new conversation window.

void gaim_conv_window_raise ( GaimConvWindow win  ) 

Raises the specified conversation window.

Parameters:
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.

Parameters:
win The window.
index The index of the conversation.
Returns:
The conversation removed.

void gaim_conv_window_set_ui_ops ( GaimConvWindow win,
GaimConvWindowUiOps ops 
)

Sets the specified window's UI window operations structure.

Parameters:
win The window.
ops The UI window operations structure.

void gaim_conv_window_show ( GaimConvWindow win  ) 

Shows the specified conversation window.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
conv The conversation to destroy.

void gaim_conversation_foreach ( void(*)(GaimConversation *conv)  func  ) 

Calls a function on each conversation.

Parameters:
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.

Parameters:
conv The conversation.
Returns:
The conversation's gaim_account.

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.

Parameters:
conv The conversation.
Returns:
The chat-specific data.

gpointer gaim_conversation_get_data ( GaimConversation conv,
const char *  key 
)

Returns extra data in a conversation.

Parameters:
conv The conversation.
key The unqiue key.
Returns:
The data associated with the key.

GaimConnectionFlags gaim_conversation_get_features ( GaimConversation conv  ) 

Get the features supported by the given conversation.

Parameters:
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.

Parameters:
conv The conversation.
Returns:
The conversation's gaim_connection.

GString* gaim_conversation_get_history ( const GaimConversation conv  ) 

Returns the specified conversation's history.

Parameters:
conv The conversation.
Returns:
The conversation's history.

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.

Parameters:
conv The conversation.
Returns:
The IM-specific data.

int gaim_conversation_get_index ( const GaimConversation conv  ) 

Returns the specified conversation's index in the parent window.

Parameters:
conv The conversation.
Returns:
The current index in the parent window.

const char* gaim_conversation_get_name ( const GaimConversation conv  ) 

Returns the specified conversation's name.

Parameters:
conv The conversation.
Returns:
The conversation's name.

GList* gaim_conversation_get_send_history ( const GaimConversation conv  ) 

Returns the specified conversation's send history.

Parameters:
conv The conversation.
Returns:
The conversation's send history.

const char* gaim_conversation_get_title ( const GaimConversation conv  ) 

Returns the specified conversation's title.

Parameters:
conv The conversation.
Returns:
The title.

GaimConversationType gaim_conversation_get_type ( const GaimConversation conv  ) 

Returns the specified conversation's type.

Parameters:
conv The conversation.
Returns:
The conversation's type.

GaimConversationUiOps* gaim_conversation_get_ui_ops ( const GaimConversation conv  ) 

Returns the specified conversation's UI operations structure.

Parameters:
conv The conversation.
Returns:
The operations structure.

GaimUnseenState gaim_conversation_get_unseen ( const GaimConversation conv  ) 

Returns the conversation's unseen state.

Parameters:
conv The conversation.
Returns:
The conversation's unseen state.

GaimConvWindow* gaim_conversation_get_window ( const GaimConversation conv  ) 

Returns the specified conversation's parent window.

Parameters:
conv The conversation.
Returns:
The conversation's parent window.

gboolean gaim_conversation_has_focus ( GaimConversation conv  ) 

Determines if a conversation has focus.

Parameters:
conv The conversation.
Returns:
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.

Parameters:
conv The conversation.
Returns:
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.

Parameters:
type The type of conversation.
account The account opening the conversation window on the gaim user's end.
name The name of the conversation.
Returns:
The new 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.

Parameters:
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.

Parameters:
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.

Parameters:
conv The conversation
features Bitset defining supported features

void gaim_conversation_set_history ( GaimConversation conv,
GString *  history 
)

Sets the specified conversation's history.

Parameters:
conv The conversation.
history The history.

void gaim_conversation_set_logging ( GaimConversation conv,
gboolean  log 
)

Enables or disables logging for this conversation.

Parameters:
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.

Parameters:
conv The conversation.
name The conversation's name.

void gaim_conversation_set_title ( GaimConversation conv,
const char *  title 
)

Sets the specified conversation's title.

Parameters:
conv The conversation.
title The title.

void gaim_conversation_set_ui_ops ( GaimConversation conv,
GaimConversationUiOps ops 
)

Sets the specified conversation's UI operations structure.

Parameters:
conv The conversation.
ops The UI conversation operations structure.

void gaim_conversation_set_unseen ( GaimConversation conv,
GaimUnseenState  state 
)

Sets the conversation's unseen state.

Parameters:
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.

Parameters:
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.

Parameters:
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."

Parameters:
conv The conversation.
who The user who sent the message.
message The message.
flags The message flags.
mtime The time the message was sent.
See also:
gaim_conv_im_write()

gaim_conv_chat_write()

void* gaim_conversations_get_handle ( void   ) 

Returns the conversation subsystem handle.

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.

Returns:
A filled-out GaimConvWindowUiOps structure.

void gaim_conversations_set_win_ui_ops ( GaimConvWindowUiOps ops  ) 

Sets the UI operations structure to be used in all gaim conversation windows.

Parameters:
ops The UI operations structure.

GaimConversation* gaim_find_chat ( const GaimConnection *  gc,
int  id 
)

Finds a chat with the specified chat ID.

Parameters:
gc The gaim_connection.
id The chat ID.
Returns:
The chat conversation.

GaimConversation* gaim_find_conversation ( const char *  name  ) 

Finds the conversation with the specified name.

Parameters:
name The name of the conversation.
Returns:
The conversation if found, or NULL otherwise.

GaimConversation* gaim_find_conversation_with_account ( const char *  name,
const GaimAccount *  account 
)

Finds a conversation with the specified name and user.

Parameters:
name The name of the conversation.
account The gaim_account associated with the conversation.
Returns:
The conversation if found, or NULL otherwise.

GList* gaim_get_chats ( void   ) 

Returns a list of all chats.

Returns:
A GList of all chats.

GList* gaim_get_conversations ( void   ) 

Returns a list of all conversations.

This list includes both IMs and chats.

Returns:
A GList of all conversations.

GaimConvWindow* gaim_get_first_window_with_type ( GaimConversationType  type  ) 

Returns the first window containing a conversation of the specified type.

Parameters:
type The conversation type.
Returns:
The window if found, or NULL if not found.

GList* gaim_get_ims ( void   ) 

Returns a list of all IMs.

Returns:
A GList of all IMs.

GaimConvWindow* gaim_get_last_window_with_type ( GaimConversationType  type  ) 

Returns the last window containing a conversation of the specified type.

Parameters:
type The conversation type.
Returns:
The window if found, or NULL if not found.

GList* gaim_get_windows ( void   ) 

Returns a list of all windows.

Returns:
A list of windows.


Generated on Sun Feb 18 07:36:23 2007 for gaim by  doxygen 1.5.1