Mercurial > pidgin.yaz
comparison libpurple/prpl.h @ 26190:d6e23439b77c
Change purple_prpl_can_do_media to purple_prpl_get_media_caps.
This allows for it to only be called once. From the caps returned you
can then tell which media capabilities a buddy has without having to
call the function for each different type.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Wed, 11 Feb 2009 00:01:20 +0000 |
parents | f0c2e27c7ae7 |
children | ff4212a5268f |
comparison
equal
deleted
inserted
replaced
26189:76104100cb87 | 26190:d6e23439b77c |
---|---|
464 /** | 464 /** |
465 * Checks to see if the given contact supports the given type of media session. | 465 * Checks to see if the given contact supports the given type of media session. |
466 * | 466 * |
467 * @param conn The connection the contact is on. | 467 * @param conn The connection the contact is on. |
468 * @param who The remote user to check for media capability with. | 468 * @param who The remote user to check for media capability with. |
469 * @param type The type of media session to check for. | 469 * @return The media caps the contact supports. |
470 * @return @c TRUE The contact supports the given media type, or @c FALSE otherwise. | 470 */ |
471 */ | 471 PurpleMediaCaps (*get_media_caps)(PurpleConnection *gc, |
472 gboolean (*can_do_media)(PurpleConnection *gc, const char *who, | 472 const char *who); |
473 PurpleMediaSessionType type); | |
474 }; | 473 }; |
475 | 474 |
476 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ | 475 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ |
477 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ | 476 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ |
478 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ | 477 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ |
763 /** | 762 /** |
764 * Determines if the contact supports the given media session type. | 763 * Determines if the contact supports the given media session type. |
765 * | 764 * |
766 * @param account The account the user is on. | 765 * @param account The account the user is on. |
767 * @param who The name of the contact to check capabilities for. | 766 * @param who The name of the contact to check capabilities for. |
768 * @param type The type of media session to check for. | 767 * |
769 * | 768 * @return The media caps the contact supports. |
770 * @return @c TRUE if the contact supports the session type, else @c FALSE. | 769 */ |
771 */ | 770 PurpleMediaCaps purple_prpl_get_media_caps(PurpleAccount *account, |
772 gboolean purple_prpl_can_do_media(PurpleAccount *account, | 771 const char *who); |
773 const char *who, | |
774 PurpleMediaSessionType type); | |
775 | 772 |
776 /** | 773 /** |
777 * Initiates a media session with the given contact. | 774 * Initiates a media session with the given contact. |
778 * | 775 * |
779 * @param account The account the user is on. | 776 * @param account The account the user is on. |