comparison libpurple/prpl.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
29 29
30 #ifndef _PURPLE_PRPL_H_ 30 #ifndef _PURPLE_PRPL_H_
31 #define _PURPLE_PRPL_H_ 31 #define _PURPLE_PRPL_H_
32 32
33 typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo; 33 typedef struct _PurplePluginProtocolInfo PurplePluginProtocolInfo;
34 /** @copydoc _PurpleAttentionType */ 34
35 /** Represents "nudges" and "buzzes" that you may send to a buddy to attract
36 * their attention (or vice-versa).
37 */
35 typedef struct _PurpleAttentionType PurpleAttentionType; 38 typedef struct _PurpleAttentionType PurpleAttentionType;
36 39
37 /**************************************************************************/ 40 /**************************************************************************/
38 /** @name Basic Protocol Information */ 41 /** @name Basic Protocol Information */
39 /**************************************************************************/ 42 /**************************************************************************/
109 int min; /**< Minimum value in case of integer */ 112 int min; /**< Minimum value in case of integer */
110 int max; /**< Maximum value in case of integer */ 113 int max; /**< Maximum value in case of integer */
111 gboolean secret; /**< True if the entry is secret (password) */ 114 gboolean secret; /**< True if the entry is secret (password) */
112 }; 115 };
113 116
114 /** Represents "nudges" and "buzzes" that you may send to a buddy to attract
115 * their attention (or vice-versa).
116 */
117 struct _PurpleAttentionType
118 {
119 const char *name; /**< Shown in GUI elements */
120 const char *incoming_description; /**< Shown when sent */
121 const char *outgoing_description; /**< Shown when receied */
122 const char *icon_name; /**< Icon to display (optional) */
123 const char *unlocalized_name; /**< Unlocalized name for UIs needing it */
124
125 /* Reserved fields for future purposes */
126 gpointer _reserved2;
127 gpointer _reserved3;
128 gpointer _reserved4;
129 };
130
131 /** 117 /**
132 * Protocol options 118 * Protocol options
133 * 119 *
134 * These should all be stuff that some plugins can do and others can't. 120 * These should all be stuff that some plugins can do and others can't.
135 */ 121 */
198 OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200, 184 OPT_PROTO_REGISTER_NOSCREENNAME = 0x00000200,
199 185
200 /** 186 /**
201 * Indicates that slash commands are native to this protocol. 187 * Indicates that slash commands are native to this protocol.
202 * Used as a hint that unknown commands should not be sent as messages. 188 * Used as a hint that unknown commands should not be sent as messages.
203 * @since 2.1.0
204 */ 189 */
205 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400, 190 OPT_PROTO_SLASH_COMMANDS_NATIVE = 0x00000400,
206 191
207 /** 192 /**
208 * Indicates that this protocol supports sending a user-supplied message 193 * Indicates that this protocol supports sending a user-supplied message
209 * along with an invitation. 194 * along with an invitation.
210 * @since 2.8.0
211 */ 195 */
212 OPT_PROTO_INVITE_MESSAGE = 0x00000800 196 OPT_PROTO_INVITE_MESSAGE = 0x00000800
213 197
214 } PurpleProtocolOptions; 198 } PurpleProtocolOptions;
215 199
220 * between purple and the protocol plugin. Many of these callbacks can be 204 * between purple and the protocol plugin. Many of these callbacks can be
221 * NULL. If a callback must be implemented, it has a comment indicating so. 205 * NULL. If a callback must be implemented, it has a comment indicating so.
222 */ 206 */
223 struct _PurplePluginProtocolInfo 207 struct _PurplePluginProtocolInfo
224 { 208 {
209 /**
210 * The size of the PurplePluginProtocolInfo. This should always be sizeof(PurplePluginProtocolInfo).
211 * This allows adding more functions to this struct without requiring a major version bump.
212 */
213 unsigned long struct_size;
214
215 /* NOTE:
216 * If more functions are added, they should accessed using the following syntax:
217 *
218 * if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, new_function))
219 * prpl->new_function(...);
220 *
221 * instead of
222 *
223 * if (prpl->new_function != NULL)
224 * prpl->new_function(...);
225 *
226 * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member
227 * functions (e.g. login, send_im etc.) too.
228 */
229
225 PurpleProtocolOptions options; /**< Protocol options. */ 230 PurpleProtocolOptions options; /**< Protocol options. */
226 231
227 GList *user_splits; /**< A GList of PurpleAccountUserSplit */ 232 GList *user_splits; /**< A GList of PurpleAccountUserSplit */
228 GList *protocol_options; /**< A GList of PurpleAccountOption */ 233 GList *protocol_options; /**< A GList of PurpleAccountOption */
229 234
331 void (*set_status)(PurpleAccount *account, PurpleStatus *status); 336 void (*set_status)(PurpleAccount *account, PurpleStatus *status);
332 337
333 void (*set_idle)(PurpleConnection *, int idletime); 338 void (*set_idle)(PurpleConnection *, int idletime);
334 void (*change_passwd)(PurpleConnection *, const char *old_pass, 339 void (*change_passwd)(PurpleConnection *, const char *old_pass,
335 const char *new_pass); 340 const char *new_pass);
341
336 /** 342 /**
337 * Add a buddy to a group on the server. 343 * Add a buddy to a group on the server.
338 * 344 *
339 * This PRPL function may be called in situations in which the buddy is 345 * This PRPL function may be called in situations in which the buddy is
340 * already in the specified group. If the protocol supports 346 * already in the specified group. If the protocol supports
341 * authorization and the user is not already authorized to see the 347 * authorization and the user is not already authorized to see the
342 * status of \a buddy, \a add_buddy should request authorization. 348 * status of \a buddy, \a add_buddy should request authorization.
343 * 349 *
344 * @deprecated Since 2.8.0, add_buddy_with_invite is preferred. 350 * If authorization is required, then use the supplied invite message.
345 * @see add_buddy_with_invite 351 */
346 */ 352 void (*add_buddy)(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group, const char *message);
347 void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); 353 void (*add_buddies)(PurpleConnection *pc, GList *buddies, GList *groups, const char *message);
348 void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups);
349 void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group); 354 void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group);
350 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups); 355 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
351 void (*add_permit)(PurpleConnection *, const char *name); 356 void (*add_permit)(PurpleConnection *, const char *name);
352 void (*add_deny)(PurpleConnection *, const char *name); 357 void (*add_deny)(PurpleConnection *, const char *name);
353 void (*rem_permit)(PurpleConnection *, const char *name); 358 void (*rem_permit)(PurpleConnection *, const char *name);
442 447
443 /** 448 /**
444 * @deprecated Use #PurplePluginProtocolInfo.get_info instead. 449 * @deprecated Use #PurplePluginProtocolInfo.get_info instead.
445 */ 450 */
446 void (*get_cb_info)(PurpleConnection *, int, const char *who); 451 void (*get_cb_info)(PurpleConnection *, int, const char *who);
447 /**
448 * @deprecated Use #PurplePluginProtocolInfo.get_cb_real_name and
449 * #PurplePluginProtocolInfo.status_text instead.
450 */
451 void (*get_cb_away)(PurpleConnection *, int, const char *who);
452 452
453 /** save/store buddy's alias on server list/roster */ 453 /** save/store buddy's alias on server list/roster */
454 void (*alias_buddy)(PurpleConnection *, const char *who, 454 void (*alias_buddy)(PurpleConnection *, const char *who,
455 const char *alias); 455 const char *alias);
456 456
532 532
533 /* Attention API for sending & receiving zaps/nudges/buzzes etc. */ 533 /* Attention API for sending & receiving zaps/nudges/buzzes etc. */
534 gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type); 534 gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type);
535 GList *(*get_attention_types)(PurpleAccount *acct); 535 GList *(*get_attention_types)(PurpleAccount *acct);
536 536
537 /**
538 * The size of the PurplePluginProtocolInfo. This should always be sizeof(PurplePluginProtocolInfo).
539 * This allows adding more functions to this struct without requiring a major version bump.
540 */
541 unsigned long struct_size;
542
543 /* NOTE:
544 * If more functions are added, they should accessed using the following syntax:
545 *
546 * if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, new_function))
547 * prpl->new_function(...);
548 *
549 * instead of
550 *
551 * if (prpl->new_function != NULL)
552 * prpl->new_function(...);
553 *
554 * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member
555 * functions (e.g. login, send_im etc.) too.
556 */
557
558 /** This allows protocols to specify additional strings to be used for 537 /** This allows protocols to specify additional strings to be used for
559 * various purposes. The idea is to stuff a bunch of strings in this hash 538 * various purposes. The idea is to stuff a bunch of strings in this hash
560 * table instead of expanding the struct for every addition. This hash 539 * table instead of expanding the struct for every addition. This hash
561 * table is allocated every call and MUST be unrefed by the caller. 540 * table is allocated every call and MUST be unrefed by the caller.
562 * 541 *
588 const char *who); 567 const char *who);
589 568
590 /** 569 /**
591 * Returns an array of "PurpleMood"s, with the last one having 570 * Returns an array of "PurpleMood"s, with the last one having
592 * "mood" set to @c NULL. 571 * "mood" set to @c NULL.
593 * @since 2.7.0
594 */ 572 */
595 PurpleMood *(*get_moods)(PurpleAccount *account); 573 PurpleMood *(*get_moods)(PurpleAccount *account);
596 574
597 /** 575 /**
598 * Set the user's "friendly name" (or alias or nickname or 576 * Set the user's "friendly name" (or alias or nickname or
608 * a protocol-specific "default"). 586 * a protocol-specific "default").
609 * @param success_cb Callback to be called if the public alias is set 587 * @param success_cb Callback to be called if the public alias is set
610 * @param failure_cb Callback to be called if setting the public alias 588 * @param failure_cb Callback to be called if setting the public alias
611 * fails 589 * fails
612 * @see purple_account_set_public_alias 590 * @see purple_account_set_public_alias
613 * @since 2.7.0
614 */ 591 */
615 void (*set_public_alias)(PurpleConnection *gc, const char *alias, 592 void (*set_public_alias)(PurpleConnection *gc, const char *alias,
616 PurpleSetPublicAliasSuccessCallback success_cb, 593 PurpleSetPublicAliasSuccessCallback success_cb,
617 PurpleSetPublicAliasFailureCallback failure_cb); 594 PurpleSetPublicAliasFailureCallback failure_cb);
618 /** 595 /**
625 * @param gc The connection for which to retireve the alias 602 * @param gc The connection for which to retireve the alias
626 * @param success_cb Callback to be called with the retrieved alias 603 * @param success_cb Callback to be called with the retrieved alias
627 * @param failure_cb Callback to be called if the prpl is unable to 604 * @param failure_cb Callback to be called if the prpl is unable to
628 * retrieve the alias 605 * retrieve the alias
629 * @see purple_account_get_public_alias 606 * @see purple_account_get_public_alias
630 * @since 2.7.0
631 */ 607 */
632 void (*get_public_alias)(PurpleConnection *gc, 608 void (*get_public_alias)(PurpleConnection *gc,
633 PurpleGetPublicAliasSuccessCallback success_cb, 609 PurpleGetPublicAliasSuccessCallback success_cb,
634 PurpleGetPublicAliasFailureCallback failure_cb); 610 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);
650 }; 611 };
651 612
652 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ 613 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
653 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ 614 (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size && \
654 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \
655 prpl->member != NULL) 615 prpl->member != NULL)
656 616
657 617
658 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \ 618 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \
659 ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL) 619 ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL)
660 620
661 #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \ 621 #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \
662 ((PurplePluginProtocolInfo *)(plugin)->info->extra_info) 622 ((PurplePluginProtocolInfo *)(plugin)->info->extra_info)
663 623
664 #ifdef __cplusplus 624 G_BEGIN_DECLS
665 extern "C" {
666 #endif
667 625
668 /**************************************************************************/ 626 /**************************************************************************/
669 /** @name Attention Type API */ 627 /** @name Attention Type API */
670 /**************************************************************************/ 628 /**************************************************************************/
671 /*@{*/ 629 /*@{*/
678 * without localization. 636 * without localization.
679 * @param name A localized string that the UI may display for the event. This 637 * @param name A localized string that the UI may display for the event. This
680 * should be the same string as @a ulname, with localization. 638 * should be the same string as @a ulname, with localization.
681 * @param inc_desc A localized description shown when the event is received. 639 * @param inc_desc A localized description shown when the event is received.
682 * @param out_desc A localized description shown when the event is sent. 640 * @param out_desc A localized description shown when the event is sent.
641 *
683 * @return A pointer to the new object. 642 * @return A pointer to the new object.
684 * @since 2.4.0
685 */ 643 */
686 PurpleAttentionType *purple_attention_type_new(const char *ulname, const char *name, 644 PurpleAttentionType *purple_attention_type_new(const char *ulname, const char *name,
687 const char *inc_desc, const char *out_desc); 645 const char *inc_desc, const char *out_desc);
688 646
689 /** 647 /**
691 * 649 *
692 * @param type The attention type. 650 * @param type The attention type.
693 * @param name The localized name that will be displayed by UIs. This should be 651 * @param name The localized name that will be displayed by UIs. This should be
694 * the same string given as the unlocalized name, but with 652 * the same string given as the unlocalized name, but with
695 * localization. 653 * localization.
696 * @since 2.4.0
697 */ 654 */
698 void purple_attention_type_set_name(PurpleAttentionType *type, const char *name); 655 void purple_attention_type_set_name(PurpleAttentionType *type, const char *name);
699 656
700 /** 657 /**
701 * Sets the description of the attention-demanding event shown in conversations 658 * Sets the description of the attention-demanding event shown in conversations
702 * when the event is received. 659 * when the event is received.
703 * 660 *
704 * @param type The attention type. 661 * @param type The attention type.
705 * @param desc The localized description for incoming events. 662 * @param desc The localized description for incoming events.
706 * @since 2.4.0
707 */ 663 */
708 void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc); 664 void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc);
709 665
710 /** 666 /**
711 * Sets the description of the attention-demanding event shown in conversations 667 * Sets the description of the attention-demanding event shown in conversations
712 * when the event is sent. 668 * when the event is sent.
713 * 669 *
714 * @param type The attention type. 670 * @param type The attention type.
715 * @param desc The localized description for outgoing events. 671 * @param desc The localized description for outgoing events.
716 * @since 2.4.0
717 */ 672 */
718 void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc); 673 void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc);
719 674
720 /** 675 /**
721 * Sets the name of the icon to display for the attention event; this is optional. 676 * Sets the name of the icon to display for the attention event; this is optional.
722 * 677 *
723 * @param type The attention type. 678 * @param type The attention type.
724 * @param name The icon's name. 679 * @param name The icon's name.
725 * @note Icons are optional for attention events. 680 * @note Icons are optional for attention events.
726 * @since 2.4.0
727 */ 681 */
728 void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name); 682 void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name);
729 683
730 /** 684 /**
731 * Sets the unlocalized name of the attention event; some UIs may need this, 685 * Sets the unlocalized name of the attention event; some UIs may need this,
732 * thus it is required. 686 * thus it is required.
733 * 687 *
734 * @param type The attention type. 688 * @param type The attention type.
735 * @param ulname The unlocalized name. This should be the same string given as 689 * @param ulname The unlocalized name. This should be the same string given as
736 * the localized name, but without localization. 690 * the localized name, but without localization.
737 * @since 2.4.0
738 */ 691 */
739 void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname); 692 void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname);
740 693
741 /** 694 /**
742 * Get the attention type's name as displayed by the UI. 695 * Get the attention type's name as displayed by the UI.
743 * 696 *
744 * @param type The attention type. 697 * @param type The attention type.
698 *
745 * @return The name. 699 * @return The name.
746 * @since 2.4.0
747 */ 700 */
748 const char *purple_attention_type_get_name(const PurpleAttentionType *type); 701 const char *purple_attention_type_get_name(const PurpleAttentionType *type);
749 702
750 /** 703 /**
751 * Get the attention type's description shown when the event is received. 704 * Get the attention type's description shown when the event is received.
752 * 705 *
753 * @param type The attention type. 706 * @param type The attention type.
754 * @return The description. 707 * @return The description.
755 * @since 2.4.0
756 */ 708 */
757 const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type); 709 const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type);
758 710
759 /** 711 /**
760 * Get the attention type's description shown when the event is sent. 712 * Get the attention type's description shown when the event is sent.
761 * 713 *
762 * @param type The attention type. 714 * @param type The attention type.
763 * @return The description. 715 * @return The description.
764 * @since 2.4.0
765 */ 716 */
766 const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type); 717 const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type);
767 718
768 /** 719 /**
769 * Get the attention type's icon name. 720 * Get the attention type's icon name.
770 * 721 *
771 * @param type The attention type. 722 * @param type The attention type.
772 * @return The icon name or @c NULL if unset/empty. 723 * @return The icon name or @c NULL if unset/empty.
773 * @note Icons are optional for attention events. 724 * @note Icons are optional for attention events.
774 * @since 2.4.0
775 */ 725 */
776 const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type); 726 const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type);
777 727
778 /** 728 /**
779 * Get the attention type's unlocalized name; this is useful for some UIs. 729 * Get the attention type's unlocalized name; this is useful for some UIs.
780 * 730 *
781 * @param type The attention type 731 * @param type The attention type
782 * @return The unlocalized name. 732 * @return The unlocalized name.
783 * @since 2.4.0
784 */ 733 */
785 const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type); 734 const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type);
786 735
787 /*@}*/ 736 /*@}*/
788 737
834 * This is meant to be called from protocol plugins. 783 * This is meant to be called from protocol plugins.
835 * 784 *
836 * @param account The account. 785 * @param account The account.
837 * 786 *
838 * @see account-actions-changed 787 * @see account-actions-changed
839 * @since 2.6.0
840 */ 788 */
841 void purple_prpl_got_account_actions(PurpleAccount *account); 789 void purple_prpl_got_account_actions(PurpleAccount *account);
842 790
843 /** 791 /**
844 * Notifies Purple that a buddy's idle state and time have changed. 792 * Notifies Purple that a buddy's idle state and time have changed.
925 * of the attention request command to send. 0 if prpl only defines one 873 * of the attention request command to send. 0 if prpl only defines one
926 * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM). 874 * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM).
927 * 875 *
928 * Note that you can't send arbitrary PurpleAttentionType's, because there is 876 * Note that you can't send arbitrary PurpleAttentionType's, because there is
929 * only a fixed set of attention commands. 877 * only a fixed set of attention commands.
930 *
931 * @since 2.5.0
932 */ 878 */
933 void purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code); 879 void purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code);
934 880
935 /** 881 /**
936 * Process an incoming attention message. 882 * Process an incoming attention message.
937 * 883 *
938 * @param gc The connection that received the attention message. 884 * @param gc The connection that received the attention message.
939 * @param who Who requested your attention. 885 * @param who Who requested your attention.
940 * @param type_code An index into the prpl's attention_types list determining the type 886 * @param type_code An index into the prpl's attention_types list determining the type
941 * of the attention request command to send. 887 * of the attention request command to send.
942 *
943 * @since 2.5.0
944 */ 888 */
945 void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code); 889 void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code);
946 890
947 /** 891 /**
948 * Process an incoming attention message in a chat. 892 * Process an incoming attention message in a chat.
950 * @param gc The connection that received the attention message. 894 * @param gc The connection that received the attention message.
951 * @param id The chat id. 895 * @param id The chat id.
952 * @param who Who requested your attention. 896 * @param who Who requested your attention.
953 * @param type_code An index into the prpl's attention_types list determining the type 897 * @param type_code An index into the prpl's attention_types list determining the type
954 * of the attention request command to send. 898 * of the attention request command to send.
955 *
956 * @since 2.5.0
957 */ 899 */
958 void purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code); 900 void purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code);
959 901
960 /** 902 /**
961 * Determines if the contact supports the given media session type. 903 * Determines if the contact supports the given media session type.
986 * 928 *
987 * This function is intended to be used only by prpls. 929 * This function is intended to be used only by prpls.
988 * 930 *
989 * @param account The account the user is on. 931 * @param account The account the user is on.
990 * @param who The name of the contact for which capabilities have been received. 932 * @param who The name of the contact for which capabilities have been received.
991 * @since 2.7.0
992 */ 933 */
993 void purple_prpl_got_media_caps(PurpleAccount *account, const char *who); 934 void purple_prpl_got_media_caps(PurpleAccount *account, const char *who);
994 935
995 /*@}*/ 936 /*@}*/
996 937
1006 */ 947 */
1007 PurplePlugin *purple_find_prpl(const char *id); 948 PurplePlugin *purple_find_prpl(const char *id);
1008 949
1009 /*@}*/ 950 /*@}*/
1010 951
1011 #ifdef __cplusplus 952 G_END_DECLS
1012 }
1013 #endif
1014 953
1015 #endif /* _PRPL_H_ */ 954 #endif /* _PRPL_H_ */