Mercurial > pidgin
annotate src/conversation.h @ 8052:2df2fd4efa82
[gaim-migrate @ 8737]
Bye bye, Rachel.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Sat, 10 Jan 2004 04:45:05 +0000 |
| parents | fa6395637e2c |
| children | 77d1252b3803 |
| rev | line source |
|---|---|
| 4359 | 1 /** |
| 2 * @file conversation.h Conversation API | |
|
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4890
diff
changeset
|
3 * @ingroup core |
| 4359 | 4 * |
| 5 * gaim | |
| 6 * | |
| 8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
10 * |
| 4359 | 11 * This program is free software; you can redistribute it and/or modify |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
|
6488
e5e8d21bd4d8
[gaim-migrate @ 7002]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
24 * |
|
6605
943b03bcecf5
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6585
diff
changeset
|
25 * @see @ref conversation-signals |
| 4359 | 26 */ |
|
4890
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
27 #ifndef _GAIM_CONVERSATION_H_ |
|
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
28 #define _GAIM_CONVERSATION_H_ |
| 4359 | 29 |
| 30 /**************************************************************************/ | |
| 31 /** Data Structures */ | |
| 32 /**************************************************************************/ | |
| 33 | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
34 typedef struct _GaimConvWindowUiOps GaimConvWindowUiOps; |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
35 typedef struct _GaimConvWindow GaimConvWindow; |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
36 typedef struct _GaimConversationUiOps GaimConversationUiOps; |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
37 typedef struct _GaimConversation GaimConversation; |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
38 typedef struct _GaimConvIm GaimConvIm; |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
39 typedef struct _GaimConvChat GaimConvChat; |
| 4359 | 40 |
| 41 /** | |
| 42 * A type of conversation. | |
| 43 */ | |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
44 typedef enum |
| 4359 | 45 { |
| 46 GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
| 47 GAIM_CONV_IM, /**< Instant Message. */ | |
|
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
48 GAIM_CONV_CHAT, /**< Chat room. */ |
|
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
49 GAIM_CONV_MISC /**< A misc. conversation. */ |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
50 |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
51 } GaimConversationType; |
| 4359 | 52 |
| 53 /** | |
| 54 * Unseen text states. | |
| 55 */ | |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
56 typedef enum |
| 4359 | 57 { |
| 58 GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
| 59 GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
|
6405
96de6d9eb422
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
60 GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
|
96de6d9eb422
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
61 GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
62 |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
63 } GaimUnseenState; |
| 4359 | 64 |
| 65 /** | |
| 66 * Conversation update type. | |
| 67 */ | |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
68 typedef enum |
| 4359 | 69 { |
| 70 GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
| 71 was added. */ | |
| 72 GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation | |
| 73 was removed. */ | |
| 4491 | 74 GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
| 4359 | 75 GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
| 76 GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
| 77 GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
| 78 enabled or disabled. */ | |
| 79 GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ | |
| 80 | |
| 81 /* | |
| 82 * XXX These need to go when we implement a more generic core/UI event | |
| 83 * system. | |
| 84 */ | |
|
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
85 GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
|
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
86 GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
87 GAIM_CONV_UPDATE_AWAY, /**< The other user went away. */ |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
88 GAIM_CONV_UPDATE_ICON /**< The other user's buddy icon changed. */ |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
89 |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
90 } GaimConvUpdateType; |
| 4359 | 91 |
| 92 /** | |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
93 * The typing state of a user. |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
94 */ |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
95 typedef enum |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
96 { |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
97 GAIM_NOT_TYPING = 0, /**< Not typing. */ |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
98 GAIM_TYPING, /**< Currently typing. */ |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
99 GAIM_TYPED /**< Stopped typing momentarily. */ |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
100 |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
101 } GaimTypingState; |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
102 |
| 6621 | 103 /** |
| 104 * Flags applicable to a message. Most will have send, recv or system. | |
| 105 */ | |
| 106 typedef enum | |
| 107 { | |
| 6982 | 108 GAIM_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
| 109 GAIM_MESSAGE_RECV = 0x0002, /**< Incoming message. */ | |
| 110 GAIM_MESSAGE_SYSTEM = 0x0004, /**< System message. */ | |
| 111 GAIM_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ | |
| 112 GAIM_MESSAGE_COLORIZE = 0x0010, /**< Colorize nicks. */ | |
| 113 GAIM_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ | |
| 114 GAIM_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ | |
| 115 GAIM_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ | |
| 116 GAIM_MESSAGE_IMAGES = 0x0100 /**< Message contains images. */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
117 |
| 6621 | 118 } GaimMessageFlags; |
| 119 | |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
120 #include "account.h" |
| 7431 | 121 #include "log.h" |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
122 #include "buddyicon.h" |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
123 #include "server.h" |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
124 |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
125 /** |
| 4359 | 126 * Conversation window operations. |
| 127 * | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
128 * Any UI representing a window must assign a filled-out gaim_conv_window_ops |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
129 * structure to the GaimConvWindow. |
| 4359 | 130 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
131 struct _GaimConvWindowUiOps |
| 4359 | 132 { |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
133 GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
| 4359 | 134 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
135 void (*new_window)(GaimConvWindow *win); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
136 void (*destroy_window)(GaimConvWindow *win); |
| 4359 | 137 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
138 void (*show)(GaimConvWindow *win); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
139 void (*hide)(GaimConvWindow *win); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
140 void (*raise)(GaimConvWindow *win); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
141 void (*flash)(GaimConvWindow *win); |
| 4359 | 142 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
143 void (*switch_conversation)(GaimConvWindow *win, unsigned int index); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
144 void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
145 void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
146 void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, |
| 4359 | 147 unsigned int newIndex); |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
148 int (*get_active_index)(const GaimConvWindow *win); |
| 4359 | 149 }; |
| 150 | |
| 151 /** | |
| 152 * Conversation operations and events. | |
| 153 * | |
| 154 * Any UI representing a conversation must assign a filled-out | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
155 * GaimConversationUiOps structure to the GaimConversation. |
| 4359 | 156 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
157 struct _GaimConversationUiOps |
| 4359 | 158 { |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
159 void (*destroy_conversation)(GaimConversation *conv); |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
160 void (*write_chat)(GaimConversation *conv, const char *who, |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
161 const char *message, GaimMessageFlags flags, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
162 time_t mtime); |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
163 void (*write_im)(GaimConversation *conv, const char *who, |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
164 const char *message, GaimMessageFlags flags, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
165 time_t mtime); |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
166 void (*write_conv)(GaimConversation *conv, const char *who, |
| 6982 | 167 const char *message, GaimMessageFlags flags, |
| 4359 | 168 time_t mtime); |
| 169 | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
170 void (*chat_add_user)(GaimConversation *conv, const char *user); |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
171 void (*chat_add_users)(GaimConversation *conv, GList *users); |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
172 void (*chat_rename_user)(GaimConversation *conv, |
| 4359 | 173 const char *old_name, const char *new_name); |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
174 void (*chat_remove_user)(GaimConversation *conv, const char *user); |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
175 void (*chat_remove_users)(GaimConversation *conv, GList *users); |
| 4359 | 176 |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
177 void (*set_title)(GaimConversation *conv, const char *title); |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
178 void (*update_progress)(GaimConversation *conv, float percent); |
| 4359 | 179 |
| 180 /* Events */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
181 void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 182 }; |
| 183 | |
| 184 /** | |
| 185 * A core representation of a graphical window containing one or more | |
| 186 * conversations. | |
| 187 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
188 struct _GaimConvWindow |
| 4359 | 189 { |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
190 GList *conversations; /**< The conversations in the window. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
191 size_t conversation_count; /**< The number of conversations. */ |
| 4359 | 192 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
193 GaimConvWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
194 void *ui_data; /**< UI-specific data. */ |
| 4359 | 195 }; |
| 196 | |
| 197 /** | |
| 198 * Data specific to Instant Messages. | |
| 199 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
200 struct _GaimConvIm |
| 4359 | 201 { |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
202 GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 203 |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
204 GaimTypingState typing_state; /**< The current typing state. */ |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
205 guint typing_timeout; /**< The typing timer handle. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
206 time_t type_again; /**< The type again time. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
207 guint type_again_timeout; /**< The type again timer handle. */ |
| 4359 | 208 |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
209 GSList *images; /**< A list of images in the IM. */ |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
210 |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
211 GaimBuddyIcon *icon; /**< The buddy icon. */ |
| 4359 | 212 }; |
| 213 | |
| 214 /** | |
| 215 * Data specific to Chats. | |
| 216 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
217 struct _GaimConvChat |
| 4359 | 218 { |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
219 GaimConversation *conv; /**< The parent conversation. */ |
| 4359 | 220 |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
221 GList *in_room; /**< The users in the room. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
222 GList *ignored; /**< Ignored users. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
223 char *who; /**< The person who set the topic. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
224 char *topic; /**< The topic. */ |
|
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
225 int id; /**< The chat ID. */ |
| 4359 | 226 }; |
| 227 | |
| 228 /** | |
| 229 * A core representation of a conversation between two or more people. | |
| 230 * | |
| 231 * The conversation can be an IM or a chat. Each conversation is kept | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
232 * in a GaimConvWindow and has a UI representation. |
| 4359 | 233 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
234 struct _GaimConversation |
| 4359 | 235 { |
| 236 GaimConversationType type; /**< The type of conversation. */ | |
| 237 | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
238 GaimAccount *account; /**< The user using this conversation. */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
239 GaimConvWindow *window; /**< The parent window. */ |
| 4359 | 240 |
| 241 int conversation_pos; /**< The position in the window's list. */ | |
| 242 | |
| 243 char *name; /**< The name of the conversation. */ | |
| 244 char *title; /**< The window title. */ | |
| 245 | |
| 246 gboolean logging; /**< The status of logging. */ | |
| 7431 | 247 |
| 248 GaimLog *log; /**< This conversation's log */ | |
| 249 | |
| 4359 | 250 GList *send_history; /**< The send history. */ |
| 251 GString *history; /**< The conversation history. */ | |
| 252 | |
| 253 GaimUnseenState unseen; /**< The unseen tab state. */ | |
| 254 | |
| 255 union | |
| 256 { | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
257 GaimConvIm *im; /**< IM-specific data. */ |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
258 GaimConvChat *chat; /**< Chat-specific data. */ |
|
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
259 void *misc; /**< Misc. data. */ |
| 4359 | 260 |
| 261 } u; | |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
262 |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
263 GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
|
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
264 void *ui_data; /**< UI-specific data. */ |
|
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
265 |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
266 GHashTable *data; /**< Plugin-specific data. */ |
| 4359 | 267 }; |
| 268 | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
269 typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
| 4359 | 270 |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
271 #ifdef __cplusplus |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
272 extern "C" { |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
273 #endif |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
274 |
| 4359 | 275 /**************************************************************************/ |
| 276 /** @name Conversation Window API */ | |
| 277 /**************************************************************************/ | |
| 278 /*@{*/ | |
| 279 | |
| 280 /** | |
| 281 * Creates a new conversation window. | |
| 282 * | |
| 283 * This window is added to the list of windows, but is not shown until | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
284 * gaim_conv_window_show() is called. |
| 4359 | 285 * |
| 286 * @return The new conversation window. | |
| 287 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
288 GaimConvWindow *gaim_conv_window_new(void); |
| 4359 | 289 |
| 290 /** | |
| 291 * Destroys the specified conversation window and all conversations in it. | |
| 292 * | |
| 293 * @param win The window to destroy. | |
| 294 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
295 void gaim_conv_window_destroy(GaimConvWindow *win); |
| 4359 | 296 |
| 297 /** | |
| 298 * Shows the specified conversation window. | |
| 299 * | |
| 300 * @param win The window. | |
| 301 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
302 void gaim_conv_window_show(GaimConvWindow *win); |
| 4359 | 303 |
| 304 /** | |
| 305 * Hides the specified conversation window. | |
| 306 * | |
| 307 * @param win The window. | |
| 308 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
309 void gaim_conv_window_hide(GaimConvWindow *win); |
| 4359 | 310 |
| 311 /** | |
| 312 * Raises the specified conversation window. | |
| 313 * | |
| 314 * @param win The window. | |
| 315 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
316 void gaim_conv_window_raise(GaimConvWindow *win); |
| 4359 | 317 |
| 318 /** | |
| 319 * Causes the window to flash for IM notification, if the UI supports this. | |
|
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
320 * |
| 4359 | 321 * @param win The window. |
| 322 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
323 void gaim_conv_window_flash(GaimConvWindow *win); |
| 4359 | 324 |
| 325 /** | |
| 326 * Sets the specified window's UI window operations structure. | |
| 327 * | |
| 328 * @param win The window. | |
| 329 * @param ops The UI window operations structure. | |
| 330 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
331 void gaim_conv_window_set_ui_ops(GaimConvWindow *win, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
332 GaimConvWindowUiOps *ops); |
| 4359 | 333 |
| 334 /** | |
| 335 * Returns the specified window's UI window operations structure. | |
| 336 * | |
| 337 * @param win The window. | |
| 338 * | |
| 339 * @return The UI window operations structure. | |
| 340 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
341 GaimConvWindowUiOps *gaim_conv_window_get_ui_ops(const GaimConvWindow *win); |
| 4359 | 342 |
| 343 /** | |
| 344 * Adds a conversation to this window. | |
| 345 * | |
| 346 * If the conversation already has a parent window, this will do nothing. | |
| 347 * | |
| 348 * @param win The window. | |
| 349 * @param conv The conversation. | |
| 350 * | |
| 351 * @return The new index of the conversation in the window. | |
| 352 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
353 int gaim_conv_window_add_conversation(GaimConvWindow *win, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
354 GaimConversation *conv); |
| 4359 | 355 |
| 356 /** | |
| 357 * Removes the conversation at the specified index from the window. | |
| 358 * | |
| 359 * If there is no conversation at this index, this will do nothing. | |
| 360 * | |
| 361 * @param win The window. | |
| 362 * @param index The index of the conversation. | |
| 363 * | |
| 364 * @return The conversation removed. | |
| 365 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
366 GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
367 unsigned int index); |
| 4359 | 368 |
| 369 /** | |
| 370 * Moves the conversation at the specified index in a window to a new index. | |
| 371 * | |
| 372 * @param win The window. | |
| 373 * @param index The index of the conversation to move. | |
| 374 * @param new_index The new index. | |
| 375 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
376 void gaim_conv_window_move_conversation(GaimConvWindow *win, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
377 unsigned int index, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
378 unsigned int new_index); |
| 4359 | 379 |
| 380 /** | |
| 381 * Returns the conversation in the window at the specified index. | |
| 382 * | |
| 383 * If the index is out of range, this returns @c NULL. | |
| 384 * | |
| 385 * @param win The window. | |
| 386 * @param index The index containing a conversation. | |
| 387 * | |
| 388 * @return The conversation at the specified index. | |
| 389 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
390 GaimConversation *gaim_conv_window_get_conversation_at( |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
391 const GaimConvWindow *win, unsigned int index); |
| 4359 | 392 |
| 393 /** | |
| 394 * Returns the number of conversations in the window. | |
| 395 * | |
| 396 * @param win The window. | |
| 397 * | |
| 398 * @return The number of conversations. | |
| 399 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
400 size_t gaim_conv_window_get_conversation_count(const GaimConvWindow *win); |
| 4359 | 401 |
| 402 /** | |
| 403 * Switches the active conversation to the one at the specified index. | |
| 404 * | |
| 405 * If @a index is out of range, this does nothing. | |
| 406 * | |
| 407 * @param win The window. | |
| 408 * @param index The new index. | |
| 409 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
410 void gaim_conv_window_switch_conversation(GaimConvWindow *win, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
411 unsigned int index); |
| 4359 | 412 |
| 413 /** | |
| 414 * Returns the active conversation in the window. | |
| 415 * | |
| 416 * @param win The window. | |
| 417 * | |
| 418 * @return The active conversation. | |
| 419 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
420 GaimConversation *gaim_conv_window_get_active_conversation( |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
421 const GaimConvWindow *win); |
| 4359 | 422 |
| 423 /** | |
| 424 * Returns the list of conversations in the specified window. | |
| 425 * | |
| 426 * @param win The window. | |
| 427 * | |
| 428 * @return The list of conversations. | |
| 429 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
430 GList *gaim_conv_window_get_conversations(const GaimConvWindow *win); |
| 4359 | 431 |
| 432 /** | |
| 433 * Returns a list of all windows. | |
| 434 * | |
| 435 * @return A list of windows. | |
| 436 */ | |
| 437 GList *gaim_get_windows(void); | |
| 438 | |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
439 /** |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
440 * Returns the first window containing a conversation of the specified type. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
441 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
442 * @param type The conversation type. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
443 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
444 * @return The window if found, or @c NULL if not found. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
445 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
446 GaimConvWindow *gaim_get_first_window_with_type(GaimConversationType type); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
447 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
448 /** |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
449 * Returns the last window containing a conversation of the specified type. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
450 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
451 * @param type The conversation type. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
452 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
453 * @return The window if found, or @c NULL if not found. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
454 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
455 GaimConvWindow *gaim_get_last_window_with_type(GaimConversationType type); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
456 |
| 4359 | 457 /*@}*/ |
| 458 | |
| 459 /**************************************************************************/ | |
| 460 /** @name Conversation API */ | |
| 461 /**************************************************************************/ | |
| 462 /*@{*/ | |
| 463 | |
| 464 /** | |
| 465 * Creates a new conversation of the specified type. | |
| 466 * | |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
467 * @param type The type of conversation. |
|
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
468 * @param account The account opening the conversation window on the gaim |
|
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
469 * user's end. |
|
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
470 * @param name The name of the conversation. |
| 4359 | 471 * |
| 472 * @return The new conversation. | |
| 473 */ | |
|
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
474 GaimConversation *gaim_conversation_new(GaimConversationType type, |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
475 GaimAccount *account, |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
476 const char *name); |
| 4359 | 477 |
| 478 /** | |
| 479 * Destroys the specified conversation and removes it from the parent | |
| 480 * window. | |
| 481 * | |
| 482 * If this conversation is the only one contained in the parent window, | |
| 483 * that window is also destroyed. | |
| 484 * | |
| 485 * @param conv The conversation to destroy. | |
| 486 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
487 void gaim_conversation_destroy(GaimConversation *conv); |
| 4359 | 488 |
| 489 /** | |
| 490 * Returns the specified conversation's type. | |
| 491 * | |
| 492 * @param conv The conversation. | |
| 493 * | |
| 494 * @return The conversation's type. | |
| 495 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
496 GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
| 4359 | 497 |
| 498 /** | |
| 499 * Sets the specified conversation's UI operations structure. | |
| 500 * | |
| 501 * @param conv The conversation. | |
| 502 * @param ops The UI conversation operations structure. | |
| 503 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
504 void gaim_conversation_set_ui_ops(GaimConversation *conv, |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
505 GaimConversationUiOps *ops); |
| 4359 | 506 |
| 507 /** | |
| 508 * Returns the specified conversation's UI operations structure. | |
|
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
509 * |
| 4359 | 510 * @param conv The conversation. |
| 511 * | |
| 512 * @return The operations structure. | |
| 513 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
514 GaimConversationUiOps *gaim_conversation_get_ui_ops( |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
515 const GaimConversation *conv); |
| 4359 | 516 |
| 517 /** | |
| 4491 | 518 * Sets the specified conversation's gaim_account. |
| 4359 | 519 * |
| 4491 | 520 * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 521 * is having a conversation/chat/flame with. |
| 522 * | |
| 523 * @param conv The conversation. | |
| 4491 | 524 * @param account The gaim_account. |
| 4359 | 525 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
526 void gaim_conversation_set_account(GaimConversation *conv, |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
527 GaimAccount *account); |
| 4359 | 528 |
| 529 /** | |
| 4491 | 530 * Returns the specified conversation's gaim_account. |
| 4359 | 531 * |
| 4491 | 532 * This gaim_account represents the user using gaim, not the person the user |
| 4359 | 533 * is having a conversation/chat/flame with. |
| 534 * | |
| 535 * @param conv The conversation. | |
| 536 * | |
| 4491 | 537 * @return The conversation's gaim_account. |
| 4359 | 538 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
539 GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
| 4359 | 540 |
| 541 /** | |
| 542 * Returns the specified conversation's gaim_connection. | |
| 543 * | |
| 544 * This is the same as gaim_conversation_get_user(conv)->gc. | |
| 545 * | |
| 546 * @param conv The conversation. | |
| 547 * | |
| 548 * @return The conversation's gaim_connection. | |
| 549 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
550 GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
| 4359 | 551 |
| 552 /** | |
| 553 * Sets the specified conversation's title. | |
| 554 * | |
| 555 * @param conv The conversation. | |
| 556 * @param title The title. | |
| 557 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
558 void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
| 4359 | 559 |
| 560 /** | |
| 561 * Returns the specified conversation's title. | |
| 562 * | |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
563 * @param conv The conversation. |
| 4359 | 564 * |
| 565 * @return The title. | |
| 566 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
567 const char *gaim_conversation_get_title(const GaimConversation *conv); |
| 4359 | 568 |
| 569 /** | |
| 570 * Automatically sets the specified conversation's title. | |
| 571 * | |
| 572 * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 573 * user's alias. | |
| 574 * | |
| 575 * @param conv The conversation. | |
| 576 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
577 void gaim_conversation_autoset_title(GaimConversation *conv); |
| 4359 | 578 |
| 579 /** | |
| 580 * Returns the specified conversation's index in the parent window. | |
| 581 * | |
| 582 * @param conv The conversation. | |
| 583 * | |
| 584 * @return The current index in the parent window. | |
| 585 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
586 int gaim_conversation_get_index(const GaimConversation *conv); |
| 4359 | 587 |
| 588 /** | |
| 589 * Sets the conversation's unseen state. | |
| 590 * | |
| 591 * @param conv The conversation. | |
| 592 * @param state The new unseen state. | |
| 593 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
594 void gaim_conversation_set_unseen(GaimConversation *conv, |
| 4359 | 595 GaimUnseenState state); |
| 596 | |
| 597 /** | |
| 598 * Returns the conversation's unseen state. | |
| 599 * | |
| 600 * @param conv The conversation. | |
| 601 * | |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
602 * @return The conversation's unseen state. |
| 4359 | 603 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
604 GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
| 4359 | 605 |
| 606 /** | |
|
7256
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
607 * Sets the specified conversation's name. |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
608 * |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
609 * @param conv The conversation. |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
610 * @param name The conversation's name. |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
611 */ |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
612 void gaim_conversation_set_name(GaimConversation *conv, const char *name); |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
613 |
|
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
614 /** |
| 4359 | 615 * Returns the specified conversation's name. |
| 616 * | |
| 617 * @param conv The conversation. | |
| 618 * | |
| 619 * @return The conversation's name. | |
| 620 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
621 const char *gaim_conversation_get_name(const GaimConversation *conv); |
| 4359 | 622 |
| 623 /** | |
| 624 * Enables or disables logging for this conversation. | |
| 625 * | |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
626 * @param conv The conversation. |
|
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
627 * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 628 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
629 void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
| 4359 | 630 |
| 631 /** | |
| 632 * Returns whether or not logging is enabled for this conversation. | |
| 633 * | |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
634 * @param conv The conversation. |
|
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
635 * |
| 4359 | 636 * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 637 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
638 gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
| 4359 | 639 |
| 640 /** | |
| 641 * Returns the specified conversation's send history. | |
| 642 * | |
| 643 * @param conv The conversation. | |
| 644 * | |
| 645 * @return The conversation's send history. | |
| 646 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
647 GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
| 4359 | 648 |
| 649 /** | |
| 650 * Sets the specified conversation's history. | |
| 651 * | |
| 652 * @param conv The conversation. | |
| 653 * @param history The history. | |
| 654 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
655 void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
| 4359 | 656 |
| 657 /** | |
| 658 * Returns the specified conversation's history. | |
| 659 * | |
| 660 * @param conv The conversation. | |
| 661 * | |
| 662 * @return The conversation's history. | |
| 663 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
664 GString *gaim_conversation_get_history(const GaimConversation *conv); |
| 4359 | 665 |
| 666 /** | |
| 667 * Returns the specified conversation's parent window. | |
| 668 * | |
| 669 * @param conv The conversation. | |
| 670 * | |
| 671 * @return The conversation's parent window. | |
| 672 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
673 GaimConvWindow *gaim_conversation_get_window(const GaimConversation *conv); |
| 4359 | 674 |
| 675 /** | |
| 676 * Returns the specified conversation's IM-specific data. | |
| 677 * | |
| 678 * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
| 679 * | |
| 680 * @param conv The conversation. | |
| 681 * | |
| 682 * @return The IM-specific data. | |
| 683 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
684 GaimConvIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
| 4359 | 685 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
686 #define GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) |
| 4359 | 687 |
| 688 /** | |
| 689 * Returns the specified conversation's chat-specific data. | |
| 690 * | |
| 691 * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
| 692 * | |
| 693 * @param conv The conversation. | |
| 694 * | |
| 695 * @return The chat-specific data. | |
| 696 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
697 GaimConvChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
| 4359 | 698 |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
699 #define GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) |
| 4359 | 700 |
| 701 /** | |
|
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
702 * Sets extra data for a conversation. |
|
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
703 * |
|
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
704 * @param conv The conversation. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
705 * @param key The unique key. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
706 * @param data The data to assign. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
707 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
708 void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
|
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
709 gpointer data); |
|
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
710 |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
711 /** |
|
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
712 * Returns extra data in a conversation. |
|
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
713 * |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
714 * @param conv The conversation. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
715 * @param key The unqiue key. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
716 * |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
717 * @return The data associated with the key. |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
718 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
719 gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
|
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
720 |
|
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
721 /** |
| 4359 | 722 * Returns a list of all conversations. |
| 723 * | |
| 724 * This list includes both IMs and chats. | |
| 725 * | |
| 726 * @return A GList of all conversations. | |
| 727 */ | |
| 728 GList *gaim_get_conversations(void); | |
| 729 | |
| 730 /** | |
| 731 * Returns a list of all IMs. | |
| 732 * | |
| 733 * @return A GList of all IMs. | |
| 734 */ | |
| 735 GList *gaim_get_ims(void); | |
| 736 | |
| 737 /** | |
| 738 * Returns a list of all chats. | |
| 739 * | |
| 740 * @return A GList of all chats. | |
| 741 */ | |
| 742 GList *gaim_get_chats(void); | |
| 743 | |
| 744 /** | |
| 745 * Finds the conversation with the specified name. | |
| 746 * | |
| 747 * @param name The name of the conversation. | |
| 748 * | |
| 749 * @return The conversation if found, or @c NULL otherwise. | |
| 750 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
751 GaimConversation *gaim_find_conversation(const char *name); |
| 4359 | 752 |
| 753 /** | |
| 754 * Finds a conversation with the specified name and user. | |
| 755 * | |
| 756 * @param name The name of the conversation. | |
| 4491 | 757 * @param account The gaim_account associated with the conversation. |
| 4359 | 758 * |
| 759 * @return The conversation if found, or @c NULL otherwise. | |
| 760 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
761 GaimConversation *gaim_find_conversation_with_account( |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5207
diff
changeset
|
762 const char *name, const GaimAccount *account); |
| 4359 | 763 |
| 764 /** | |
| 765 * Writes to a conversation window. | |
| 766 * | |
| 767 * This function should not be used to write IM or chat messages. Use | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
768 * gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will |
| 4359 | 769 * most likely call this anyway, but they may do their own formatting, |
| 770 * sound playback, etc. | |
| 771 * | |
| 772 * This can be used to write generic messages, such as "so and so closed | |
| 773 * the conversation window." | |
| 774 * | |
| 775 * @param conv The conversation. | |
| 776 * @param who The user who sent the message. | |
| 777 * @param message The message. | |
| 6621 | 778 * @param flags The message flags. |
| 4359 | 779 * @param mtime The time the message was sent. |
| 780 * | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
781 * @see gaim_conv_im_write() |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
782 * @see gaim_conv_chat_write() |
| 4359 | 783 */ |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
784 void gaim_conversation_write(GaimConversation *conv, const char *who, |
| 6982 | 785 const char *message, GaimMessageFlags flags, |
| 4359 | 786 time_t mtime); |
| 787 | |
| 788 /** | |
| 789 * Updates the progress bar on a conversation window | |
| 790 * (if one exists in the UI). | |
| 791 * | |
| 792 * This is used for loading images typically. | |
| 793 * | |
| 794 * @param conv The conversation. | |
| 795 * @param percent The percentage. | |
| 796 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
797 void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
| 4359 | 798 |
| 799 /** | |
| 800 * Updates the visual status and UI of a conversation. | |
| 801 * | |
| 802 * @param conv The conversation. | |
| 803 * @param type The update type. | |
| 804 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
805 void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
| 4359 | 806 |
| 807 /** | |
| 808 * Calls a function on each conversation. | |
| 809 * | |
| 810 * @param func The function. | |
| 811 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
812 void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
| 4359 | 813 |
| 814 /*@}*/ | |
| 815 | |
| 816 | |
| 817 /**************************************************************************/ | |
| 818 /** @name IM Conversation API */ | |
| 819 /**************************************************************************/ | |
| 820 /*@{*/ | |
| 821 | |
| 822 /** | |
| 823 * Gets an IM's parent conversation. | |
| 824 * | |
| 825 * @param im The IM. | |
| 826 * | |
| 827 * @return The parent conversation. | |
| 828 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
829 GaimConversation *gaim_conv_im_get_conversation(const GaimConvIm *im); |
| 4359 | 830 |
| 831 /** | |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
832 * Sets the IM's buddy icon. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
833 * |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
834 * This should only be called from within Gaim. You probably want to |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
835 * call gaim_buddy_icon_set_data(). |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
836 * |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
837 * @param im The IM. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
838 * @param icon The buddy icon. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
839 * |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
840 * @see gaim_buddy_icon_set_data() |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
841 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
842 void gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon); |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
843 |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
844 /** |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
845 * Returns the IM's buddy icon. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
846 * |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
847 * @param im The IM. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
848 * |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
849 * @return The buddy icon. |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
850 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
851 GaimBuddyIcon *gaim_conv_im_get_icon(const GaimConvIm *im); |
|
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
852 |
|
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
853 /** |
| 4359 | 854 * Sets the IM's typing state. |
| 855 * | |
| 856 * @param im The IM. | |
| 857 * @param state The typing state. | |
| 858 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
859 void gaim_conv_im_set_typing_state(GaimConvIm *im, int state); |
| 4359 | 860 |
| 861 /** | |
| 862 * Returns the IM's typing state. | |
| 863 * | |
| 864 * @param im The IM. | |
| 865 * | |
| 866 * @return The IM's typing state. | |
| 867 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
868 int gaim_conv_im_get_typing_state(const GaimConvIm *im); |
| 4359 | 869 |
| 870 /** | |
| 871 * Starts the IM's typing timeout. | |
| 872 * | |
| 873 * @param im The IM. | |
| 874 * @param timeout The timeout. | |
| 875 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
876 void gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout); |
| 4359 | 877 |
| 878 /** | |
| 879 * Stops the IM's typing timeout. | |
| 880 * | |
| 881 * @param im The IM. | |
| 882 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
883 void gaim_conv_im_stop_typing_timeout(GaimConvIm *im); |
| 4359 | 884 |
| 885 /** | |
| 886 * Returns the IM's typing timeout. | |
| 887 * | |
| 888 * @param im The IM. | |
| 889 * | |
| 890 * @return The timeout. | |
| 891 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
892 guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); |
| 4359 | 893 |
| 894 /** | |
| 895 * Sets the IM's time until it should send another typing notification. | |
| 896 * | |
| 897 * @param im The IM. | |
| 898 * @param val The time. | |
| 899 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
900 void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); |
| 4359 | 901 |
| 902 /** | |
| 903 * Returns the IM's time until it should send another typing notification. | |
| 904 * | |
| 905 * @param im The IM. | |
| 906 * | |
| 907 * @return The time. | |
| 908 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
909 time_t gaim_conv_im_get_type_again(const GaimConvIm *im); |
| 4359 | 910 |
| 911 /** | |
| 912 * Starts the IM's type again timeout. | |
| 913 * | |
| 914 * @param im The IM. | |
| 915 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
916 void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); |
| 4359 | 917 |
| 918 /** | |
| 919 * Stops the IM's type again timeout. | |
| 920 * | |
| 921 * @param im The IM. | |
| 922 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
923 void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); |
| 4359 | 924 |
| 925 /** | |
| 926 * Returns the IM's type again timeout interval. | |
| 927 * | |
| 928 * @param im The IM. | |
| 929 * | |
| 930 * @return The type again timeout interval. | |
| 931 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
932 guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); |
| 4359 | 933 |
| 934 /** | |
| 935 * Updates the visual typing notification for an IM conversation. | |
| 936 * | |
| 937 * @param im The IM. | |
| 938 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
939 void gaim_conv_im_update_typing(GaimConvIm *im); |
| 4359 | 940 |
| 941 /** | |
| 942 * Writes to an IM. | |
| 943 * | |
| 944 * @param im The IM. | |
| 945 * @param who The user who sent the message. | |
| 946 * @param message The message to write. | |
| 6621 | 947 * @param flags The message flags. |
| 4359 | 948 * @param mtime The time the message was sent. |
| 949 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
950 void gaim_conv_im_write(GaimConvIm *im, const char *who, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
951 const char *message, GaimMessageFlags flags, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
952 time_t mtime); |
| 4359 | 953 |
| 954 /** | |
| 955 * Sends a message to this IM conversation. | |
| 956 * | |
| 957 * @param im The IM. | |
| 958 * @param message The message to send. | |
| 959 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
960 void gaim_conv_im_send(GaimConvIm *im, const char *message); |
| 4359 | 961 |
| 962 /*@}*/ | |
| 963 | |
| 964 | |
| 965 /**************************************************************************/ | |
| 966 /** @name Chat Conversation API */ | |
| 967 /**************************************************************************/ | |
| 968 /*@{*/ | |
| 969 | |
| 970 /** | |
| 971 * Gets a chat's parent conversation. | |
| 972 * | |
| 973 * @param chat The chat. | |
| 974 * | |
| 975 * @return The parent conversation. | |
| 976 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
977 GaimConversation *gaim_conv_chat_get_conversation(const GaimConvChat *chat); |
| 4359 | 978 |
| 979 /** | |
| 980 * Sets the list of users in the chat room. | |
| 981 * | |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
982 * @note Calling this function will not update the display of the users. |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
983 * Please use gaim_conv_chat_add_user(), gaim_conv_chat_add_users(), |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
984 * gaim_conv_chat_remove_user(), and gaim_conv_chat_remove_users() instead. |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
985 * |
| 4359 | 986 * @param chat The chat. |
| 987 * @param users The list of users. | |
| 988 * | |
| 989 * @return The list passed. | |
| 990 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
991 GList *gaim_conv_chat_set_users(GaimConvChat *chat, GList *users); |
| 4359 | 992 |
| 993 /** | |
| 994 * Returns a list of users in the chat room. | |
| 995 * | |
| 996 * @param chat The chat. | |
| 997 * | |
| 998 * @return The list of users. | |
| 999 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1000 GList *gaim_conv_chat_get_users(const GaimConvChat *chat); |
| 4359 | 1001 |
| 1002 /** | |
| 1003 * Ignores a user in a chat room. | |
| 1004 * | |
| 1005 * @param chat The chat. | |
| 1006 * @param name The name of the user. | |
| 1007 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1008 void gaim_conv_chat_ignore(GaimConvChat *chat, const char *name); |
| 4359 | 1009 |
| 1010 /** | |
| 1011 * Unignores a user in a chat room. | |
| 1012 * | |
| 1013 * @param chat The chat. | |
| 1014 * @param name The name of the user. | |
| 1015 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1016 void gaim_conv_chat_unignore(GaimConvChat *chat, const char *name); |
| 4359 | 1017 |
| 1018 /** | |
| 1019 * Sets the list of ignored users in the chat room. | |
| 1020 * | |
| 1021 * @param chat The chat. | |
| 1022 * @param ignored The list of ignored users. | |
| 1023 * | |
| 1024 * @return The list passed. | |
| 1025 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1026 GList *gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored); |
| 4359 | 1027 |
| 1028 /** | |
| 1029 * Returns the list of ignored users in the chat room. | |
| 1030 * | |
| 1031 * @param chat The chat. | |
| 1032 * | |
| 1033 * @return The list of ignored users. | |
| 1034 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1035 GList *gaim_conv_chat_get_ignored(const GaimConvChat *chat); |
| 4359 | 1036 |
| 1037 /** | |
| 1038 * Returns the actual name of the specified ignored user, if it exists in | |
| 1039 * the ignore list. | |
| 1040 * | |
| 1041 * If the user found contains a prefix, such as '+' or '\@', this is also | |
| 1042 * returned. The username passed to the function does not have to have this | |
| 1043 * formatting. | |
| 1044 * | |
| 1045 * @param chat The chat. | |
| 1046 * @param user The user to check in the ignore list. | |
| 1047 * | |
| 1048 * @return The ignored user if found, complete with prefixes, or @c NULL | |
| 1049 * if not found. | |
| 1050 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1051 const char *gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1052 const char *user); |
| 4359 | 1053 |
| 1054 /** | |
| 1055 * Returns @c TRUE if the specified user is ignored. | |
| 1056 * | |
| 1057 * @param chat The chat. | |
| 1058 * @param user The user. | |
| 1059 * | |
| 1060 * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
| 1061 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1062 gboolean gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1063 const char *user); |
| 4359 | 1064 |
| 1065 /** | |
| 1066 * Sets the chat room's topic. | |
| 1067 * | |
| 1068 * @param chat The chat. | |
| 1069 * @param who The user that set the topic. | |
| 1070 * @param topic The topic. | |
| 1071 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1072 void gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1073 const char *topic); |
| 4359 | 1074 |
| 1075 /** | |
| 1076 * Returns the chat room's topic. | |
| 1077 * | |
| 1078 * @param chat The chat. | |
| 1079 * | |
| 1080 * @return The chat's topic. | |
| 1081 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1082 const char *gaim_conv_chat_get_topic(const GaimConvChat *chat); |
| 4359 | 1083 |
| 1084 /** | |
| 1085 * Sets the chat room's ID. | |
| 1086 * | |
| 1087 * @param chat The chat. | |
| 1088 * @param id The ID. | |
| 1089 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1090 void gaim_conv_chat_set_id(GaimConvChat *chat, int id); |
| 4359 | 1091 |
| 1092 /** | |
| 1093 * Returns the chat room's ID. | |
| 1094 * | |
| 1095 * @param chat The chat. | |
| 1096 * | |
| 1097 * @return The ID. | |
| 1098 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1099 int gaim_conv_chat_get_id(const GaimConvChat *chat); |
| 4359 | 1100 |
| 1101 /** | |
| 1102 * Writes to a chat. | |
| 1103 * | |
| 1104 * @param chat The chat. | |
| 1105 * @param who The user who sent the message. | |
| 1106 * @param message The message to write. | |
| 6621 | 1107 * @param flags The flags. |
| 4359 | 1108 * @param mtime The time the message was sent. |
| 1109 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1110 void gaim_conv_chat_write(GaimConvChat *chat, const char *who, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1111 const char *message, GaimMessageFlags flags, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1112 time_t mtime); |
| 4359 | 1113 |
| 1114 /** | |
| 1115 * Sends a message to this chat conversation. | |
| 1116 * | |
| 1117 * @param chat The chat. | |
| 1118 * @param message The message to send. | |
| 1119 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1120 void gaim_conv_chat_send(GaimConvChat *chat, const char *message); |
| 4359 | 1121 |
| 1122 /** | |
| 1123 * Adds a user to a chat. | |
| 1124 * | |
| 1125 * @param chat The chat. | |
| 1126 * @param user The user to add. | |
| 1127 * @param extra_msg An extra message to display with the join message. | |
| 1128 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1129 void gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1130 const char *extra_msg); |
| 4359 | 1131 |
| 1132 /** | |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1133 * Adds a list of users to a chat. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1134 * |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1135 * The data is copied from @a users, so it is up to the developer to |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1136 * free this list after calling this function. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1137 * |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1138 * @param chat The chat. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1139 * @param users The list of users to add. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1140 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1141 void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users); |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1142 |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1143 /** |
| 4359 | 1144 * Renames a user in a chat. |
| 1145 * | |
| 1146 * @param chat The chat. | |
| 1147 * @param old_user The old username. | |
| 1148 * @param new_user The new username. | |
| 1149 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1150 void gaim_conv_chat_rename_user(GaimConvChat *chat, const char *old_user, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1151 const char *new_user); |
| 4359 | 1152 |
| 1153 /** | |
| 1154 * Removes a user from a chat, optionally with a reason. | |
| 1155 * | |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1156 * It is up to the developer to free this list after calling this function. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1157 * |
| 4359 | 1158 * @param chat The chat. |
| 1159 * @param user The user that is being removed. | |
| 1160 * @param reason The optional reason given for the removal. Can be @c NULL. | |
| 1161 */ | |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1162 void gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1163 const char *reason); |
| 4359 | 1164 |
| 1165 /** | |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1166 * Removes a list of users from a chat, optionally with a single reason. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1167 * |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1168 * @param chat The chat. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1169 * @param users The users that are being removed. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1170 * @param reason The optional reason given for the removal. Can be @c NULL. |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1171 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1172 void gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, |
|
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1173 const char *reason); |
|
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1174 |
|
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1175 /** |
|
6414
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1176 * Clears all users from a chat. |
|
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1177 * |
|
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1178 * @param chat The chat. |
|
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1179 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1180 void gaim_conv_chat_clear_users(GaimConvChat *chat); |
|
6414
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1181 |
|
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1182 /** |
| 4359 | 1183 * Finds a chat with the specified chat ID. |
| 1184 * | |
| 1185 * @param gc The gaim_connection. | |
| 1186 * @param id The chat ID. | |
| 1187 * | |
| 1188 * @return The chat conversation. | |
| 1189 */ | |
|
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1190 GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
| 4359 | 1191 |
| 1192 /*@}*/ | |
| 1193 | |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1194 /**************************************************************************/ |
|
7122
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7118
diff
changeset
|
1195 /** @name Conversation Placement API */ |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1196 /**************************************************************************/ |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1197 /*@{*/ |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1198 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1199 /** |
| 5858 | 1200 * Returns a GList containing the IDs and Names of the registered placement |
| 1201 * functions. | |
| 1202 * | |
| 1203 * @return The list of IDs and names. | |
| 1204 */ | |
| 1205 GList *gaim_conv_placement_get_options(void); | |
| 1206 | |
| 1207 /** | |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1208 * Adds a conversation placement function to the list of possible functions. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1209 * |
|
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
1210 * @param id The unique ID of the placement function. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1211 * @param name The name of the function. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1212 * @param fnc A pointer to the function. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1213 */ |
|
6311
eaeac660c17c
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1214 void gaim_conv_placement_add_fnc(const char *id, const char *name, |
|
eaeac660c17c
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1215 GaimConvPlacementFunc fnc); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1216 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1217 /** |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1218 * Removes a conversation placement function from the list of possible |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1219 * functions. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1220 * |
| 5858 | 1221 * @param id The id of the function. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1222 */ |
| 5858 | 1223 void gaim_conv_placement_remove_fnc(const char *id); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1224 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1225 /** |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1226 * Returns the name of the conversation placement function at the |
| 5858 | 1227 * specified id. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1228 * |
| 5858 | 1229 * @param id The id. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1230 * |
| 5858 | 1231 * @return The name of the function, or @c NULL if this id is invalid. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1232 */ |
| 5858 | 1233 const char *gaim_conv_placement_get_name(const char *id); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1234 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1235 /** |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1236 * Returns a pointer to the conversation placement function at the |
| 5858 | 1237 * specified id. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1238 * |
| 5858 | 1239 * @param id The id. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1240 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1241 * @return A pointer to the function. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1242 */ |
| 5858 | 1243 GaimConvPlacementFunc gaim_conv_placement_get_fnc(const char *id); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1244 |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1245 /** |
|
7561
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1246 * Sets the current conversation placement function. |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1247 * |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1248 * @param func The new conversation placement function. |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1249 */ |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1250 void gaim_conv_placement_set_current_func(GaimConvPlacementFunc func); |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1251 |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1252 /** |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1253 * Returns the current conversation placement function. |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1254 * |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1255 * @return The current conversation placement function. |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1256 */ |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1257 GaimConvPlacementFunc gaim_conv_placement_get_current_func(void); |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1258 |
|
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1259 /** |
| 5858 | 1260 * Returns the id of the specified conversation placement function. |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1261 * |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1262 * @param fnc A pointer to the registered function. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1263 * |
| 5858 | 1264 * @return The id of the conversation, or NULL if the function is not |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1265 * registered. |
|
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1266 */ |
| 5858 | 1267 const char *gaim_conv_placement_get_fnc_id(GaimConvPlacementFunc fnc); |
|
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1268 |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1269 /*@}*/ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1270 |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1271 /**************************************************************************/ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1272 /** @name UI Registration Functions */ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1273 /**************************************************************************/ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1274 /*@{*/ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1275 |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1276 /** |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1277 * Sets the UI operations structure to be used in all gaim conversation |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1278 * windows. |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1279 * |
|
5207
2819f90a20ba
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1280 * @param ops The UI operations structure. |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1281 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1282 void gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops); |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1283 |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1284 /** |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1285 * Returns the gaim window UI operations structure to be used in |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1286 * new windows. |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1287 * |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1288 * @return A filled-out GaimConvWindowUiOps structure. |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1289 */ |
|
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1290 GaimConvWindowUiOps *gaim_conversations_get_win_ui_ops(void); |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1291 |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1292 /*@}*/ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1293 |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1294 /**************************************************************************/ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1295 /** @name Conversations Subsystem */ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1296 /**************************************************************************/ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1297 /*@{*/ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1298 |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1299 /** |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1300 * Returns the conversation subsystem handle. |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1301 * |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1302 * @return The conversation subsystem handle. |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1303 */ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1304 void *gaim_conversations_get_handle(void); |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1305 |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1306 /** |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1307 * Initializes the conversation subsystem. |
|
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1308 */ |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1309 void gaim_conversations_init(void); |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1310 |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1311 /** |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1312 * Uninitializes the conversation subsystem. |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1313 */ |
|
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1314 void gaim_conversations_uninit(void); |
|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1315 |
|
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1316 /*@}*/ |
|
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1317 |
|
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1318 #ifdef __cplusplus |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1319 } |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1320 #endif |
|
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1321 |
|
4890
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1322 #endif /* _GAIM_CONVERSATION_H_ */ |
