comparison doc/conversation-signals.dox @ 8999:8f838ae3e710

[gaim-migrate @ 9774] " This patch renames the existing received-*-msg signals to receiving-*msg to fit the naming of other signals where a pointer to the message is passed (writing, sending, displaying) It adds new received-*-msg signals which are emitted after the receiving signals, in line with the other conversation signals (wrote, sent, displayed) This is necessary to allow plugins which depend on the final received message to work alongside plugins which may modify the message. One known example of this is festival-gaim alongside gaim-encryption - festival-gaim would try to "speak" the encrypted text: http://sf.net/tracker/?func=detail&aid=943216&group_id=89763&atid=591320 I've tested this with gaim-encryption and festival-gaim (locally modified so gaim-encryption uses the receiving signal and festival uses the received signal) All in-tree users of received-*-msg are updated to use receiving-*-msg if they do modify the message, the conversation-signals documentation is updated, the signals-test.c & signal-test.tcl plugins are also updated." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 21 May 2004 14:33:32 +0000
parents 374477c0dd76
children a226202bcae8
comparison
equal deleted inserted replaced
8998:3738d1eac0ad 8999:8f838ae3e710
5 @signal wrote-im-msg 5 @signal wrote-im-msg
6 @signal displaying-im-msg 6 @signal displaying-im-msg
7 @signal displayed-im-msg 7 @signal displayed-im-msg
8 @signal sending-im-msg 8 @signal sending-im-msg
9 @signal sent-im-msg 9 @signal sent-im-msg
10 @signal receiving-im-msg
10 @signal received-im-msg 11 @signal received-im-msg
11 @signal writing-chat-msg 12 @signal writing-chat-msg
12 @signal wrote-chat-msg 13 @signal wrote-chat-msg
13 @signal displaying-chat-msg 14 @signal displaying-chat-msg
14 @signal displayed-chat-msg 15 @signal displayed-chat-msg
15 @signal sending-chat-msg 16 @signal sending-chat-msg
16 @signal sent-chat-msg 17 @signal sent-chat-msg
18 @signal receiving-chat-msg
17 @signal received-chat-msg 19 @signal received-chat-msg
18 @signal conversation-switching 20 @signal conversation-switching
19 @signal conversation-switched 21 @signal conversation-switched
20 @signal conversation-created 22 @signal conversation-created
21 @signal deleting-conversation 23 @signal deleting-conversation
116 @param account The account the message was sent on. 118 @param account The account the message was sent on.
117 @param receiver The username of the receiver. 119 @param receiver The username of the receiver.
118 @param message The message that was sent. 120 @param message The message that was sent.
119 @endsignaldef 121 @endsignaldef
120 122
121 @signaldef received-im-msg 123 @signaldef receiving-im-msg
122 @signalproto 124 @signalproto
123 gboolean (*received_im_msg)(GaimAccount *account, char **sender, 125 gboolean (*receiving_im_msg)(GaimAccount *account, char **sender,
124 char **message, int *flags); 126 char **message, int *flags);
125 @endsignalproto 127 @endsignalproto
126 @signaldesc 128 @signaldesc
127 Emitted when an IM is received. The callback can replace the name of the 129 Emitted when an IM is received. The callback can replace the name of the
128 sender, the message, or the flags by modifying the pointer to the 130 sender, the message, or the flags by modifying the pointer to the
132 Make sure to free @a *sender and @a *message before you replace them! 134 Make sure to free @a *sender and @a *message before you replace them!
133 @return @c TRUE if the message should be canceled, or @c FALSE otherwise. 135 @return @c TRUE if the message should be canceled, or @c FALSE otherwise.
134 @param account The account the message was received on. 136 @param account The account the message was received on.
135 @param sender A pointer to the username of the sender. 137 @param sender A pointer to the username of the sender.
136 @param message A pointer to the message that was sent. 138 @param message A pointer to the message that was sent.
139 @param flags The message flags.
140 @endsignaldef
141
142 @signaldef received-im-msg
143 @signalproto
144 void (*received_im_msg)(GaimAccount *account, char *sender,
145 char *message, int flags);
146 @endsignalproto
147 @signaldesc
148 Emitted after an IM is received.
149 @param account The account the message was received on.
150 @param sender The username of the sender.
151 @param message The message that was sent.
137 @param flags The message flags. 152 @param flags The message flags.
138 @endsignaldef 153 @endsignaldef
139 154
140 @signaldef writing-chat-msg 155 @signaldef writing-chat-msg
141 @signalproto 156 @signalproto
220 @param account The account the message was sent on. 235 @param account The account the message was sent on.
221 @param message The message that was sent. 236 @param message The message that was sent.
222 @param id The ID of the chat. 237 @param id The ID of the chat.
223 @endsignaldef 238 @endsignaldef
224 239
225 @signaldef received-chat-msg 240 @signaldef receiving-chat-msg
226 @signalproto 241 @signalproto
227 gboolean (*received_chat_msg)(GaimAccount *account, char **sender, 242 gboolean (*receiving_chat_msg)(GaimAccount *account, char **sender,
228 char **message, GaimConversation *conv); 243 char **message, GaimConversation *conv);
229 @endsignalproto 244 @endsignalproto
230 @signaldesc 245 @signaldesc
231 Emitted when a chat message is received. The callback can replace the 246 Emitted when a chat message is received. The callback can replace the
232 name of the sender or the messageby modifying the pointer to the 247 name of the sender or the messageby modifying the pointer to the
236 Make sure to free @a *sender and @a *message before you replace them! 251 Make sure to free @a *sender and @a *message before you replace them!
237 @return @c TRUE if the message should be canceled, or @c FALSE otherwise. 252 @return @c TRUE if the message should be canceled, or @c FALSE otherwise.
238 @param account The account the message was received on. 253 @param account The account the message was received on.
239 @param sender A pointer to the username of the sender. 254 @param sender A pointer to the username of the sender.
240 @param message A pointer to the message that was sent. 255 @param message A pointer to the message that was sent.
256 @param conv The chat conversation.
257 @endsignaldef
258
259 @signaldef received-chat-msg
260 @signalproto
261 void (*received_chat_msg)(GaimAccount *account, char *sender,
262 char *message, GaimConversation *conv);
263 @endsignalproto
264 @signaldesc
265 Emitted after a chat message is received.
266 @param account The account the message was received on.
267 @param sender The username of the sender.
268 @param message The message that was sent.
241 @param conv The chat conversation. 269 @param conv The chat conversation.
242 @endsignaldef 270 @endsignaldef
243 271
244 @signaldef conversation-switching 272 @signaldef conversation-switching
245 @signalproto 273 @signalproto