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