Mercurial > pidgin.yaz
comparison libpurple/prpl.h @ 32010:ce968e115c95
propagate from branch 'im.pidgin.cpw.masca.p2p' (head 33ca865dacb9e5bcf763d06f6a42cbaca337cc64)
to branch 'im.pidgin.pidgin' (head 92f47f4e8b0cbb107fd97e1ab814d1cedbf109ad)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 06 May 2011 06:25:14 +0000 |
parents | 96e66fbe2881 |
children | 2c58de59bd57 |
comparison
equal
deleted
inserted
replaced
32009:f021d93a1f9b | 32010:ce968e115c95 |
---|---|
200 /** | 200 /** |
201 * Indicates that slash commands are native to this protocol. | 201 * Indicates that slash commands are native to this protocol. |
202 * Used as a hint that unknown commands should not be sent as messages. | 202 * Used as a hint that unknown commands should not be sent as messages. |
203 * @since 2.1.0 | 203 * @since 2.1.0 |
204 */ | 204 */ |
205 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400 | 205 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400, |
206 | |
207 /** | |
208 * Indicates that this protocol supports sending a user-supplied message | |
209 * along with an invitation. | |
210 * @since 2.8.0 | |
211 */ | |
212 OPT_PROTO_INVITE_MESSAGE = 0x00000800 | |
206 | 213 |
207 } PurpleProtocolOptions; | 214 } PurpleProtocolOptions; |
208 | 215 |
209 /** | 216 /** |
210 * A protocol plugin information structure. | 217 * A protocol plugin information structure. |
272 */ | 279 */ |
273 GList *(*chat_info)(PurpleConnection *); | 280 GList *(*chat_info)(PurpleConnection *); |
274 | 281 |
275 /** | 282 /** |
276 * Returns a hashtable which maps #proto_chat_entry struct identifiers | 283 * Returns a hashtable which maps #proto_chat_entry struct identifiers |
277 * to default options as strings based on chat_name. The resulting | 284 * to default options as strings based on chat_name. The resulting |
278 * hashtable should be created with g_hash_table_new_full(g_str_hash, | 285 * hashtable should be created with g_hash_table_new_full(g_str_hash, |
279 * g_str_equal, NULL, g_free);. Use #get_chat_name if you instead need | 286 * g_str_equal, NULL, g_free);. Use #get_chat_name if you instead need |
280 * to extract a chat name from a hashtable. | 287 * to extract a chat name from a hashtable. |
281 * | 288 * |
282 * @param chat_name The chat name to be turned into components | 289 * @param chat_name The chat name to be turned into components |
331 * | 338 * |
332 * This PRPL function may be called in situations in which the buddy is | 339 * This PRPL function may be called in situations in which the buddy is |
333 * already in the specified group. If the protocol supports | 340 * already in the specified group. If the protocol supports |
334 * authorization and the user is not already authorized to see the | 341 * authorization and the user is not already authorized to see the |
335 * status of \a buddy, \a add_buddy should request authorization. | 342 * status of \a buddy, \a add_buddy should request authorization. |
343 * | |
344 * @deprecated Since 2.8.0, add_buddy_with_invite is preferred. | |
345 * @see add_buddy_with_invite | |
336 */ | 346 */ |
337 void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); | 347 void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); |
338 void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups); | 348 void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups); |
339 void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); | 349 void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); |
340 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups); | 350 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups); |
364 */ | 374 */ |
365 void (*reject_chat)(PurpleConnection *, GHashTable *components); | 375 void (*reject_chat)(PurpleConnection *, GHashTable *components); |
366 | 376 |
367 /** | 377 /** |
368 * Returns a chat name based on the information in components. Use | 378 * Returns a chat name based on the information in components. Use |
369 * #chat_info_defaults if you instead need to generate a hashtable | 379 * #chat_info_defaults if you instead need to generate a hashtable |
370 * from a chat name. | 380 * from a chat name. |
371 * | 381 * |
372 * @param components A hashtable containing information about the chat. | 382 * @param components A hashtable containing information about the chat. |
373 */ | 383 */ |
374 char *(*get_chat_name)(GHashTable *components); | 384 char *(*get_chat_name)(GHashTable *components); |
375 | 385 |
376 /** | 386 /** |
377 * Invite a user to join a chat. | 387 * Invite a user to join a chat. |
378 * | 388 * |
379 * @param id The id of the chat to invite the user to. | 389 * @param id The id of the chat to invite the user to. |
380 * @param message A message displayed to the user when the invitation | 390 * @param message A message displayed to the user when the invitation |
381 * is received. | 391 * is received. |
382 * @param who The name of the user to send the invation to. | 392 * @param who The name of the user to send the invation to. |
383 */ | 393 */ |
384 void (*chat_invite)(PurpleConnection *, int id, | 394 void (*chat_invite)(PurpleConnection *, int id, |
385 const char *message, const char *who); | 395 const char *message, const char *who); |
620 * @since 2.7.0 | 630 * @since 2.7.0 |
621 */ | 631 */ |
622 void (*get_public_alias)(PurpleConnection *gc, | 632 void (*get_public_alias)(PurpleConnection *gc, |
623 PurpleGetPublicAliasSuccessCallback success_cb, | 633 PurpleGetPublicAliasSuccessCallback success_cb, |
624 PurpleGetPublicAliasFailureCallback failure_cb); | 634 PurpleGetPublicAliasFailureCallback failure_cb); |
635 | |
636 /** | |
637 * Add a buddy to a group on the server. | |
638 * | |
639 * This PRPL function may be called in situations in which the buddy is | |
640 * already in the specified group. If the protocol supports | |
641 * authorization and the user is not already authorized to see the | |
642 * status of \a buddy, \a add_buddy should request authorization. | |
643 * | |
644 * If authorization is required, then use the supplied invite message. | |
645 * | |
646 * @since 2.8.0 | |
647 */ | |
648 void (*add_buddy_with_invite)(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group, const char *message); | |
649 void (*add_buddies_with_invite)(PurpleConnection *pc, GList *buddies, GList *groups, const char *message); | |
625 }; | 650 }; |
626 | 651 |
627 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ | 652 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ |
628 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ | 653 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ |
629 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ | 654 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ |