1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
|
/** @page conversation-signals Conversation Signals
@signals
@signal writing-im-msg
@signal wrote-im-msg
@signal sending-im-msg
@signal sent-im-msg
@signal receiving-im-msg
@signal received-im-msg
@signal blocked-im-msg
@signal writing-chat-msg
@signal wrote-chat-msg
@signal sending-chat-msg
@signal sent-chat-msg
@signal receiving-chat-msg
@signal received-chat-msg
@signal conversation-created
@signal conversation-updated
@signal deleting-conversation
@signal buddy-typing
@signal buddy-typing-stopped
@signal chat-buddy-joining
@signal chat-buddy-joined
@signal chat-buddy-flags
@signal chat-buddy-leaving
@signal chat-buddy-left
@signal chat-inviting-user
@signal chat-invited-user
@signal chat-invited
@signal chat-invite-blocked
@signal chat-joined
@signal chat-join-failed
@signal chat-left
@signal chat-topic-changed
@signal cleared-message-history
@signal conversation-extended-menu
@signal sent-attention
@signal got-attention
@endsignals
@see conversation.h
@signaldef writing-im-msg
@signalproto
gboolean (*writing_im_msg)(PurpleAccount *account, const char *who,
char **message, PurpleConversation *conv,
PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted before a message is written in an IM conversation. If the
message is changed, then the changed message is displayed and logged
instead of the original message.
@note
Make sure to free @a *message before you replace it!
@param account The account.
@param who The name of the user.
@param message A pointer to the message.
@param conv The conversation.
@param flags Flags for this message.
@return @c TRUE if the message should be canceled, or @c FALSE otherwise.
@endsignaldef
@signaldef wrote-im-msg
@signalproto
void (*wrote_im_msg)(PurpleAccount *account, const char *who,
char *message, PurpleConversation *conv,
PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted after a message is written and possibly displayed in a conversation.
@param account The account.
@param who The name of the user.
@param message The message.
@param conv The conversation.
@param flags Flags for this message.
@endsignaldef
@signaldef sending-im-msg
@signalproto
void (*sending_im_msg)(PurpleAccount *account, const char *receiver,
char **message);
@endsignalproto
@signaldesc
Emitted before sending an IM to a user. @a message is a pointer to the
message string, so the plugin can replace the message before being sent.
@note
Make sure to free @a *message before you replace it!
@param account The account the message is being sent on.
@param receiver The username of the receiver.
@param message A pointer to the outgoing message. This can be modified.
@endsignaldef
@signaldef sent-im-msg
@signalproto
void (*sent_im_msg)(PurpleAccount *account, const char *receiver,
const char *message);
@endsignalproto
@signaldesc
Emitted after sending an IM to a user.
@param account The account the message was sent on.
@param receiver The username of the receiver.
@param message The message that was sent.
@endsignaldef
@signaldef receiving-im-msg
@signalproto
gboolean (*receiving_im_msg)(PurpleAccount *account, char **sender,
char **message, PurpleConversation *conv,
PurpleMessageFlags *flags);
@endsignalproto
@signaldesc
Emitted when an IM is received. The callback can replace the name of the
sender, the message, or the flags by modifying the pointer to the
strings and integer. This can also be used to cancel a message by
returning @c TRUE.
@note
Make sure to free @a *sender and @a *message before you replace them!
@return @c TRUE if the message should be canceled, or @c FALSE otherwise.
@param account The account the message was received on.
@param sender A pointer to the username of the sender.
@param message A pointer to the message that was sent.
@param conv The IM conversation.
@param flags A pointer to the IM message flags.
@endsignaldef
@signaldef received-im-msg
@signalproto
void (*received_im_msg)(PurpleAccount *account, char *sender, char *message,
PurpleConversation *conv, PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted after an IM is received.
@param account The account the message was received on.
@param sender The username of the sender.
@param message The message that was sent.
@param conv The IM conversation.
@param flags The IM message flags.
@endsignaldef
@signaldef blocked-im-msg
@signalproto
void (*blocked_im_msg)(PurpleAccount *account, const char *sender,
const char *message, PurpleMessageFlags flags, time_t when);
@endsignalproto
@signaldesc
Emitted after an IM is blocked due to privacy settings.
@param account The account the message was received on.
@param sender The username of the sender.
@param message The message that was blocked.
@param flags The IM message flags.
@param when The time the message was sent.
@since 2.5.0
@endsignaldef
@signaldef writing-chat-msg
@signalproto
gboolean (*writing_chat_msg)(PurpleAccount *account, const char *who,
char **message, PurpleConversation *conv,
PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted before a message is written in a chat conversation. If the
message is changed, then the changed message is displayed and logged
instead of the original message.
@note
Make sure to free @a *message before you replace it!
@param account The account.
@param who The name of the user.
@param message A pointer to the message.
@param conv The conversation.
@param flags Flags for this message.
@return @c TRUE if the message should be canceled, or @c FALSE otherwise.
@endsignaldef
@signaldef wrote-chat-msg
@signalproto
void (*wrote_chat_msg)(PurpleAccount *account, const char *who,
char *message, PurpleConversation *conv,
PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted after a message is written and possibly displayed in a chat.
@param account The account.
@param who The name of the user.
@param message The message.
@param conv The conversation.
@param flags Flags for this message.
@endsignaldef
@signaldef sending-chat-msg
@signalproto
void (*sending_chat_msg)(PurpleAccount *account, char **message, int id);
@endsignalproto
@signaldesc
Emitted before sending a message to a chat. @a message is a pointer to the
message string, so the plugin can replace the message before being sent.
@note
Make sure to free @a *message before you replace it!
@param account The account the message is being sent on.
@param message A pointer to the message that will be sent.
@param id The ID of the chat.
@endsignaldef
@signaldef sent-chat-msg
@signalproto
void (*sent_chat_msg)(PurpleAccount *account, const char *message, int id);
@endsignalproto
@signaldesc
Emitted after sending a message to a chat.
@param account The account the message was sent on.
@param message The message that was sent.
@param id The ID of the chat.
@endsignaldef
@signaldef receiving-chat-msg
@signalproto
gboolean (*receiving_chat_msg)(PurpleAccount *account, char **sender,
char **message, PurpleConversation *conv, int *flags);
@endsignalproto
@signaldesc
Emitted when a chat message is received. The callback can replace the
name of the sender, the message, or the flags by modifying the pointer to the
strings. This can also be used to cancel displaying a message by
returning @c TRUE.
@note
Make sure to free @a *sender and @a *message before you replace them!
@return @c TRUE if the message should be canceled, or @c FALSE otherwise.
@param account The account the message was received on.
@param sender A pointer to the username of the sender.
@param message A pointer to the message that was sent.
@param conv The chat conversation.
@param flags A pointer to the chat message flags
@endsignaldef
@signaldef received-chat-msg
@signalproto
void (*received_chat_msg)(PurpleAccount *account, char *sender, char *message,
PurpleConversation *conv, PurpleMessageFlags flags);
@endsignalproto
@signaldesc
Emitted after a chat message is received.
@param account The account the message was received on.
@param sender The username of the sender.
@param message The message that was sent.
@param conv The chat conversation.
@param flags The chat message flags.
@endsignaldef
@signaldef conversation-created
@signalproto
void (*conversation_created)(PurpleConversation *conv);
@endsignalproto
@signaldesc
Emitted when a new conversation is created.
@param conv The new conversation.
@endsignaldef
@signaldef conversation-updated
@signalproto
void (*conversation_updated)(PurpleConversation *conv,
PurpleConvUpdateType type);
@endsignalproto
@signaldesc
Emitted when a conversation is updated.
@param conv The conversation that was updated.
@param type The type of update that was made.
@endsignaldef
@signaldef deleting-conversation
@signalproto
void (*deleting_conversation)(PurpleConversation *conv);
@endsignalproto
@signaldesc
Emitted just before a conversation is to be destroyed.
@param conv The conversation that's about to be destroyed.
@endsignaldef
@signaldef buddy-typing
@signalproto
void (*buddy_typing)(PurpleAccount *account, const char *name);
@endsignalproto
@signaldesc
Emitted when a buddy starts typing in a conversation window.
@param account The account of the user which is typing.
@param name The name of the user which is typing.
@endsignaldef
@signaldef buddy-typing-stopped
@signalproto
void (*buddy_typing_stopped)(PurpleAccount *account, const char *name);
@endsignalproto
@signaldesc
Emitted when a buddy stops typing in a conversation window.
@param account The account of the user which stopped typing.
@param name The name of the user which stopped typing.
@endsignaldef
@signaldef chat-buddy-joining
@signalproto
gboolean (*chat_buddy_joining)(PurpleConversation *conv, const char *name,
PurpleConvChatBuddyFlags flags);
@endsignalproto
@signaldesc
Emitted when a buddy is joining a chat, before the list of
users in the chat updates to include the new user.
@return @c TRUE if the join should be hidden, or @c FALSE otherwise.
@param conv The chat conversation.
@param name The name of the user that is joining the conversation.
@param flags The flags of the user that is joining the conversation.
@endsignaldef
@signaldef chat-buddy-joined
@signalproto
void (*chat_buddy_joined)(PurpleConversation *conv, const char *name,
PurpleConvChatBuddyFlags flags,
gboolean new_arrival);
@endsignalproto
@signaldesc
Emitted when a buddy joined a chat, after the users list is updated.
@param conv The chat conversation.
@param name The name of the user that has joined the conversation.
@param flags The flags of the user that has joined the conversation.
@param new_arrival If the buddy is a new arrival.
@endsignaldef
@signaldef chat-join-failed
@signalproto
void (*chat_join_failed)(PurpleConnection *gc, GHashTable *components);
@endsignalproto
@signaldesc
Emitted when an account fails to join a chat room
@param gc The PurpleConnection of the account which failed to join the chat.
@param data The components passed to serv_join_chat() originally.
The hash function should be g_str_hash() and the equal
function should be g_str_equal().
@endsignaldef
@signaldef chat-buddy-flags
@signalproto
void (*chat_buddy_flags)(PurpleConversation *conv, const char *name,
PurpleConvChatBuddyFlags oldflags,
PurpleConvChatBuddyFlags newflags);
@endsignalproto
@signaldesc
Emitted when a user in a chat changes flags.
@param conv The chat conversation.
@param name The name of the user.
@param oldflags The old flags.
@param newflags The new flags.
@endsignaldef
@signaldef chat-buddy-leaving
@signalproto
gboolean (*chat_buddy_leaving)(PurpleConversation *conv, const char *name,
const char *reason);
@endsignalproto
@signaldesc
Emitted when a user is leaving a chat, before the user list is updated.
This may include an optional reason why the user is leaving.
@return @c TRUE if the leave should be hidden, or @c FALSE otherwise.
@param conv The chat conversation.
@param name The name of the user that is leaving the chat.
@param reason The optional reason why the user is leaving.
@endsignaldef
@signaldef chat-buddy-left
@signalproto
void (*chat_buddy_left)(PurpleConversation *conv, const char *name,
const char *reason);
@endsignalproto
@signaldesc
Emitted when a user leaves a chat, after the user list is updated.
This may include an optional reason why the user is leaving.
@param conv The chat conversation.
@param name The name of the user that left the chat.
@param reason The optional reason why the user left the chat.
@endsignaldef
@signaldef chat-inviting-user
@signalproto
void (*chat_inviting_user)(PurpleConversation *conv, const char *name,
char **invite_message);
@endsignalproto
@signaldesc
Emitted when a user is being invited to the chat. The callback can
replace the invite message to the invitee by modifying the pointer to
the invite message.
@note
Make sure to free @a *invite_message before you replace it!
@param conv The chat conversation.
@param name The name of the user being invited.
@param invite_message A pointer to the reason why a user is being
invited.
@endsignaldef
@signaldef chat-invited-user
@signalproto
void (*chat_invited_user)(PurpleConversation *conv, const char *name,
const char *invite_message);
@endsignalproto
@signaldesc
Emitted when a user invited another user to a chat.
@param conv The chat conversation.
@param conv The name of the user that was invited.
@param invite_message The message to be sent to the user when invited.
@endsignaldef
@signaldef chat-invited
@signalproto
gint (*chat_invited)(PurpleAccount *account, const char *inviter,
const char *chat, const char *invite_message
const GHashTable *components);
@endsignalproto
@signaldesc
Emitted when an account was invited to a chat.
@param account The account being invited.
@param inviter The username of the person inviting the account.
@param chat The name of the chat you're being invited to.
@param invite_message The optional invite message.
@param components The components necessary if you want to call
serv_join_chat()
@return Less than zero if the invitation should be rejected, greater than
zero if the invitation should be accepted. If zero is returned, the
default behavior will be maintained: the user will be prompted.
@endsignaldef
@signaldef chat-invite-blocked
@signalproto
void (*chat_invite_blocked)(PurpleAccount *account, const char *inviter,
const char *name, const char *message, GHashTable *data);
@endsignalproto
@signaldesc
Emitted when an invitation to join a chat is blocked.
@param account The account the invitation was sent to.
@param inviter The name of the person sending the invitation.
@param name The name of the chat invited to.
@param message The invitation message sent.
@param data Hashtable containing data about the invited chat.
@since 2.5.0
@endsignaldef
@signaldef chat-joined
@signalproto
void (*chat_joined)(PurpleConversation *conv);
@endsignalproto
@signaldesc
Emitted when an account joins a chat room.
@param conv The conversation that joined the chat room.
@endsignaldef
@signaldef chat-left
@signalproto
void (*chat_left)(PurpleConversation *conv);
@endsignalproto
@signaldesc
Emitted when an account leaves a chat room.
@param conv The conversation that left the chat room.
@endsignaldef
@signaldef chat-topic-changed
@signalproto
void (*chat_topic_changed)(PurpleConversation *conv, const char *who, const char *topic);
@endsignalproto
@signaldesc
Emitted when the topic is changed in a chat.
@param conv The conversation whose topic changed.
@param who The name of the person that changed the topic.
@param topic The new topic.
@endsignaldef
@signaldef conversation-extended-menu
@signalproto
void (*conversation_extended_menu)(PurpleConversation *conv, GList **list);
@endsignalproto
@signaldesc
Emitted when the UI requests a list of plugin actions for a
conversation.
@param conv The conversation.
@param list A pointer to the list of actions.
@since 2.1.0
@endsignaldef
@signaldef cleared-message-history
@signalproto
void (*cleared_message_history)(PurpleConversation *conv);
@endsignalproto
@signaldesc
Emitted when the conversation history is cleared.
@param conv The conversation.
@since 2.8.0
@endsignaldef
@signaldef sent-attention
@signalproto
void (*got_attention)(PurpleAccount *account, const char *who,
PurpleConversation *conv, guint type)
@endsignalproto
@signaldesc
Emitted when receiving an attention message (buzz, nudge, etc.).
@param account The account
@param who The name of the person receiving the attention
@param conv The conversation
@param type The attention type (an index starting at 0)
@since 2.7.0
@endsignaldef
@signaldef got-attention
@signalproto
void (*got_attention)(PurpleAccount *account, const char *who,
PurpleConversation *conv, guint type)
@endsignalproto
@signaldesc
Emitted when receiving an attention message (buzz, nudge, etc.).
@param account The account
@param who The name of the person sending the attention
@param conv The conversation
@param type The attention type (an index starting at 0)
@since 2.7.0
@endsignaldef
*/
// vim: syntax=c.doxygen tw=75 et
|