Thu, 30 Jan 2003 01:43:35 +0000
[gaim-migrate @ 4740]
Renamed _ops to _ui_ops for conversation-related stuff. Trying to
standardize on a naming scheme before I do anything else.
| 4359 | 1 | /** |
| 2 | * @file conversation.h Conversation API | |
| 3 | * | |
| 4 | * gaim | |
| 5 | * | |
| 6 | * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | * | |
| 22 | */ | |
| 23 | ||
| 24 | #ifndef _CONVERSATION_H_ | |
| 25 | #define _CONVERSATION_H_ | |
| 26 | ||
| 27 | /**************************************************************************/ | |
| 28 | /** Data Structures */ | |
| 29 | /**************************************************************************/ | |
| 30 | ||
| 31 | typedef enum _GaimConversationType GaimConversationType; | |
| 32 | typedef enum _GaimUnseenState GaimUnseenState; | |
| 33 | typedef enum _GaimConvUpdateType GaimConvUpdateType; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
34 | struct gaim_window_ui_ops; |
| 4359 | 35 | struct gaim_window; |
| 36 | struct gaim_conversation; | |
| 37 | struct gaim_im; | |
| 38 | struct gaim_chat; | |
| 39 | ||
| 40 | /** | |
| 41 | * A type of conversation. | |
| 42 | */ | |
| 43 | enum _GaimConversationType | |
| 44 | { | |
| 45 | GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
| 46 | GAIM_CONV_IM, /**< Instant Message. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
47 | GAIM_CONV_CHAT, /**< Chat room. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
48 | GAIM_CONV_MISC /**< A misc. conversation. */ |
| 4359 | 49 | }; |
| 50 | ||
| 51 | /** | |
| 52 | * Unseen text states. | |
| 53 | */ | |
| 54 | enum _GaimUnseenState | |
| 55 | { | |
| 56 | GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
| 57 | GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
| 58 | GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ | |
| 59 | }; | |
| 60 | ||
| 61 | /** | |
| 62 | * Conversation update type. | |
| 63 | */ | |
| 64 | enum _GaimConvUpdateType | |
| 65 | { | |
| 66 | GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
| 67 | was added. */ | |
| 68 | GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation | |
| 69 | was removed. */ | |
| 70 | GAIM_CONV_UPDATE_USER, /**< The aim_user was changed. */ | |
| 71 | GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ | |
| 72 | GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 73 | GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 74 | enabled or disabled. */ | |
| 75 | GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ | |
| 76 | ||
| 77 | /* | |
| 78 | * XXX These need to go when we implement a more generic core/UI event | |
| 79 | * system. | |
| 80 | */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
81 | GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
82 | GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
83 | GAIM_CONV_UPDATE_AWAY /**< The other user went away. */ |
| 4359 | 84 | }; |
| 85 | ||
| 86 | /* Yeah, this has to be included here. Ugh. */ | |
| 87 | #include "gaim.h" | |
| 88 | ||
| 89 | /** | |
| 90 | * Conversation window operations. | |
| 91 | * | |
| 92 | * Any UI representing a window must assign a filled-out gaim_window_ops | |
| 93 | * structure to the gaim_window. | |
| 94 | */ | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
95 | struct gaim_window_ui_ops |
| 4359 | 96 | { |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
97 | struct gaim_conversation_ui_ops *(*get_conversation_ui_ops)(void); |
| 4359 | 98 | |
| 99 | void (*new_window)(struct gaim_window *win); | |
| 100 | void (*destroy_window)(struct gaim_window *win); | |
| 101 | ||
| 102 | void (*show)(struct gaim_window *win); | |
| 103 | void (*hide)(struct gaim_window *win); | |
| 104 | void (*raise)(struct gaim_window *win); | |
| 105 | void (*flash)(struct gaim_window *win); | |
| 106 | ||
| 107 | void (*switch_conversation)(struct gaim_window *win, unsigned int index); | |
| 108 | void (*add_conversation)(struct gaim_window *win, | |
| 109 | struct gaim_conversation *conv); | |
| 110 | void (*remove_conversation)(struct gaim_window *win, | |
| 111 | struct gaim_conversation *conv); | |
| 112 | void (*move_conversation)(struct gaim_window *win, | |
| 113 | struct gaim_conversation *conv, | |
| 114 | unsigned int newIndex); | |
| 115 | int (*get_active_index)(const struct gaim_window *win); | |
| 116 | }; | |
| 117 | ||
| 118 | /** | |
| 119 | * Conversation operations and events. | |
| 120 | * | |
| 121 | * Any UI representing a conversation must assign a filled-out | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
122 | * gaim_conversation_ui_ops structure to the gaim_conversation. |
| 4359 | 123 | */ |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
124 | struct gaim_conversation_ui_ops |
| 4359 | 125 | { |
| 126 | void (*destroy_conversation)(struct gaim_conversation *conv); | |
| 127 | void (*write_chat)(struct gaim_conversation *conv, const char *who, | |
| 128 | const char *message, int flags, time_t mtime); | |
| 129 | void (*write_im)(struct gaim_conversation *conv, const char *who, | |
| 130 | const char *message, size_t len, int flags, time_t mtime); | |
| 131 | void (*write_conv)(struct gaim_conversation *conv, const char *who, | |
| 132 | const char *message, size_t length, int flags, | |
| 133 | time_t mtime); | |
| 134 | ||
| 135 | void (*chat_add_user)(struct gaim_conversation *conv, const char *user); | |
| 136 | void (*chat_rename_user)(struct gaim_conversation *conv, | |
| 137 | const char *old_name, const char *new_name); | |
| 138 | void (*chat_remove_user)(struct gaim_conversation *conv, const char *user); | |
| 139 | ||
| 140 | void (*set_title)(struct gaim_conversation *conv, | |
| 141 | const char *title); | |
| 142 | void (*update_progress)(struct gaim_conversation *conv, float percent); | |
| 143 | ||
| 144 | /* Events */ | |
| 145 | void (*updated)(struct gaim_conversation *conv, GaimConvUpdateType type); | |
| 146 | }; | |
| 147 | ||
| 148 | /** | |
| 149 | * A core representation of a graphical window containing one or more | |
| 150 | * conversations. | |
| 151 | */ | |
| 152 | struct gaim_window | |
| 153 | { | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
154 | GList *conversations; /**< The conversations in the window. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
155 | size_t conversation_count; /**< The number of conversations. */ |
| 4359 | 156 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
157 | struct gaim_window_ui_ops *ui_ops; /**< UI-specific window operations. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
158 | void *ui_data; /**< UI-specific data. */ |
| 4359 | 159 | }; |
| 160 | ||
| 161 | /** | |
| 162 | * Data specific to Instant Messages. | |
| 163 | */ | |
| 164 | struct gaim_im | |
| 165 | { | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
166 | struct gaim_conversation *conv; /**< The parent conversation. */ |
| 4359 | 167 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
168 | int typing_state; /**< The current typing state. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
169 | guint typing_timeout; /**< The typing timer handle. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
170 | time_t type_again; /**< The type again time. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
171 | guint type_again_timeout; /**< The type again timer handle. */ |
| 4359 | 172 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
173 | GSList *images; /**< A list of images in the IM. */ |
| 4359 | 174 | }; |
| 175 | ||
| 176 | /** | |
| 177 | * Data specific to Chats. | |
| 178 | */ | |
| 179 | struct gaim_chat | |
| 180 | { | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
181 | struct gaim_conversation *conv; /**< The parent conversation. */ |
| 4359 | 182 | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
183 | GList *in_room; /**< The users in the room. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
184 | GList *ignored; /**< Ignored users. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
185 | char *who; /**< The person who set the topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
186 | char *topic; /**< The topic. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
187 | int id; /**< The chat ID. */ |
| 4359 | 188 | }; |
| 189 | ||
| 190 | /** | |
| 191 | * A core representation of a conversation between two or more people. | |
| 192 | * | |
| 193 | * The conversation can be an IM or a chat. Each conversation is kept | |
| 194 | * in a gaim_window and has a UI representation. | |
| 195 | */ | |
| 196 | struct gaim_conversation | |
| 197 | { | |
| 198 | GaimConversationType type; /**< The type of conversation. */ | |
| 199 | ||
| 200 | struct aim_user *user; /**< The user using this conversation. */ | |
| 201 | struct gaim_window *window; /**< The parent window. */ | |
| 202 | ||
| 203 | int conversation_pos; /**< The position in the window's list. */ | |
| 204 | ||
| 205 | char *name; /**< The name of the conversation. */ | |
| 206 | char *title; /**< The window title. */ | |
| 207 | ||
| 208 | gboolean logging; /**< The status of logging. */ | |
| 209 | ||
| 210 | GList *send_history; /**< The send history. */ | |
| 211 | GString *history; /**< The conversation history. */ | |
| 212 | ||
| 213 | GaimUnseenState unseen; /**< The unseen tab state. */ | |
| 214 | ||
| 215 | union | |
| 216 | { | |
| 217 | struct gaim_im *im; /**< IM-specific data. */ | |
| 218 | struct gaim_chat *chat; /**< Chat-specific data. */ | |
|
4378
3bef342997ef
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
219 | void *misc; /**< Misc. data. */ |
| 4359 | 220 | |
| 221 | } u; | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
222 | |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
223 | struct gaim_conversation_ui_ops *ui_ops; /**< UI-specific operations. */ |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
224 | void *ui_data; /**< UI-specific data. */ |
| 4359 | 225 | }; |
| 226 | ||
| 227 | ||
| 228 | /**************************************************************************/ | |
| 229 | /** @name Conversation Window API */ | |
| 230 | /**************************************************************************/ | |
| 231 | /*@{*/ | |
| 232 | ||
| 233 | /** | |
| 234 | * Creates a new conversation window. | |
| 235 | * | |
| 236 | * This window is added to the list of windows, but is not shown until | |
| 237 | * gaim_window_show() is called. | |
| 238 | * | |
| 239 | * @return The new conversation window. | |
| 240 | */ | |
| 241 | struct gaim_window *gaim_window_new(void); | |
| 242 | ||
| 243 | /** | |
| 244 | * Destroys the specified conversation window and all conversations in it. | |
| 245 | * | |
| 246 | * @param win The window to destroy. | |
| 247 | */ | |
| 248 | void gaim_window_destroy(struct gaim_window *win); | |
| 249 | ||
| 250 | /** | |
| 251 | * Shows the specified conversation window. | |
| 252 | * | |
| 253 | * @param win The window. | |
| 254 | */ | |
| 255 | void gaim_window_show(struct gaim_window *win); | |
| 256 | ||
| 257 | /** | |
| 258 | * Hides the specified conversation window. | |
| 259 | * | |
| 260 | * @param win The window. | |
| 261 | */ | |
| 262 | void gaim_window_hide(struct gaim_window *win); | |
| 263 | ||
| 264 | /** | |
| 265 | * Raises the specified conversation window. | |
| 266 | * | |
| 267 | * @param win The window. | |
| 268 | */ | |
| 269 | void gaim_window_raise(struct gaim_window *win); | |
| 270 | ||
| 271 | /** | |
| 272 | * Causes the window to flash for IM notification, if the UI supports this. | |
| 273 | * | |
| 274 | * @param win The window. | |
| 275 | */ | |
| 276 | void gaim_window_flash(struct gaim_window *win); | |
| 277 | ||
| 278 | /** | |
| 279 | * Sets the specified window's UI window operations structure. | |
| 280 | * | |
| 281 | * @param win The window. | |
| 282 | * @param ops The UI window operations structure. | |
| 283 | */ | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
284 | void gaim_window_set_ui_ops(struct gaim_window *win, |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
285 | struct gaim_window_ui_ops *ops); |
| 4359 | 286 | |
| 287 | /** | |
| 288 | * Returns the specified window's UI window operations structure. | |
| 289 | * | |
| 290 | * @param win The window. | |
| 291 | * | |
| 292 | * @return The UI window operations structure. | |
| 293 | */ | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
294 | struct gaim_window_ui_ops *gaim_window_get_ui_ops( |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
295 | const struct gaim_window *win); |
| 4359 | 296 | |
| 297 | /** | |
| 298 | * Adds a conversation to this window. | |
| 299 | * | |
| 300 | * If the conversation already has a parent window, this will do nothing. | |
| 301 | * | |
| 302 | * @param win The window. | |
| 303 | * @param conv The conversation. | |
| 304 | * | |
| 305 | * @return The new index of the conversation in the window. | |
| 306 | */ | |
| 307 | int gaim_window_add_conversation(struct gaim_window *win, | |
| 308 | struct gaim_conversation *conv); | |
| 309 | ||
| 310 | /** | |
| 311 | * Removes the conversation at the specified index from the window. | |
| 312 | * | |
| 313 | * If there is no conversation at this index, this will do nothing. | |
| 314 | * | |
| 315 | * @param win The window. | |
| 316 | * @param index The index of the conversation. | |
| 317 | * | |
| 318 | * @return The conversation removed. | |
| 319 | */ | |
| 320 | struct gaim_conversation *gaim_window_remove_conversation( | |
| 321 | struct gaim_window *win, unsigned int index); | |
| 322 | ||
| 323 | /** | |
| 324 | * Moves the conversation at the specified index in a window to a new index. | |
| 325 | * | |
| 326 | * @param win The window. | |
| 327 | * @param index The index of the conversation to move. | |
| 328 | * @param new_index The new index. | |
| 329 | */ | |
| 330 | void gaim_window_move_conversation(struct gaim_window *win, | |
| 331 | unsigned int index, unsigned int new_index); | |
| 332 | ||
| 333 | /** | |
| 334 | * Returns the conversation in the window at the specified index. | |
| 335 | * | |
| 336 | * If the index is out of range, this returns @c NULL. | |
| 337 | * | |
| 338 | * @param win The window. | |
| 339 | * @param index The index containing a conversation. | |
| 340 | * | |
| 341 | * @return The conversation at the specified index. | |
| 342 | */ | |
| 343 | struct gaim_conversation *gaim_window_get_conversation_at( | |
| 344 | const struct gaim_window *win, unsigned int index); | |
| 345 | ||
| 346 | /** | |
| 347 | * Returns the number of conversations in the window. | |
| 348 | * | |
| 349 | * @param win The window. | |
| 350 | * | |
| 351 | * @return The number of conversations. | |
| 352 | */ | |
| 353 | size_t gaim_window_get_conversation_count(const struct gaim_window *win); | |
| 354 | ||
| 355 | /** | |
| 356 | * Switches the active conversation to the one at the specified index. | |
| 357 | * | |
| 358 | * If @a index is out of range, this does nothing. | |
| 359 | * | |
| 360 | * @param win The window. | |
| 361 | * @param index The new index. | |
| 362 | */ | |
| 363 | void gaim_window_switch_conversation(struct gaim_window *win, | |
| 364 | unsigned int index); | |
| 365 | ||
| 366 | /** | |
| 367 | * Returns the active conversation in the window. | |
| 368 | * | |
| 369 | * @param win The window. | |
| 370 | * | |
| 371 | * @return The active conversation. | |
| 372 | */ | |
| 373 | struct gaim_conversation *gaim_window_get_active_conversation( | |
| 374 | const struct gaim_window *win); | |
| 375 | ||
| 376 | /** | |
| 377 | * Returns the list of conversations in the specified window. | |
| 378 | * | |
| 379 | * @param win The window. | |
| 380 | * | |
| 381 | * @return The list of conversations. | |
| 382 | */ | |
| 383 | GList *gaim_window_get_conversations(const struct gaim_window *win); | |
| 384 | ||
| 385 | /** | |
| 386 | * Returns a list of all windows. | |
| 387 | * | |
| 388 | * @return A list of windows. | |
| 389 | */ | |
| 390 | GList *gaim_get_windows(void); | |
| 391 | ||
| 392 | /*@}*/ | |
| 393 | ||
| 394 | /**************************************************************************/ | |
| 395 | /** @name Conversation API */ | |
| 396 | /**************************************************************************/ | |
| 397 | /*@{*/ | |
| 398 | ||
| 399 | /** | |
| 400 | * Creates a new conversation of the specified type. | |
| 401 | * | |
| 402 | * @param type The type of conversation. | |
| 403 | * @param name The name of the conversation. | |
| 404 | * | |
| 405 | * @return The new conversation. | |
| 406 | */ | |
| 407 | struct gaim_conversation *gaim_conversation_new(GaimConversationType type, | |
| 408 | const char *name); | |
| 409 | ||
| 410 | /** | |
| 411 | * Destroys the specified conversation and removes it from the parent | |
| 412 | * window. | |
| 413 | * | |
| 414 | * If this conversation is the only one contained in the parent window, | |
| 415 | * that window is also destroyed. | |
| 416 | * | |
| 417 | * @param conv The conversation to destroy. | |
| 418 | */ | |
| 419 | void gaim_conversation_destroy(struct gaim_conversation *conv); | |
| 420 | ||
| 421 | /** | |
| 422 | * Returns the specified conversation's type. | |
| 423 | * | |
| 424 | * @param conv The conversation. | |
| 425 | * | |
| 426 | * @return The conversation's type. | |
| 427 | */ | |
| 428 | GaimConversationType gaim_conversation_get_type( | |
| 429 | const struct gaim_conversation *conv); | |
| 430 | ||
| 431 | /** | |
| 432 | * Sets the specified conversation's UI operations structure. | |
| 433 | * | |
| 434 | * @param conv The conversation. | |
| 435 | * @param ops The UI conversation operations structure. | |
| 436 | */ | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
437 | void gaim_conversation_set_ui_ops(struct gaim_conversation *conv, |
|
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
438 | struct gaim_conversation_ui_ops *ops); |
| 4359 | 439 | |
| 440 | /** | |
| 441 | * Returns the specified conversation's UI operations structure. | |
| 442 | * | |
| 443 | * @param conv The conversation. | |
| 444 | * | |
| 445 | * @return The operations structure. | |
| 446 | */ | |
|
4465
43184ae252ed
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
447 | struct gaim_conversation_ui_ops *gaim_conversation_get_ui_ops( |
| 4359 | 448 | struct gaim_conversation *conv); |
| 449 | ||
| 450 | /** | |
| 451 | * Sets the specified conversation's aim_user. | |
| 452 | * | |
| 453 | * This aim_user represents the user using gaim, not the person the user | |
| 454 | * is having a conversation/chat/flame with. | |
| 455 | * | |
| 456 | * @param conv The conversation. | |
| 457 | * @param user The aim_user. | |
| 458 | */ | |
| 459 | void gaim_conversation_set_user(struct gaim_conversation *conv, | |
| 460 | struct aim_user *user); | |
| 461 | ||
| 462 | /** | |
| 463 | * Returns the specified conversation's aim_user. | |
| 464 | * | |
| 465 | * This aim_user represents the user using gaim, not the person the user | |
| 466 | * is having a conversation/chat/flame with. | |
| 467 | * | |
| 468 | * @param conv The conversation. | |
| 469 | * | |
| 470 | * @return The conversation's aim_user. | |
| 471 | */ | |
| 472 | struct aim_user *gaim_conversation_get_user( | |
| 473 | const struct gaim_conversation *conv); | |
| 474 | ||
| 475 | #if 0 | |
| 476 | /** | |
| 477 | * Sets the specified conversation's gaim_connection. | |
| 478 | * | |
| 479 | * @param conv The conversation. | |
| 480 | * @param gc The gaim_connection. | |
| 481 | */ | |
| 482 | void gaim_conversation_set_gc(struct gaim_conversation *conv, | |
| 483 | struct gaim_connection *gc); | |
| 484 | #endif | |
| 485 | ||
| 486 | /** | |
| 487 | * Returns the specified conversation's gaim_connection. | |
| 488 | * | |
| 489 | * This is the same as gaim_conversation_get_user(conv)->gc. | |
| 490 | * | |
| 491 | * @param conv The conversation. | |
| 492 | * | |
| 493 | * @return The conversation's gaim_connection. | |
| 494 | */ | |
| 495 | struct gaim_connection *gaim_conversation_get_gc( | |
| 496 | const struct gaim_conversation *conv); | |
| 497 | ||
| 498 | /** | |
| 499 | * Sets the specified conversation's title. | |
| 500 | * | |
| 501 | * @param conv The conversation. | |
| 502 | * @param title The title. | |
| 503 | */ | |
| 504 | void gaim_conversation_set_title(struct gaim_conversation *conv, | |
| 505 | const char *title); | |
| 506 | ||
| 507 | /** | |
| 508 | * Returns the specified conversation's title. | |
| 509 | * | |
| 510 | * @param win The conversation. | |
| 511 | * | |
| 512 | * @return The title. | |
| 513 | */ | |
| 514 | const char *gaim_conversation_get_title(const struct gaim_conversation *conv); | |
| 515 | ||
| 516 | /** | |
| 517 | * Automatically sets the specified conversation's title. | |
| 518 | * | |
| 519 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 520 | * user's alias. | |
| 521 | * | |
| 522 | * @param conv The conversation. | |
| 523 | */ | |
| 524 | void gaim_conversation_autoset_title(struct gaim_conversation *conv); | |
| 525 | ||
| 526 | /** | |
| 527 | * Returns the specified conversation's index in the parent window. | |
| 528 | * | |
| 529 | * @param conv The conversation. | |
| 530 | * | |
| 531 | * @return The current index in the parent window. | |
| 532 | */ | |
| 533 | int gaim_conversation_get_index(const struct gaim_conversation *conv); | |
| 534 | ||
| 535 | /** | |
| 536 | * Sets the conversation's unseen state. | |
| 537 | * | |
| 538 | * @param conv The conversation. | |
| 539 | * @param state The new unseen state. | |
| 540 | */ | |
| 541 | void gaim_conversation_set_unseen(struct gaim_conversation *conv, | |
| 542 | GaimUnseenState state); | |
| 543 | ||
| 544 | /** | |
| 545 | * Returns the conversation's unseen state. | |
| 546 | * | |
| 547 | * @param conv The conversation. | |
| 548 | * | |
| 549 | * @param The conversation's unseen state. | |
| 550 | */ | |
| 551 | GaimUnseenState gaim_conversation_get_unseen( | |
| 552 | const struct gaim_conversation *conv); | |
| 553 | ||
| 554 | /** | |
| 555 | * Returns the specified conversation's name. | |
| 556 | * | |
| 557 | * @param conv The conversation. | |
| 558 | * | |
| 559 | * @return The conversation's name. | |
| 560 | */ | |
| 561 | const char *gaim_conversation_get_name(const struct gaim_conversation *conv); | |
| 562 | ||
| 563 | /** | |
| 564 | * Enables or disables logging for this conversation. | |
| 565 | * | |
| 566 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. | |
| 567 | */ | |
| 568 | void gaim_conversation_set_logging(struct gaim_conversation *conv, | |
| 569 | gboolean log); | |
| 570 | ||
| 571 | /** | |
| 572 | * Returns whether or not logging is enabled for this conversation. | |
| 573 | * | |
| 574 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. | |
| 575 | */ | |
| 576 | gboolean gaim_conversation_is_logging(const struct gaim_conversation *conv); | |
| 577 | ||
| 578 | /** | |
| 579 | * Returns the specified conversation's send history. | |
| 580 | * | |
| 581 | * @param conv The conversation. | |
| 582 | * | |
| 583 | * @return The conversation's send history. | |
| 584 | */ | |
| 585 | GList *gaim_conversation_get_send_history( | |
| 586 | const struct gaim_conversation *conv); | |
| 587 | ||
| 588 | /** | |
| 589 | * Sets the specified conversation's history. | |
| 590 | * | |
| 591 | * @param conv The conversation. | |
| 592 | * @param history The history. | |
| 593 | */ | |
| 594 | void gaim_conversation_set_history(struct gaim_conversation *conv, | |
| 595 | GString *history); | |
| 596 | ||
| 597 | /** | |
| 598 | * Returns the specified conversation's history. | |
| 599 | * | |
| 600 | * @param conv The conversation. | |
| 601 | * | |
| 602 | * @return The conversation's history. | |
| 603 | */ | |
| 604 | GString *gaim_conversation_get_history(const struct gaim_conversation *conv); | |
| 605 | ||
| 606 | /** | |
| 607 | * Returns the specified conversation's parent window. | |
| 608 | * | |
| 609 | * @param conv The conversation. | |
| 610 | * | |
| 611 | * @return The conversation's parent window. | |
| 612 | */ | |
| 613 | struct gaim_window *gaim_conversation_get_window( | |
| 614 | const struct gaim_conversation *conv); | |
| 615 | ||
| 616 | /** | |
| 617 | * Returns the specified conversation's IM-specific data. | |
| 618 | * | |
| 619 | * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
| 620 | * | |
| 621 | * @param conv The conversation. | |
| 622 | * | |
| 623 | * @return The IM-specific data. | |
| 624 | */ | |
| 625 | struct gaim_im *gaim_conversation_get_im_data( | |
| 626 | const struct gaim_conversation *conv); | |
| 627 | ||
| 628 | #define GAIM_IM(c) (gaim_conversation_get_im_data(c)) | |
| 629 | ||
| 630 | /** | |
| 631 | * Returns the specified conversation's chat-specific data. | |
| 632 | * | |
| 633 | * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
| 634 | * | |
| 635 | * @param conv The conversation. | |
| 636 | * | |
| 637 | * @return The chat-specific data. | |
| 638 | */ | |
| 639 | struct gaim_chat *gaim_conversation_get_chat_data( | |
| 640 | const struct gaim_conversation *conv); | |
| 641 | ||
| 642 | #define GAIM_CHAT(c) (gaim_conversation_get_chat_data(c)) | |
| 643 | ||
| 644 | /** | |
| 645 | * Returns a list of all conversations. | |
| 646 | * | |
| 647 | * This list includes both IMs and chats. | |
| 648 | * | |
| 649 | * @return A GList of all conversations. | |
| 650 | */ | |
| 651 | GList *gaim_get_conversations(void); | |
| 652 | ||
| 653 | /** | |
| 654 | * Returns a list of all IMs. | |
| 655 | * | |
| 656 | * @return A GList of all IMs. | |
| 657 | */ | |
| 658 | GList *gaim_get_ims(void); | |
| 659 | ||
| 660 | /** | |
| 661 | * Returns a list of all chats. | |
| 662 | * | |
| 663 | * @return A GList of all chats. | |
| 664 | */ | |
| 665 | GList *gaim_get_chats(void); | |
| 666 | ||
| 667 | /** | |
| 668 | * Finds the conversation with the specified name. | |
| 669 | * | |
| 670 | * @param name The name of the conversation. | |
| 671 | * | |
| 672 | * @return The conversation if found, or @c NULL otherwise. | |
| 673 | */ | |
| 674 | struct gaim_conversation *gaim_find_conversation(const char *name); | |
| 675 | ||
| 676 | /** | |
| 677 | * Finds a conversation with the specified name and user. | |
| 678 | * | |
| 679 | * @param name The name of the conversation. | |
| 680 | * @param user The aim_user associated with the conversation. | |
| 681 | * | |
| 682 | * @return The conversation if found, or @c NULL otherwise. | |
| 683 | */ | |
| 684 | struct gaim_conversation *gaim_find_conversation_with_user( | |
| 685 | const char *name, const struct aim_user *user); | |
| 686 | ||
| 687 | /** | |
| 688 | * Writes to a conversation window. | |
| 689 | * | |
| 690 | * This function should not be used to write IM or chat messages. Use | |
| 691 | * gaim_im_write() and gaim_chat_write() instead. Those functions will | |
| 692 | * most likely call this anyway, but they may do their own formatting, | |
| 693 | * sound playback, etc. | |
| 694 | * | |
| 695 | * This can be used to write generic messages, such as "so and so closed | |
| 696 | * the conversation window." | |
| 697 | * | |
| 698 | * @param conv The conversation. | |
| 699 | * @param who The user who sent the message. | |
| 700 | * @param message The message. | |
| 701 | * @param length The length of the message. | |
| 702 | * @param flags The flags. | |
| 703 | * @param mtime The time the message was sent. | |
| 704 | * | |
| 705 | * @see gaim_im_write() | |
| 706 | * @see gaim_chat_write() | |
| 707 | */ | |
| 708 | void gaim_conversation_write(struct gaim_conversation *conv, const char *who, | |
| 709 | const char *message, size_t length, int flags, | |
| 710 | time_t mtime); | |
| 711 | ||
| 712 | /** | |
| 713 | * Updates the progress bar on a conversation window | |
| 714 | * (if one exists in the UI). | |
| 715 | * | |
| 716 | * This is used for loading images typically. | |
| 717 | * | |
| 718 | * @param conv The conversation. | |
| 719 | * @param percent The percentage. | |
| 720 | */ | |
| 721 | void gaim_conversation_update_progress(struct gaim_conversation *conv, | |
| 722 | float percent); | |
| 723 | ||
| 724 | /** | |
| 725 | * Updates the visual status and UI of a conversation. | |
| 726 | * | |
| 727 | * @param conv The conversation. | |
| 728 | * @param type The update type. | |
| 729 | */ | |
| 730 | void gaim_conversation_update(struct gaim_conversation *conv, | |
| 731 | GaimConvUpdateType type); | |
| 732 | ||
| 733 | /** | |
| 734 | * Calls a function on each conversation. | |
| 735 | * | |
| 736 | * @param func The function. | |
| 737 | */ | |
| 738 | void gaim_conversation_foreach(void (*func)(struct gaim_conversation *conv)); | |
| 739 | ||
| 740 | /*@}*/ | |
| 741 | ||
| 742 | ||
| 743 | /**************************************************************************/ | |
| 744 | /** @name IM Conversation API */ | |
| 745 | /**************************************************************************/ | |
| 746 | /*@{*/ | |
| 747 | ||
| 748 | /** | |
| 749 | * Gets an IM's parent conversation. | |
| 750 | * | |
| 751 | * @param im The IM. | |
| 752 | * | |
| 753 | * @return The parent conversation. | |
| 754 | */ | |
| 755 | struct gaim_conversation *gaim_im_get_conversation(struct gaim_im *im); | |
| 756 | ||
| 757 | /** | |
| 758 | * Sets the IM's typing state. | |
| 759 | * | |
| 760 | * @param im The IM. | |
| 761 | * @param state The typing state. | |
| 762 | */ | |
| 763 | void gaim_im_set_typing_state(struct gaim_im *im, int state); | |
| 764 | ||
| 765 | /** | |
| 766 | * Returns the IM's typing state. | |
| 767 | * | |
| 768 | * @param im The IM. | |
| 769 | * | |
| 770 | * @return The IM's typing state. | |
| 771 | */ | |
| 772 | int gaim_im_get_typing_state(const struct gaim_im *im); | |
| 773 | ||
| 774 | /** | |
| 775 | * Starts the IM's typing timeout. | |
| 776 | * | |
| 777 | * @param im The IM. | |
| 778 | * @param timeout The timeout. | |
| 779 | */ | |
| 780 | void gaim_im_start_typing_timeout(struct gaim_im *im, int timeout); | |
| 781 | ||
| 782 | /** | |
| 783 | * Stops the IM's typing timeout. | |
| 784 | * | |
| 785 | * @param im The IM. | |
| 786 | */ | |
| 787 | void gaim_im_stop_typing_timeout(struct gaim_im *im); | |
| 788 | ||
| 789 | /** | |
| 790 | * Returns the IM's typing timeout. | |
| 791 | * | |
| 792 | * @param im The IM. | |
| 793 | * | |
| 794 | * @return The timeout. | |
| 795 | */ | |
| 796 | guint gaim_im_get_typing_timeout(const struct gaim_im *im); | |
| 797 | ||
| 798 | /** | |
| 799 | * Sets the IM's time until it should send another typing notification. | |
| 800 | * | |
| 801 | * @param im The IM. | |
| 802 | * @param val The time. | |
| 803 | */ | |
| 804 | void gaim_im_set_type_again(struct gaim_im *im, time_t val); | |
| 805 | ||
| 806 | /** | |
| 807 | * Returns the IM's time until it should send another typing notification. | |
| 808 | * | |
| 809 | * @param im The IM. | |
| 810 | * | |
| 811 | * @return The time. | |
| 812 | */ | |
| 813 | time_t gaim_im_get_type_again(const struct gaim_im *im); | |
| 814 | ||
| 815 | /** | |
| 816 | * Starts the IM's type again timeout. | |
| 817 | * | |
| 818 | * @param im The IM. | |
| 819 | */ | |
| 820 | void gaim_im_start_type_again_timeout(struct gaim_im *im); | |
| 821 | ||
| 822 | /** | |
| 823 | * Stops the IM's type again timeout. | |
| 824 | * | |
| 825 | * @param im The IM. | |
| 826 | */ | |
| 827 | void gaim_im_stop_type_again_timeout(struct gaim_im *im); | |
| 828 | ||
| 829 | /** | |
| 830 | * Returns the IM's type again timeout interval. | |
| 831 | * | |
| 832 | * @param im The IM. | |
| 833 | * | |
| 834 | * @return The type again timeout interval. | |
| 835 | */ | |
| 836 | guint gaim_im_get_type_again_timeout(const struct gaim_im *im); | |
| 837 | ||
| 838 | /** | |
| 839 | * Updates the visual typing notification for an IM conversation. | |
| 840 | * | |
| 841 | * @param im The IM. | |
| 842 | */ | |
| 843 | void gaim_im_update_typing(struct gaim_im *im); | |
| 844 | ||
| 845 | /** | |
| 846 | * Writes to an IM. | |
| 847 | * | |
| 848 | * The @a len parameter is used for writing binary data, such as an | |
| 849 | * image. If @c message is text, specify -1 for @a len. | |
| 850 | * | |
| 851 | * @param im The IM. | |
| 852 | * @param who The user who sent the message. | |
| 853 | * @param message The message to write. | |
| 854 | * @param len The length of the message, or -1 to specify the length | |
| 855 | * of @a message. | |
| 856 | * @param flag The flags. | |
| 857 | * @param mtime The time the message was sent. | |
| 858 | */ | |
| 859 | void gaim_im_write(struct gaim_im *im, const char *who, | |
| 860 | const char *message, size_t len, int flag, time_t mtime); | |
| 861 | ||
| 862 | /** | |
| 863 | * Sends a message to this IM conversation. | |
| 864 | * | |
| 865 | * @param im The IM. | |
| 866 | * @param message The message to send. | |
| 867 | */ | |
| 868 | void gaim_im_send(struct gaim_im *im, const char *message); | |
| 869 | ||
| 870 | /*@}*/ | |
| 871 | ||
| 872 | ||
| 873 | /**************************************************************************/ | |
| 874 | /** @name Chat Conversation API */ | |
| 875 | /**************************************************************************/ | |
| 876 | /*@{*/ | |
| 877 | ||
| 878 | /** | |
| 879 | * Gets a chat's parent conversation. | |
| 880 | * | |
| 881 | * @param chat The chat. | |
| 882 | * | |
| 883 | * @return The parent conversation. | |
| 884 | */ | |
| 885 | struct gaim_conversation *gaim_chat_get_conversation(struct gaim_chat *chat); | |
| 886 | ||
| 887 | /** | |
| 888 | * Sets the list of users in the chat room. | |
| 889 | * | |
| 890 | * @param chat The chat. | |
| 891 | * @param users The list of users. | |
| 892 | * | |
| 893 | * @return The list passed. | |
| 894 | */ | |
| 895 | GList *gaim_chat_set_users(struct gaim_chat *chat, GList *users); | |
| 896 | ||
| 897 | /** | |
| 898 | * Returns a list of users in the chat room. | |
| 899 | * | |
| 900 | * @param chat The chat. | |
| 901 | * | |
| 902 | * @return The list of users. | |
| 903 | */ | |
| 904 | GList *gaim_chat_get_users(const struct gaim_chat *chat); | |
| 905 | ||
| 906 | /** | |
| 907 | * Ignores a user in a chat room. | |
| 908 | * | |
| 909 | * @param chat The chat. | |
| 910 | * @param name The name of the user. | |
| 911 | */ | |
| 912 | void gaim_chat_ignore(struct gaim_chat *chat, const char *name); | |
| 913 | ||
| 914 | /** | |
| 915 | * Unignores a user in a chat room. | |
| 916 | * | |
| 917 | * @param chat The chat. | |
| 918 | * @param name The name of the user. | |
| 919 | */ | |
| 920 | void gaim_chat_unignore(struct gaim_chat *chat, const char *name); | |
| 921 | ||
| 922 | /** | |
| 923 | * Sets the list of ignored users in the chat room. | |
| 924 | * | |
| 925 | * @param chat The chat. | |
| 926 | * @param ignored The list of ignored users. | |
| 927 | * | |
| 928 | * @return The list passed. | |
| 929 | */ | |
| 930 | GList *gaim_chat_set_ignored(struct gaim_chat *chat, GList *ignored); | |
| 931 | ||
| 932 | /** | |
| 933 | * Returns the list of ignored users in the chat room. | |
| 934 | * | |
| 935 | * @param chat The chat. | |
| 936 | * | |
| 937 | * @return The list of ignored users. | |
| 938 | */ | |
| 939 | GList *gaim_chat_get_ignored(const struct gaim_chat *chat); | |
| 940 | ||
| 941 | /** | |
| 942 | * Returns the actual name of the specified ignored user, if it exists in | |
| 943 | * the ignore list. | |
| 944 | * | |
| 945 | * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 946 | * returned. The username passed to the function does not have to have this | |
| 947 | * formatting. | |
| 948 | * | |
| 949 | * @param chat The chat. | |
| 950 | * @param user The user to check in the ignore list. | |
| 951 | * | |
| 952 | * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 953 | * if not found. | |
| 954 | */ | |
| 955 | const char *gaim_chat_get_ignored_user(const struct gaim_chat *chat, | |
| 956 | const char *user); | |
| 957 | ||
| 958 | /** | |
| 959 | * Returns @c TRUE if the specified user is ignored. | |
| 960 | * | |
| 961 | * @param chat The chat. | |
| 962 | * @param user The user. | |
| 963 | * | |
| 964 | * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 965 | */ | |
| 966 | gboolean gaim_chat_is_user_ignored(const struct gaim_chat *chat, | |
| 967 | const char *user); | |
| 968 | ||
| 969 | /** | |
| 970 | * Sets the chat room's topic. | |
| 971 | * | |
| 972 | * @param chat The chat. | |
| 973 | * @param who The user that set the topic. | |
| 974 | * @param topic The topic. | |
| 975 | */ | |
| 976 | void gaim_chat_set_topic(struct gaim_chat *chat, const char *who, | |
| 977 | const char *topic); | |
| 978 | ||
| 979 | /** | |
| 980 | * Returns the chat room's topic. | |
| 981 | * | |
| 982 | * @param chat The chat. | |
| 983 | * | |
| 984 | * @return The chat's topic. | |
| 985 | */ | |
| 986 | const char *gaim_chat_get_topic(const struct gaim_chat *chat); | |
| 987 | ||
| 988 | /** | |
| 989 | * Sets the chat room's ID. | |
| 990 | * | |
| 991 | * @param chat The chat. | |
| 992 | * @param id The ID. | |
| 993 | */ | |
| 994 | void gaim_chat_set_id(struct gaim_chat *chat, int id); | |
| 995 | ||
| 996 | /** | |
| 997 | * Returns the chat room's ID. | |
| 998 | * | |
| 999 | * @param chat The chat. | |
| 1000 | * | |
| 1001 | * @return The ID. | |
| 1002 | */ | |
| 1003 | int gaim_chat_get_id(const struct gaim_chat *chat); | |
| 1004 | ||
| 1005 | /** | |
| 1006 | * Writes to a chat. | |
| 1007 | * | |
| 1008 | * @param chat The chat. | |
| 1009 | * @param who The user who sent the message. | |
| 1010 | * @param message The message to write. | |
| 1011 | * @param flag The flags. | |
| 1012 | * @param mtime The time the message was sent. | |
| 1013 | */ | |
| 1014 | void gaim_chat_write(struct gaim_chat *chat, const char *who, | |
| 1015 | const char *message, int flag, time_t mtime); | |
| 1016 | ||
| 1017 | /** | |
| 1018 | * Sends a message to this chat conversation. | |
| 1019 | * | |
| 1020 | * @param chat The chat. | |
| 1021 | * @param message The message to send. | |
| 1022 | */ | |
| 1023 | void gaim_chat_send(struct gaim_chat *chat, const char *message); | |
| 1024 | ||
| 1025 | /** | |
| 1026 | * Adds a user to a chat. | |
| 1027 | * | |
| 1028 | * @param chat The chat. | |
| 1029 | * @param user The user to add. | |
| 1030 | * @param extra_msg An extra message to display with the join message. | |
| 1031 | */ | |
| 1032 | void gaim_chat_add_user(struct gaim_chat *chat, const char *user, | |
| 1033 | const char *extra_msg); | |
| 1034 | ||
| 1035 | /** | |
| 1036 | * Renames a user in a chat. | |
| 1037 | * | |
| 1038 | * @param chat The chat. | |
| 1039 | * @param old_user The old username. | |
| 1040 | * @param new_user The new username. | |
| 1041 | */ | |
| 1042 | void gaim_chat_rename_user(struct gaim_chat *chat, const char *old_user, | |
| 1043 | const char *new_user); | |
| 1044 | ||
| 1045 | /** | |
| 1046 | * Removes a user from a chat, optionally with a reason. | |
| 1047 | * | |
| 1048 | * @param chat The chat. | |
| 1049 | * @param user The user that is being removed. | |
| 1050 | * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1051 | */ | |
| 1052 | void gaim_chat_remove_user(struct gaim_chat *chat, const char *user, | |
| 1053 | const char *reason); | |
| 1054 | ||
| 1055 | /** | |
| 1056 | * Finds a chat with the specified chat ID. | |
| 1057 | * | |
| 1058 | * @param gc The gaim_connection. | |
| 1059 | * @param id The chat ID. | |
| 1060 | * | |
| 1061 | * @return The chat conversation. | |
| 1062 | */ | |
| 1063 | struct gaim_conversation *gaim_find_chat(struct gaim_connection *gc, int id); | |
| 1064 | ||
| 1065 | /*@}*/ | |
| 1066 | ||
| 1067 | #endif /* _CONVERSATION_H_ */ |