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