Mercurial > pidgin
diff libpurple/server.h @ 19461:1b5e786d137a
In the attention API, use the PURPLE_NOTIFY_MESSAGE flag to serv_got_im()
instead of manually writing to the conversation window, as suggested by sadrul
at http://pidgin.im/pipermail/devel/2007-August/002935.html. Yahoo and MSN
already use this flag to indicate an attention/notify-type message.
Also split off half of serv_got_attention() into serv_send_attention(), see
http://pidgin.im/pipermail/devel/2007-August/002940.html.
Now the attention API integrates well with the patch to add
PURPLE_MESSAGE_NOTIFY at http://hiks.net/drop/adium/libgaim.diff.
See also: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1672389&group_id=235
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Mon, 27 Aug 2007 01:36:21 +0000 |
parents | 6395c2e96bc2 |
children | 44b4e8bd759b |
line wrap: on
line diff
--- a/libpurple/server.h Mon Aug 27 00:09:17 2007 +0000 +++ b/libpurple/server.h Mon Aug 27 01:36:21 2007 +0000 @@ -53,6 +53,35 @@ void serv_move_buddy(PurpleBuddy *, PurpleGroup *, PurpleGroup *); int serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageFlags flags); + +/** Get information about an account's attention commands, from the prpl. + * + * @return The attention command numbered 'code' from the prpl's attention_types, or NULL. + */ +PurpleAttentionType *purple_get_attention_type_from_code(PurpleAccount *account, guint type_code); + +/** Send an attention request message. + * + * @param gc The connection to send the message on. + * @param who Whose attention to request. + * @param type An index into the prpl's attention_types list determining the type + * of the attention request command to send. 0 if prpl only defines one + * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM). + * + * Note that you can't send arbitrary PurpleAttentionType's, because there is + * only a fixed set of attention commands. + */ +void serv_send_attention(PurpleConnection *gc, const char *who, guint type_code); + +/** Process an incoming attention message. + * + * @param gc The connection that received the attention message. + * @param who Who requested your attention. + * @param type An index into the prpl's attention_types list determining the type + * of the attention request command to send. + */ +void serv_got_attention(PurpleConnection *gc, const char *who, guint type_code); + void serv_get_info(PurpleConnection *, const char *); void serv_set_info(PurpleConnection *, const char *); @@ -67,7 +96,7 @@ int serv_chat_send(PurpleConnection *, int, const char *, PurpleMessageFlags flags); void serv_alias_buddy(PurpleBuddy *); void serv_got_alias(PurpleConnection *gc, const char *who, const char *alias); -void serv_got_attention(PurpleConnection *gc, const char *who, struct _PurpleAttentionType *attn, gboolean incoming); + /** * Receive a typing message from a remote user. Either PURPLE_TYPING