Mercurial > pidgin.yaz
annotate src/conversation.h @ 10615:2e720df50861
[gaim-migrate @ 12076]
Rob sent me a letter of resignation the other night. I suggested he post
an announcement to the webpage; I guess he wanted to keep it quiet.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 20 Feb 2005 22:40:11 +0000 |
parents | c3a964f4fc61 |
children | 4829abdc5c35 |
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; |
9554 | 40 typedef struct _GaimConvChatBuddy GaimConvChatBuddy; |
4359 | 41 |
42 /** | |
43 * A type of conversation. | |
44 */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
45 typedef enum |
4359 | 46 { |
47 GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
48 GAIM_CONV_IM, /**< Instant Message. */ | |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
49 GAIM_CONV_CHAT, /**< Chat room. */ |
10246 | 50 GAIM_CONV_MISC, /**< A misc. conversation. */ |
51 GAIM_CONV_ANY /**< Any type of conversation. */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
52 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
53 } GaimConversationType; |
4359 | 54 |
55 /** | |
56 * Unseen text states. | |
57 */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
58 typedef enum |
4359 | 59 { |
60 GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
61 GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
6405
96de6d9eb422
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
62 GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ |
96de6d9eb422
[gaim-migrate @ 6910]
Christian Hammond <chipx86@chipx86.com>
parents:
6311
diff
changeset
|
63 GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
64 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
65 } GaimUnseenState; |
4359 | 66 |
67 /** | |
68 * Conversation update type. | |
69 */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
70 typedef enum |
4359 | 71 { |
72 GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
73 was added. */ |
4359 | 74 GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
75 was removed. */ |
4491 | 76 GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
4359 | 77 GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
78 GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
79 GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
80 enabled or disabled. */ |
4359 | 81 GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
82 | |
83 /* | |
84 * XXX These need to go when we implement a more generic core/UI event | |
85 * system. | |
86 */ | |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
87 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
|
88 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
|
89 GAIM_CONV_UPDATE_AWAY, /**< The other user went away. */ |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
90 GAIM_CONV_UPDATE_ICON, /**< The other user's buddy icon changed. */ |
8256
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
91 GAIM_CONV_UPDATE_TITLE, |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
92 GAIM_CONV_UPDATE_CHATLEFT |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
93 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
94 } GaimConvUpdateType; |
4359 | 95 |
96 /** | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
97 * The typing state of a user. |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
98 */ |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
99 typedef enum |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
100 { |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
101 GAIM_NOT_TYPING = 0, /**< Not typing. */ |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
102 GAIM_TYPING, /**< Currently typing. */ |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
103 GAIM_TYPED /**< Stopped typing momentarily. */ |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
104 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
105 } GaimTypingState; |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
106 |
6621 | 107 /** |
108 * Flags applicable to a message. Most will have send, recv or system. | |
109 */ | |
110 typedef enum | |
111 { | |
6982 | 112 GAIM_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
113 GAIM_MESSAGE_RECV = 0x0002, /**< Incoming message. */ | |
114 GAIM_MESSAGE_SYSTEM = 0x0004, /**< System message. */ | |
115 GAIM_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ | |
116 GAIM_MESSAGE_COLORIZE = 0x0010, /**< Colorize nicks. */ | |
117 GAIM_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ | |
118 GAIM_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ | |
119 GAIM_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ | |
9584 | 120 GAIM_MESSAGE_ERROR = 0x0200, /**< Error message. */ |
10346 | 121 GAIM_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ |
122 GAIM_MESSAGE_RAW = 0x0800 /**< "Raw" message - don't apply formatting */ | |
10008 | 123 |
6621 | 124 } GaimMessageFlags; |
125 | |
9554 | 126 /** |
127 * Flags applicable to users in Chats. | |
128 */ | |
129 typedef enum | |
130 { | |
131 GAIM_CBFLAGS_NONE = 0x0000, /**< No flags */ | |
132 GAIM_CBFLAGS_VOICE = 0x0001, /**< Voiced user or "Participant" */ | |
133 GAIM_CBFLAGS_HALFOP = 0x0002, /**< Half-op */ | |
134 GAIM_CBFLAGS_OP = 0x0004, /**< Channel Op or Moderator */ | |
135 GAIM_CBFLAGS_FOUNDER = 0x0008 /**< Channel Founder */ | |
10008 | 136 |
9554 | 137 } GaimConvChatBuddyFlags; |
138 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
139 #include "account.h" |
9718 | 140 #include "buddyicon.h" |
7431 | 141 #include "log.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
142 #include "server.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
143 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
144 /** |
4359 | 145 * Conversation window operations. |
146 * | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
147 * 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
|
148 * structure to the GaimConvWindow. |
4359 | 149 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
150 struct _GaimConvWindowUiOps |
4359 | 151 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
152 GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
4359 | 153 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
154 void (*new_window)(GaimConvWindow *win); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
155 void (*destroy_window)(GaimConvWindow *win); |
4359 | 156 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
157 void (*show)(GaimConvWindow *win); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
158 void (*hide)(GaimConvWindow *win); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
159 void (*raise)(GaimConvWindow *win); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
160 void (*flash)(GaimConvWindow *win); |
4359 | 161 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
162 void (*switch_conversation)(GaimConvWindow *win, unsigned int index); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
163 void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
164 void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
165 void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
166 unsigned int newIndex); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
167 int (*get_active_index)(const GaimConvWindow *win); |
9260
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
168 gboolean (*has_focus)(GaimConvWindow *win); |
4359 | 169 }; |
170 | |
171 /** | |
172 * Conversation operations and events. | |
173 * | |
174 * Any UI representing a conversation must assign a filled-out | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
175 * GaimConversationUiOps structure to the GaimConversation. |
4359 | 176 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
177 struct _GaimConversationUiOps |
4359 | 178 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
179 void (*destroy_conversation)(GaimConversation *conv); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
180 void (*write_chat)(GaimConversation *conv, const char *who, |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
181 const char *message, GaimMessageFlags flags, |
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
182 time_t mtime); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
183 void (*write_im)(GaimConversation *conv, const char *who, |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
184 const char *message, GaimMessageFlags flags, |
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
185 time_t mtime); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
186 void (*write_conv)(GaimConversation *conv, const char *who, |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
187 const char *message, GaimMessageFlags flags, |
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
188 time_t mtime); |
4359 | 189 |
9846 | 190 void (*chat_add_user)(GaimConversation *conv, const char *user, gboolean new_arrival); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
191 void (*chat_add_users)(GaimConversation *conv, GList *users); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
192 void (*chat_rename_user)(GaimConversation *conv, |
8155
77d1252b3803
[gaim-migrate @ 8867]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
193 const char *old_name, const char *new_name); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
194 void (*chat_remove_user)(GaimConversation *conv, const char *user); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
195 void (*chat_remove_users)(GaimConversation *conv, GList *users); |
9554 | 196 void (*chat_update_user)(GaimConversation *conv, const char *user); |
4359 | 197 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
198 void (*update_progress)(GaimConversation *conv, float percent); |
4359 | 199 |
9260
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
200 gboolean (*has_focus)(GaimConversation *conv); |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
201 |
10526 | 202 /* Custom Smileys */ |
203 gboolean (*custom_smiley_add)(GaimConversation *conv, const char *smile); | |
204 void (*custom_smiley_write)(GaimConversation *conv, const char *smile, | |
205 const char * data, gint64 size); | |
206 void (*custom_smiley_close)(GaimConversation *conv, const char *smile); | |
207 | |
208 | |
209 | |
4359 | 210 /* Events */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
211 void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
9260
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
212 |
4359 | 213 }; |
214 | |
215 /** | |
216 * A core representation of a graphical window containing one or more | |
217 * conversations. | |
218 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
219 struct _GaimConvWindow |
4359 | 220 { |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
221 GList *conversations; /**< The conversations in the window. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
222 size_t conversation_count; /**< The number of conversations. */ |
4359 | 223 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
224 GaimConvWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
225 void *ui_data; /**< UI-specific data. */ |
4359 | 226 }; |
227 | |
228 /** | |
229 * Data specific to Instant Messages. | |
230 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
231 struct _GaimConvIm |
4359 | 232 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
233 GaimConversation *conv; /**< The parent conversation. */ |
4359 | 234 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
235 GaimTypingState typing_state; /**< The current typing state. */ |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
236 guint typing_timeout; /**< The typing timer handle. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
237 time_t type_again; /**< The type again time. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
238 guint type_again_timeout; /**< The type again timer handle. */ |
4359 | 239 |
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
240 GaimBuddyIcon *icon; /**< The buddy icon. */ |
4359 | 241 }; |
242 | |
243 /** | |
244 * Data specific to Chats. | |
245 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
246 struct _GaimConvChat |
4359 | 247 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
248 GaimConversation *conv; /**< The parent conversation. */ |
4359 | 249 |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
250 GList *in_room; /**< The users in the room. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
251 GList *ignored; /**< Ignored users. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
252 char *who; /**< The person who set the topic. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
253 char *topic; /**< The topic. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
254 int id; /**< The chat ID. */ |
8158 | 255 char *nick; /**< Your nick in this chat. */ |
8256
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
256 |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
257 gboolean left; /**< We left the chat and kept the window open */ |
4359 | 258 }; |
259 | |
260 /** | |
9554 | 261 * Data for "Chat Buddies" |
262 */ | |
263 struct _GaimConvChatBuddy | |
264 { | |
265 char *name; /**< The name */ | |
266 GaimConvChatBuddyFlags flags; /**< Flags (ops, voice etc.) */ | |
267 }; | |
268 | |
269 /** | |
4359 | 270 * A core representation of a conversation between two or more people. |
271 * | |
272 * 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
|
273 * in a GaimConvWindow and has a UI representation. |
4359 | 274 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
275 struct _GaimConversation |
4359 | 276 { |
277 GaimConversationType type; /**< The type of conversation. */ | |
278 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
279 GaimAccount *account; /**< The user using this conversation. */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
280 GaimConvWindow *window; /**< The parent window. */ |
4359 | 281 |
282 int conversation_pos; /**< The position in the window's list. */ | |
283 | |
284 char *name; /**< The name of the conversation. */ | |
285 char *title; /**< The window title. */ | |
286 | |
287 gboolean logging; /**< The status of logging. */ | |
8158 | 288 |
7431 | 289 GaimLog *log; /**< This conversation's log */ |
8158 | 290 |
4359 | 291 GList *send_history; /**< The send history. */ |
292 GString *history; /**< The conversation history. */ | |
293 | |
294 GaimUnseenState unseen; /**< The unseen tab state. */ | |
295 | |
296 union | |
297 { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
298 GaimConvIm *im; /**< IM-specific data. */ |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
299 GaimConvChat *chat; /**< Chat-specific data. */ |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
300 void *misc; /**< Misc. data. */ |
4359 | 301 |
302 } u; | |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
303 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
304 GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
305 void *ui_data; /**< UI-specific data. */ |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
306 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
307 GHashTable *data; /**< Plugin-specific data. */ |
4359 | 308 }; |
309 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
310 typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
4359 | 311 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
312 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
313 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
314 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
315 |
4359 | 316 /**************************************************************************/ |
317 /** @name Conversation Window API */ | |
318 /**************************************************************************/ | |
319 /*@{*/ | |
320 | |
321 /** | |
322 * Creates a new conversation window. | |
323 * | |
324 * 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
|
325 * gaim_conv_window_show() is called. |
4359 | 326 * |
327 * @return The new conversation window. | |
328 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
329 GaimConvWindow *gaim_conv_window_new(void); |
4359 | 330 |
331 /** | |
332 * Destroys the specified conversation window and all conversations in it. | |
333 * | |
334 * @param win The window to destroy. | |
335 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
336 void gaim_conv_window_destroy(GaimConvWindow *win); |
4359 | 337 |
338 /** | |
339 * Shows the specified conversation window. | |
340 * | |
341 * @param win The window. | |
342 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
343 void gaim_conv_window_show(GaimConvWindow *win); |
4359 | 344 |
345 /** | |
346 * Hides the specified conversation window. | |
347 * | |
348 * @param win The window. | |
349 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
350 void gaim_conv_window_hide(GaimConvWindow *win); |
4359 | 351 |
352 /** | |
353 * Raises the specified conversation window. | |
354 * | |
355 * @param win The window. | |
356 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
357 void gaim_conv_window_raise(GaimConvWindow *win); |
4359 | 358 |
359 /** | |
360 * 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
|
361 * |
4359 | 362 * @param win The window. |
363 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
364 void gaim_conv_window_flash(GaimConvWindow *win); |
4359 | 365 |
366 /** | |
367 * Sets the specified window's UI window operations structure. | |
368 * | |
369 * @param win The window. | |
370 * @param ops The UI window operations structure. | |
371 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
372 void gaim_conv_window_set_ui_ops(GaimConvWindow *win, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
373 GaimConvWindowUiOps *ops); |
4359 | 374 |
375 /** | |
376 * Returns the specified window's UI window operations structure. | |
377 * | |
378 * @param win The window. | |
379 * | |
380 * @return The UI window operations structure. | |
381 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
382 GaimConvWindowUiOps *gaim_conv_window_get_ui_ops(const GaimConvWindow *win); |
4359 | 383 |
384 /** | |
385 * Adds a conversation to this window. | |
386 * | |
387 * If the conversation already has a parent window, this will do nothing. | |
388 * | |
389 * @param win The window. | |
390 * @param conv The conversation. | |
391 * | |
392 * @return The new index of the conversation in the window. | |
393 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
394 int gaim_conv_window_add_conversation(GaimConvWindow *win, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
395 GaimConversation *conv); |
4359 | 396 |
397 /** | |
398 * Removes the conversation at the specified index from the window. | |
399 * | |
400 * If there is no conversation at this index, this will do nothing. | |
401 * | |
402 * @param win The window. | |
403 * @param index The index of the conversation. | |
404 * | |
405 * @return The conversation removed. | |
406 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
407 GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
408 unsigned int index); |
4359 | 409 |
410 /** | |
411 * Moves the conversation at the specified index in a window to a new index. | |
412 * | |
413 * @param win The window. | |
414 * @param index The index of the conversation to move. | |
415 * @param new_index The new index. | |
416 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
417 void gaim_conv_window_move_conversation(GaimConvWindow *win, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
418 unsigned int index, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
419 unsigned int new_index); |
4359 | 420 |
421 /** | |
422 * Returns the conversation in the window at the specified index. | |
423 * | |
424 * If the index is out of range, this returns @c NULL. | |
425 * | |
426 * @param win The window. | |
427 * @param index The index containing a conversation. | |
428 * | |
429 * @return The conversation at the specified index. | |
430 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
431 GaimConversation *gaim_conv_window_get_conversation_at( |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
432 const GaimConvWindow *win, unsigned int index); |
4359 | 433 |
434 /** | |
435 * Returns the number of conversations in the window. | |
436 * | |
437 * @param win The window. | |
438 * | |
439 * @return The number of conversations. | |
440 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
441 size_t gaim_conv_window_get_conversation_count(const GaimConvWindow *win); |
4359 | 442 |
443 /** | |
444 * Switches the active conversation to the one at the specified index. | |
445 * | |
446 * If @a index is out of range, this does nothing. | |
447 * | |
448 * @param win The window. | |
449 * @param index The new index. | |
450 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
451 void gaim_conv_window_switch_conversation(GaimConvWindow *win, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
452 unsigned int index); |
4359 | 453 |
454 /** | |
455 * Returns the active conversation in the window. | |
456 * | |
457 * @param win The window. | |
458 * | |
459 * @return The active conversation. | |
460 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
461 GaimConversation *gaim_conv_window_get_active_conversation( |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
462 const GaimConvWindow *win); |
4359 | 463 |
464 /** | |
9260
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
465 * Determines if a conversation window has focus |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
466 * |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
467 * @param win The window. |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
468 * |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
469 * @return @c TRUE if the conversation window has focus, @c FALSE if |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
470 * it does not or the UI does not have a concept of window focus |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
471 */ |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
472 gboolean gaim_conv_window_has_focus(GaimConvWindow *win); |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
473 |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
474 /** |
4359 | 475 * Returns the list of conversations in the specified window. |
476 * | |
477 * @param win The window. | |
478 * | |
479 * @return The list of conversations. | |
480 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
481 GList *gaim_conv_window_get_conversations(const GaimConvWindow *win); |
4359 | 482 |
483 /** | |
484 * Returns a list of all windows. | |
485 * | |
486 * @return A list of windows. | |
487 */ | |
488 GList *gaim_get_windows(void); | |
489 | |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
490 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
491 * Returns the first window containing a conversation of the specified type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
492 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
493 * @param type The conversation type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
494 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
495 * @return The window if found, or @c NULL if not found. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
496 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
497 GaimConvWindow *gaim_get_first_window_with_type(GaimConversationType type); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
498 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
499 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
500 * Returns the last window containing a conversation of the specified type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
501 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
502 * @param type The conversation type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
503 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
504 * @return The window if found, or @c NULL if not found. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
505 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
506 GaimConvWindow *gaim_get_last_window_with_type(GaimConversationType type); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
507 |
4359 | 508 /*@}*/ |
509 | |
510 /**************************************************************************/ | |
511 /** @name Conversation API */ | |
512 /**************************************************************************/ | |
513 /*@{*/ | |
514 | |
515 /** | |
516 * Creates a new conversation of the specified type. | |
517 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
518 * @param type The type of conversation. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
519 * @param account The account opening the conversation window on the gaim |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
520 * user's end. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
521 * @param name The name of the conversation. |
4359 | 522 * |
523 * @return The new conversation. | |
524 */ | |
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
525 GaimConversation *gaim_conversation_new(GaimConversationType type, |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
526 GaimAccount *account, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
527 const char *name); |
4359 | 528 |
529 /** | |
530 * Destroys the specified conversation and removes it from the parent | |
531 * window. | |
532 * | |
533 * If this conversation is the only one contained in the parent window, | |
534 * that window is also destroyed. | |
535 * | |
536 * @param conv The conversation to destroy. | |
537 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
538 void gaim_conversation_destroy(GaimConversation *conv); |
4359 | 539 |
540 /** | |
541 * Returns the specified conversation's type. | |
542 * | |
543 * @param conv The conversation. | |
544 * | |
545 * @return The conversation's type. | |
546 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
547 GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
4359 | 548 |
549 /** | |
550 * Sets the specified conversation's UI operations structure. | |
551 * | |
552 * @param conv The conversation. | |
553 * @param ops The UI conversation operations structure. | |
554 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
555 void gaim_conversation_set_ui_ops(GaimConversation *conv, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
556 GaimConversationUiOps *ops); |
4359 | 557 |
558 /** | |
559 * Returns the specified conversation's UI operations structure. | |
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
560 * |
4359 | 561 * @param conv The conversation. |
562 * | |
563 * @return The operations structure. | |
564 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
565 GaimConversationUiOps *gaim_conversation_get_ui_ops( |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
566 const GaimConversation *conv); |
4359 | 567 |
568 /** | |
4491 | 569 * Sets the specified conversation's gaim_account. |
4359 | 570 * |
4491 | 571 * This gaim_account represents the user using gaim, not the person the user |
4359 | 572 * is having a conversation/chat/flame with. |
573 * | |
574 * @param conv The conversation. | |
4491 | 575 * @param account The gaim_account. |
4359 | 576 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
577 void gaim_conversation_set_account(GaimConversation *conv, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
578 GaimAccount *account); |
4359 | 579 |
580 /** | |
4491 | 581 * Returns the specified conversation's gaim_account. |
4359 | 582 * |
4491 | 583 * This gaim_account represents the user using gaim, not the person the user |
4359 | 584 * is having a conversation/chat/flame with. |
585 * | |
586 * @param conv The conversation. | |
587 * | |
4491 | 588 * @return The conversation's gaim_account. |
4359 | 589 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
590 GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
4359 | 591 |
592 /** | |
593 * Returns the specified conversation's gaim_connection. | |
594 * | |
595 * This is the same as gaim_conversation_get_user(conv)->gc. | |
596 * | |
597 * @param conv The conversation. | |
598 * | |
599 * @return The conversation's gaim_connection. | |
600 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
601 GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
4359 | 602 |
603 /** | |
604 * Sets the specified conversation's title. | |
605 * | |
606 * @param conv The conversation. | |
607 * @param title The title. | |
608 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
609 void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
4359 | 610 |
611 /** | |
612 * Returns the specified conversation's title. | |
613 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
614 * @param conv The conversation. |
4359 | 615 * |
616 * @return The title. | |
617 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
618 const char *gaim_conversation_get_title(const GaimConversation *conv); |
4359 | 619 |
620 /** | |
621 * Automatically sets the specified conversation's title. | |
622 * | |
623 * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
624 * user's alias. | |
625 * | |
626 * @param conv The conversation. | |
627 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
628 void gaim_conversation_autoset_title(GaimConversation *conv); |
4359 | 629 |
630 /** | |
631 * Returns the specified conversation's index in the parent window. | |
632 * | |
633 * @param conv The conversation. | |
634 * | |
635 * @return The current index in the parent window. | |
636 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
637 int gaim_conversation_get_index(const GaimConversation *conv); |
4359 | 638 |
639 /** | |
640 * Sets the conversation's unseen state. | |
641 * | |
642 * @param conv The conversation. | |
643 * @param state The new unseen state. | |
644 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
645 void gaim_conversation_set_unseen(GaimConversation *conv, |
4359 | 646 GaimUnseenState state); |
647 | |
648 /** | |
649 * Returns the conversation's unseen state. | |
650 * | |
651 * @param conv The conversation. | |
652 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
653 * @return The conversation's unseen state. |
4359 | 654 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
655 GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
4359 | 656 |
657 /** | |
7256
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
658 * Sets the specified conversation's name. |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
659 * |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
660 * @param conv The conversation. |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
661 * @param name The conversation's name. |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
662 */ |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
663 void gaim_conversation_set_name(GaimConversation *conv, const char *name); |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
664 |
c93493c59ac3
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
665 /** |
4359 | 666 * Returns the specified conversation's name. |
667 * | |
668 * @param conv The conversation. | |
669 * | |
670 * @return The conversation's name. | |
671 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
672 const char *gaim_conversation_get_name(const GaimConversation *conv); |
4359 | 673 |
674 /** | |
675 * Enables or disables logging for this conversation. | |
676 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
677 * @param conv The conversation. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
678 * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
4359 | 679 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
680 void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
4359 | 681 |
682 /** | |
683 * Returns whether or not logging is enabled for this conversation. | |
684 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
685 * @param conv The conversation. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
686 * |
4359 | 687 * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
688 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
689 gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
4359 | 690 |
691 /** | |
692 * Returns the specified conversation's send history. | |
693 * | |
694 * @param conv The conversation. | |
695 * | |
696 * @return The conversation's send history. | |
697 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
698 GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
4359 | 699 |
700 /** | |
701 * Sets the specified conversation's history. | |
702 * | |
703 * @param conv The conversation. | |
704 * @param history The history. | |
705 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
706 void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
4359 | 707 |
708 /** | |
709 * Returns the specified conversation's history. | |
710 * | |
711 * @param conv The conversation. | |
712 * | |
713 * @return The conversation's history. | |
714 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
715 GString *gaim_conversation_get_history(const GaimConversation *conv); |
4359 | 716 |
717 /** | |
718 * Returns the specified conversation's parent window. | |
719 * | |
720 * @param conv The conversation. | |
721 * | |
722 * @return The conversation's parent window. | |
723 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
724 GaimConvWindow *gaim_conversation_get_window(const GaimConversation *conv); |
4359 | 725 |
726 /** | |
727 * Returns the specified conversation's IM-specific data. | |
728 * | |
729 * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
730 * | |
731 * @param conv The conversation. | |
732 * | |
733 * @return The IM-specific data. | |
734 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
735 GaimConvIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
4359 | 736 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
737 #define GAIM_CONV_IM(c) (gaim_conversation_get_im_data(c)) |
4359 | 738 |
739 /** | |
740 * Returns the specified conversation's chat-specific data. | |
741 * | |
742 * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
743 * | |
744 * @param conv The conversation. | |
745 * | |
746 * @return The chat-specific data. | |
747 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
748 GaimConvChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
4359 | 749 |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
750 #define GAIM_CONV_CHAT(c) (gaim_conversation_get_chat_data(c)) |
4359 | 751 |
752 /** | |
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
753 * Sets extra data for a conversation. |
6585
f30579b25253
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
754 * |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
755 * @param conv The conversation. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
756 * @param key The unique key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
757 * @param data The data to assign. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
758 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
759 void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
760 gpointer data); |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
761 |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
762 /** |
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
763 * Returns extra data in a conversation. |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
764 * |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
765 * @param conv The conversation. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
766 * @param key The unqiue key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
767 * |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
768 * @return The data associated with the key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
769 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
770 gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
771 |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
772 /** |
4359 | 773 * Returns a list of all conversations. |
774 * | |
775 * This list includes both IMs and chats. | |
776 * | |
777 * @return A GList of all conversations. | |
778 */ | |
779 GList *gaim_get_conversations(void); | |
780 | |
781 /** | |
782 * Returns a list of all IMs. | |
783 * | |
784 * @return A GList of all IMs. | |
785 */ | |
786 GList *gaim_get_ims(void); | |
787 | |
788 /** | |
789 * Returns a list of all chats. | |
790 * | |
791 * @return A GList of all chats. | |
792 */ | |
793 GList *gaim_get_chats(void); | |
794 | |
795 /** | |
10246 | 796 * Finds the conversation with the specified type and name. In most |
797 * cases you should use gaim_find_conversation_with_account() instead | |
798 * of this. | |
4359 | 799 * |
10246 | 800 * @param type The type of the conversation. |
4359 | 801 * @param name The name of the conversation. |
802 * | |
803 * @return The conversation if found, or @c NULL otherwise. | |
804 */ | |
10246 | 805 GaimConversation *gaim_find_conversation(GaimConversationType type, |
806 const char *name); | |
4359 | 807 |
808 /** | |
10246 | 809 * Finds a conversation with the specified type, name, and Gaim account. |
4359 | 810 * |
10246 | 811 * @param type The type of the conversation. |
4359 | 812 * @param name The name of the conversation. |
4491 | 813 * @param account The gaim_account associated with the conversation. |
4359 | 814 * |
815 * @return The conversation if found, or @c NULL otherwise. | |
816 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
817 GaimConversation *gaim_find_conversation_with_account( |
10246 | 818 GaimConversationType type, const char *name, |
819 const GaimAccount *account); | |
4359 | 820 |
821 /** | |
822 * Writes to a conversation window. | |
823 * | |
824 * 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
|
825 * gaim_conv_im_write() and gaim_conv_chat_write() instead. Those functions will |
4359 | 826 * most likely call this anyway, but they may do their own formatting, |
827 * sound playback, etc. | |
828 * | |
829 * This can be used to write generic messages, such as "so and so closed | |
830 * the conversation window." | |
831 * | |
832 * @param conv The conversation. | |
833 * @param who The user who sent the message. | |
834 * @param message The message. | |
6621 | 835 * @param flags The message flags. |
4359 | 836 * @param mtime The time the message was sent. |
837 * | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
838 * @see gaim_conv_im_write() |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
839 * @see gaim_conv_chat_write() |
4359 | 840 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
841 void gaim_conversation_write(GaimConversation *conv, const char *who, |
6982 | 842 const char *message, GaimMessageFlags flags, |
4359 | 843 time_t mtime); |
844 | |
845 /** | |
846 * Updates the progress bar on a conversation window | |
847 * (if one exists in the UI). | |
848 * | |
849 * This is used for loading images typically. | |
850 * | |
851 * @param conv The conversation. | |
852 * @param percent The percentage. | |
853 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
854 void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
4359 | 855 |
856 /** | |
9260
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
857 * Determines if a conversation has focus |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
858 * |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
859 * @param conv The conversation. |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
860 * |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
861 * @return @c TRUE if the conversation has focus, @c FALSE if |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
862 * it does not or the UI does not have a concept of conversation focus |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
863 */ |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
864 gboolean gaim_conversation_has_focus(GaimConversation *conv); |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
865 |
947876140943
[gaim-migrate @ 10059]
Christian Hammond <chipx86@chipx86.com>
parents:
9166
diff
changeset
|
866 /** |
4359 | 867 * Updates the visual status and UI of a conversation. |
868 * | |
869 * @param conv The conversation. | |
870 * @param type The update type. | |
871 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
872 void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
4359 | 873 |
874 /** | |
875 * Calls a function on each conversation. | |
876 * | |
877 * @param func The function. | |
878 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
879 void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
4359 | 880 |
881 /*@}*/ | |
882 | |
883 | |
884 /**************************************************************************/ | |
885 /** @name IM Conversation API */ | |
886 /**************************************************************************/ | |
887 /*@{*/ | |
888 | |
889 /** | |
890 * Gets an IM's parent conversation. | |
891 * | |
892 * @param im The IM. | |
893 * | |
894 * @return The parent conversation. | |
895 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
896 GaimConversation *gaim_conv_im_get_conversation(const GaimConvIm *im); |
4359 | 897 |
898 /** | |
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
899 * Sets the IM's buddy icon. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
900 * |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
901 * 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
|
902 * call gaim_buddy_icon_set_data(). |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
903 * |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
904 * @param im The IM. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
905 * @param icon The buddy icon. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
906 * |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
907 * @see gaim_buddy_icon_set_data() |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
908 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
909 void gaim_conv_im_set_icon(GaimConvIm *im, GaimBuddyIcon *icon); |
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
910 |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
911 /** |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
912 * Returns the IM's buddy icon. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
913 * |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
914 * @param im The IM. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
915 * |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
916 * @return The buddy icon. |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
917 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
918 GaimBuddyIcon *gaim_conv_im_get_icon(const GaimConvIm *im); |
6846
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
919 |
8ab95f4c9800
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
920 /** |
4359 | 921 * Sets the IM's typing state. |
922 * | |
923 * @param im The IM. | |
924 * @param state The typing state. | |
925 */ | |
8288
dde73afb3283
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
926 void gaim_conv_im_set_typing_state(GaimConvIm *im, GaimTypingState state); |
4359 | 927 |
928 /** | |
929 * Returns the IM's typing state. | |
930 * | |
931 * @param im The IM. | |
932 * | |
933 * @return The IM's typing state. | |
934 */ | |
8288
dde73afb3283
[gaim-migrate @ 9012]
Christian Hammond <chipx86@chipx86.com>
parents:
8256
diff
changeset
|
935 GaimTypingState gaim_conv_im_get_typing_state(const GaimConvIm *im); |
4359 | 936 |
937 /** | |
938 * Starts the IM's typing timeout. | |
939 * | |
940 * @param im The IM. | |
941 * @param timeout The timeout. | |
942 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
943 void gaim_conv_im_start_typing_timeout(GaimConvIm *im, int timeout); |
4359 | 944 |
945 /** | |
946 * Stops the IM's typing timeout. | |
947 * | |
948 * @param im The IM. | |
949 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
950 void gaim_conv_im_stop_typing_timeout(GaimConvIm *im); |
4359 | 951 |
952 /** | |
953 * Returns the IM's typing timeout. | |
954 * | |
955 * @param im The IM. | |
956 * | |
957 * @return The timeout. | |
958 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
959 guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); |
4359 | 960 |
961 /** | |
962 * Sets the IM's time until it should send another typing notification. | |
963 * | |
964 * @param im The IM. | |
965 * @param val The time. | |
966 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
967 void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); |
4359 | 968 |
969 /** | |
970 * Returns the IM's time until it should send another typing notification. | |
971 * | |
972 * @param im The IM. | |
973 * | |
974 * @return The time. | |
975 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
976 time_t gaim_conv_im_get_type_again(const GaimConvIm *im); |
4359 | 977 |
978 /** | |
979 * Starts the IM's type again timeout. | |
980 * | |
981 * @param im The IM. | |
982 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
983 void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); |
4359 | 984 |
985 /** | |
986 * Stops the IM's type again timeout. | |
987 * | |
988 * @param im The IM. | |
989 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
990 void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); |
4359 | 991 |
992 /** | |
993 * Returns the IM's type again timeout interval. | |
994 * | |
995 * @param im The IM. | |
996 * | |
997 * @return The type again timeout interval. | |
998 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
999 guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); |
4359 | 1000 |
1001 /** | |
1002 * Updates the visual typing notification for an IM conversation. | |
1003 * | |
1004 * @param im The IM. | |
1005 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1006 void gaim_conv_im_update_typing(GaimConvIm *im); |
4359 | 1007 |
1008 /** | |
1009 * Writes to an IM. | |
1010 * | |
1011 * @param im The IM. | |
1012 * @param who The user who sent the message. | |
1013 * @param message The message to write. | |
6621 | 1014 * @param flags The message flags. |
4359 | 1015 * @param mtime The time the message was sent. |
1016 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1017 void gaim_conv_im_write(GaimConvIm *im, const char *who, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1018 const char *message, GaimMessageFlags flags, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1019 time_t mtime); |
4359 | 1020 |
1021 /** | |
9627 | 1022 * Presents an IM-error to the user |
1023 * | |
1024 * This is a helper function to find a conversation, write an error to it, and | |
1025 * raise the window. If a conversation with this user doesn't already exist, | |
1026 * the function will return FALSE and the calling function can attempt to present | |
1027 * the error another way (gaim_notify_error, most likely) | |
1028 * | |
1029 * @param who The user this error is about | |
1030 * @param account The account this error is on | |
1031 * @param what The error | |
1032 * @return TRUE if the error was presented, else FALSE | |
1033 */ | |
1034 gboolean gaim_conv_present_error(const char *who, GaimAccount *account, const char *what); | |
1035 | |
1036 /** | |
4359 | 1037 * Sends a message to this IM conversation. |
1038 * | |
1039 * @param im The IM. | |
1040 * @param message The message to send. | |
1041 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1042 void gaim_conv_im_send(GaimConvIm *im, const char *message); |
4359 | 1043 |
10526 | 1044 /** |
10528 | 1045 * Adds a smiley to the conversation's smiley tree. If this returns |
1046 * @c TRUE you should call gaim_conv_custom_smiley_write() one or more | |
1047 * times, and then gaim_conv_custom_smiley_close(). If this returns | |
1048 * @c FALSE, either the conv or smile were invalid, or the icon was | |
1049 * found in the cache. In either case, calling write or close would | |
1050 * be an error. | |
10526 | 1051 * |
1052 * @param conv The conversation to associate the smiley with. | |
1053 * @param smile The text associated with the smiley | |
1054 * @param cksum_type The type of checksum. | |
1055 * @param chksum The checksum, as a NUL terminated base64 string. | |
10528 | 1056 * @return @c TRUE if an icon is expected, else FALSE. Note that |
10526 | 1057 * it is an error to never call gaim_conv_custom_smiley_close if |
1058 * this function returns @c TRUE, but an error to call it if | |
1059 * @c FALSE is returned. | |
1060 */ | |
1061 | |
1062 gboolean gaim_conv_custom_smiley_add(GaimConversation *conv, const char *smile, | |
1063 const char *cksum_type, const char *chksum); | |
1064 | |
1065 | |
1066 /** | |
1067 * Updates the image associated with the current smiley. | |
1068 * | |
1069 * @param conv The conversation associated with the smiley. | |
1070 * @param smile The text associated with the smiley. | |
1071 * @param data The actual image data. | |
1072 * @param size The length of the data. | |
1073 */ | |
1074 | |
1075 void gaim_conv_custom_smiley_write(GaimConversation *conv, | |
1076 const char *smile, const char * data, | |
1077 gint64 size); | |
1078 | |
1079 /** | |
1080 * Close the custom smiley, all data has been written with | |
1081 * gaim_conv_custom_smiley_write, and it is no longer valid | |
1082 * to call that function on that smiley. | |
1083 * | |
1084 * @param conv The gaim conversation associated with the smiley. | |
1085 * @param smile The text associated with the smiley | |
1086 */ | |
1087 | |
1088 void gaim_conv_custom_smiley_close(GaimConversation *conv, const char *smile); | |
1089 | |
4359 | 1090 /*@}*/ |
1091 | |
1092 | |
1093 /**************************************************************************/ | |
1094 /** @name Chat Conversation API */ | |
1095 /**************************************************************************/ | |
1096 /*@{*/ | |
1097 | |
1098 /** | |
1099 * Gets a chat's parent conversation. | |
1100 * | |
1101 * @param chat The chat. | |
1102 * | |
1103 * @return The parent conversation. | |
1104 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1105 GaimConversation *gaim_conv_chat_get_conversation(const GaimConvChat *chat); |
4359 | 1106 |
1107 /** | |
1108 * Sets the list of users in the chat room. | |
1109 * | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1110 * @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
|
1111 * 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
|
1112 * 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
|
1113 * |
4359 | 1114 * @param chat The chat. |
1115 * @param users The list of users. | |
1116 * | |
1117 * @return The list passed. | |
1118 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1119 GList *gaim_conv_chat_set_users(GaimConvChat *chat, GList *users); |
4359 | 1120 |
1121 /** | |
1122 * Returns a list of users in the chat room. | |
1123 * | |
1124 * @param chat The chat. | |
1125 * | |
1126 * @return The list of users. | |
1127 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1128 GList *gaim_conv_chat_get_users(const GaimConvChat *chat); |
4359 | 1129 |
1130 /** | |
1131 * Ignores a user in a chat room. | |
1132 * | |
1133 * @param chat The chat. | |
1134 * @param name The name of the user. | |
1135 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1136 void gaim_conv_chat_ignore(GaimConvChat *chat, const char *name); |
4359 | 1137 |
1138 /** | |
1139 * Unignores a user in a chat room. | |
1140 * | |
1141 * @param chat The chat. | |
1142 * @param name The name of the user. | |
1143 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1144 void gaim_conv_chat_unignore(GaimConvChat *chat, const char *name); |
4359 | 1145 |
1146 /** | |
1147 * Sets the list of ignored users in the chat room. | |
1148 * | |
1149 * @param chat The chat. | |
1150 * @param ignored The list of ignored users. | |
1151 * | |
1152 * @return The list passed. | |
1153 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1154 GList *gaim_conv_chat_set_ignored(GaimConvChat *chat, GList *ignored); |
4359 | 1155 |
1156 /** | |
1157 * Returns the list of ignored users in the chat room. | |
1158 * | |
1159 * @param chat The chat. | |
1160 * | |
1161 * @return The list of ignored users. | |
1162 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1163 GList *gaim_conv_chat_get_ignored(const GaimConvChat *chat); |
4359 | 1164 |
1165 /** | |
1166 * Returns the actual name of the specified ignored user, if it exists in | |
1167 * the ignore list. | |
1168 * | |
1169 * If the user found contains a prefix, such as '+' or '\@', this is also | |
1170 * returned. The username passed to the function does not have to have this | |
1171 * formatting. | |
1172 * | |
1173 * @param chat The chat. | |
1174 * @param user The user to check in the ignore list. | |
1175 * | |
1176 * @return The ignored user if found, complete with prefixes, or @c NULL | |
1177 * if not found. | |
1178 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1179 const char *gaim_conv_chat_get_ignored_user(const GaimConvChat *chat, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1180 const char *user); |
4359 | 1181 |
1182 /** | |
1183 * Returns @c TRUE if the specified user is ignored. | |
1184 * | |
1185 * @param chat The chat. | |
1186 * @param user The user. | |
1187 * | |
1188 * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
1189 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1190 gboolean gaim_conv_chat_is_user_ignored(const GaimConvChat *chat, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1191 const char *user); |
4359 | 1192 |
1193 /** | |
1194 * Sets the chat room's topic. | |
1195 * | |
1196 * @param chat The chat. | |
1197 * @param who The user that set the topic. | |
1198 * @param topic The topic. | |
1199 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1200 void gaim_conv_chat_set_topic(GaimConvChat *chat, const char *who, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1201 const char *topic); |
4359 | 1202 |
1203 /** | |
1204 * Returns the chat room's topic. | |
1205 * | |
1206 * @param chat The chat. | |
1207 * | |
1208 * @return The chat's topic. | |
1209 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1210 const char *gaim_conv_chat_get_topic(const GaimConvChat *chat); |
4359 | 1211 |
1212 /** | |
1213 * Sets the chat room's ID. | |
1214 * | |
1215 * @param chat The chat. | |
1216 * @param id The ID. | |
1217 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1218 void gaim_conv_chat_set_id(GaimConvChat *chat, int id); |
4359 | 1219 |
1220 /** | |
1221 * Returns the chat room's ID. | |
1222 * | |
1223 * @param chat The chat. | |
1224 * | |
1225 * @return The ID. | |
1226 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1227 int gaim_conv_chat_get_id(const GaimConvChat *chat); |
4359 | 1228 |
1229 /** | |
1230 * Writes to a chat. | |
1231 * | |
1232 * @param chat The chat. | |
1233 * @param who The user who sent the message. | |
1234 * @param message The message to write. | |
6621 | 1235 * @param flags The flags. |
4359 | 1236 * @param mtime The time the message was sent. |
1237 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1238 void gaim_conv_chat_write(GaimConvChat *chat, const char *who, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1239 const char *message, GaimMessageFlags flags, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1240 time_t mtime); |
4359 | 1241 |
1242 /** | |
1243 * Sends a message to this chat conversation. | |
1244 * | |
1245 * @param chat The chat. | |
1246 * @param message The message to send. | |
1247 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1248 void gaim_conv_chat_send(GaimConvChat *chat, const char *message); |
4359 | 1249 |
1250 /** | |
1251 * Adds a user to a chat. | |
1252 * | |
9939 | 1253 * @param chat The chat. |
1254 * @param user The user to add. | |
1255 * @param extra_msg An extra message to display with the join message. | |
1256 * @param flags The users flags | |
1257 * @param new_arrival Decides whether or not to show a join notice. | |
4359 | 1258 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1259 void gaim_conv_chat_add_user(GaimConvChat *chat, const char *user, |
9846 | 1260 const char *extra_msg, GaimConvChatBuddyFlags flags, |
1261 gboolean new_arrival); | |
4359 | 1262 |
1263 /** | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1264 * Adds a list of users to a chat. |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1265 * |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1266 * 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
|
1267 * free this list after calling this function. |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1268 * |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1269 * @param chat The chat. |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1270 * @param users The list of users to add. |
9554 | 1271 * @param flags The list of flags for each user. |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1272 */ |
9554 | 1273 void gaim_conv_chat_add_users(GaimConvChat *chat, GList *users, GList *flags); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1274 |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1275 /** |
4359 | 1276 * Renames a user in a chat. |
1277 * | |
1278 * @param chat The chat. | |
1279 * @param old_user The old username. | |
1280 * @param new_user The new username. | |
1281 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1282 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
|
1283 const char *new_user); |
4359 | 1284 |
1285 /** | |
1286 * Removes a user from a chat, optionally with a reason. | |
1287 * | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1288 * 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
|
1289 * |
4359 | 1290 * @param chat The chat. |
1291 * @param user The user that is being removed. | |
1292 * @param reason The optional reason given for the removal. Can be @c NULL. | |
1293 */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1294 void gaim_conv_chat_remove_user(GaimConvChat *chat, const char *user, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1295 const char *reason); |
4359 | 1296 |
1297 /** | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1298 * 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
|
1299 * |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1300 * @param chat The chat. |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1301 * @param users The users that are being removed. |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1302 * @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
|
1303 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1304 void gaim_conv_chat_remove_users(GaimConvChat *chat, GList *users, |
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1305 const char *reason); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1306 |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6405
diff
changeset
|
1307 /** |
9554 | 1308 * Finds a user in a chat |
1309 * | |
1310 * @param chat The chat. | |
1311 * @param user The user to look for. | |
1312 * | |
1313 * @return TRUE if the user is in the chat, FALSE if not | |
1314 */ | |
1315 gboolean gaim_conv_chat_find_user(GaimConvChat *chat, const char *user); | |
1316 | |
1317 /** | |
1318 * Set a users flags in a chat | |
1319 * | |
1320 * @param chat The chat. | |
1321 * @param user The user to update. | |
1322 * @param flags The new flags. | |
1323 */ | |
1324 void gaim_conv_chat_user_set_flags(GaimConvChat *chat, const char *user, | |
1325 GaimConvChatBuddyFlags flags); | |
1326 | |
1327 /** | |
1328 * Get the flags for a user in a chat | |
1329 * | |
1330 * @param chat The chat. | |
1331 * @param user The user to find the flags for | |
1332 * | |
1333 * @return The flags for the user | |
1334 */ | |
1335 GaimConvChatBuddyFlags gaim_conv_chat_user_get_flags(GaimConvChat *chat, | |
1336 const char *user); | |
1337 | |
1338 /** | |
6414
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1339 * Clears all users from a chat. |
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1340 * |
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1341 * @param chat The chat. |
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1342 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1343 void gaim_conv_chat_clear_users(GaimConvChat *chat); |
6414
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1344 |
874a5c9f4eb8
[gaim-migrate @ 6921]
Christian Hammond <chipx86@chipx86.com>
parents:
6407
diff
changeset
|
1345 /** |
8158 | 1346 * Sets your nickname (used for hilighting) for a chat. |
1347 * | |
1348 * @param chat The chat. | |
1349 * @param nick The nick. | |
1350 */ | |
1351 void gaim_conv_chat_set_nick(GaimConvChat *chat, const char *nick); | |
1352 | |
1353 /** | |
1354 * Gets your nickname (used for hilighting) for a chat. | |
1355 * | |
1356 * @param chat The chat. | |
1357 * @return The nick. | |
1358 */ | |
1359 const char *gaim_conv_chat_get_nick(GaimConvChat *chat); | |
1360 | |
1361 /** | |
4359 | 1362 * Finds a chat with the specified chat ID. |
1363 * | |
1364 * @param gc The gaim_connection. | |
1365 * @param id The chat ID. | |
1366 * | |
1367 * @return The chat conversation. | |
1368 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1369 GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
4359 | 1370 |
8256
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1371 /** |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1372 * Lets the core know we left a chat, without destroying it. |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1373 * Called from serv_got_chat_left(). |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1374 * |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1375 * @param chat The chat. |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1376 */ |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1377 void gaim_conv_chat_left(GaimConvChat *chat); |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1378 |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1379 /** |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1380 * Returns true if we're no longer in this chat, |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1381 * and just left the window open. |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1382 * |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1383 * @param chat The chat. |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1384 * |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1385 * @return @c TRUE if we left the chat already, @c FALSE if |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1386 * we're still there. |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1387 */ |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1388 gboolean gaim_conv_chat_has_left(GaimConvChat *chat); |
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8158
diff
changeset
|
1389 |
9554 | 1390 /** |
1391 * Creates a new chat buddy | |
1392 * | |
1393 * @param name The name. | |
1394 * @param flags The flags. | |
1395 * | |
1396 * @return The new chat buddy | |
1397 */ | |
1398 GaimConvChatBuddy *gaim_conv_chat_cb_new(const char *name, | |
1399 GaimConvChatBuddyFlags flags); | |
1400 | |
1401 /** | |
1402 * Find a chat buddy in a chat | |
1403 * | |
1404 * @param chat The chat. | |
1405 * @param name The name of the chat buddy to find. | |
1406 */ | |
1407 GaimConvChatBuddy *gaim_conv_chat_cb_find(GaimConvChat *chat, const char *name); | |
1408 | |
1409 /** | |
1410 * Get the name of a chat buddy | |
1411 * | |
1412 * @param cb The chat buddy. | |
1413 * | |
1414 * @return The name of the chat buddy. | |
1415 */ | |
1416 const char *gaim_conv_chat_cb_get_name(GaimConvChatBuddy *cb); | |
1417 | |
1418 /** | |
1419 * Destroys a chat buddy | |
1420 * | |
1421 * @param cb The chat buddy to destroy | |
1422 */ | |
1423 void gaim_conv_chat_cb_destroy(GaimConvChatBuddy *cb); | |
1424 | |
4359 | 1425 /*@}*/ |
1426 | |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1427 /**************************************************************************/ |
7122
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7118
diff
changeset
|
1428 /** @name Conversation Placement API */ |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1429 /**************************************************************************/ |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1430 /*@{*/ |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1431 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1432 /** |
5858 | 1433 * Returns a GList containing the IDs and Names of the registered placement |
1434 * functions. | |
1435 * | |
1436 * @return The list of IDs and names. | |
1437 */ | |
1438 GList *gaim_conv_placement_get_options(void); | |
1439 | |
1440 /** | |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1441 * Adds a conversation placement function to the list of possible functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1442 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
1443 * @param id The unique ID of the placement function. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1444 * @param name The name of the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1445 * @param fnc A pointer to the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1446 */ |
6311
eaeac660c17c
[gaim-migrate @ 6810]
Christian Hammond <chipx86@chipx86.com>
parents:
6063
diff
changeset
|
1447 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
|
1448 GaimConvPlacementFunc fnc); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1449 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1450 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1451 * Removes a conversation placement function from the list of possible |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1452 * functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1453 * |
5858 | 1454 * @param id The id of the function. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1455 */ |
5858 | 1456 void gaim_conv_placement_remove_fnc(const char *id); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1457 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1458 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1459 * Returns the name of the conversation placement function at the |
5858 | 1460 * specified id. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1461 * |
5858 | 1462 * @param id The id. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1463 * |
5858 | 1464 * @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
|
1465 */ |
5858 | 1466 const char *gaim_conv_placement_get_name(const char *id); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1467 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1468 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1469 * Returns a pointer to the conversation placement function at the |
5858 | 1470 * specified id. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1471 * |
5858 | 1472 * @param id The id. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1473 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1474 * @return A pointer to the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1475 */ |
5858 | 1476 GaimConvPlacementFunc gaim_conv_placement_get_fnc(const char *id); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1477 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1478 /** |
7561
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1479 * Sets the current conversation placement function. |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1480 * |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1481 * @param func The new conversation placement function. |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1482 */ |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1483 void gaim_conv_placement_set_current_func(GaimConvPlacementFunc func); |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1484 |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1485 /** |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1486 * Returns the current conversation placement function. |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1487 * |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1488 * @return The current conversation placement function. |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1489 */ |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1490 GaimConvPlacementFunc gaim_conv_placement_get_current_func(void); |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1491 |
cdfdbabd3266
[gaim-migrate @ 8175]
Christian Hammond <chipx86@chipx86.com>
parents:
7431
diff
changeset
|
1492 /** |
5858 | 1493 * Returns the id of the specified conversation placement function. |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1494 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1495 * @param fnc A pointer to the registered function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1496 * |
5858 | 1497 * @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
|
1498 * registered. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1499 */ |
5858 | 1500 const char *gaim_conv_placement_get_fnc_id(GaimConvPlacementFunc fnc); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1501 |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1502 /*@}*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1503 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1504 /**************************************************************************/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1505 /** @name UI Registration Functions */ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1506 /**************************************************************************/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1507 /*@{*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1508 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1509 /** |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1510 * 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
|
1511 * windows. |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1512 * |
5207
2819f90a20ba
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1513 * @param ops The UI operations structure. |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1514 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1515 void gaim_conversations_set_win_ui_ops(GaimConvWindowUiOps *ops); |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1516 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1517 /** |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1518 * Returns the gaim window UI operations structure to be used in |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1519 * new windows. |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1520 * |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1521 * @return A filled-out GaimConvWindowUiOps structure. |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1522 */ |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
1523 GaimConvWindowUiOps *gaim_conversations_get_win_ui_ops(void); |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1524 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1525 /*@}*/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1526 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1527 /**************************************************************************/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1528 /** @name Conversations Subsystem */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1529 /**************************************************************************/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1530 /*@{*/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1531 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1532 /** |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1533 * Returns the conversation subsystem handle. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1534 * |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1535 * @return The conversation subsystem handle. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1536 */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1537 void *gaim_conversations_get_handle(void); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1538 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1539 /** |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1540 * Initializes the conversation subsystem. |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1541 */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1542 void gaim_conversations_init(void); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1543 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1544 /** |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1545 * Uninitializes the conversation subsystem. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1546 */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
1547 void gaim_conversations_uninit(void); |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
1548 |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1549 /*@}*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1550 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1551 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1552 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1553 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
1554 |
4890
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1555 #endif /* _GAIM_CONVERSATION_H_ */ |