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