comparison 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
comparison
equal deleted inserted replaced
19460:e5f73cebcb36 19461:1b5e786d137a
51 */ 51 */
52 unsigned int serv_send_typing(PurpleConnection *gc, const char *name, PurpleTypingState state); 52 unsigned int serv_send_typing(PurpleConnection *gc, const char *name, PurpleTypingState state);
53 53
54 void serv_move_buddy(PurpleBuddy *, PurpleGroup *, PurpleGroup *); 54 void serv_move_buddy(PurpleBuddy *, PurpleGroup *, PurpleGroup *);
55 int serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageFlags flags); 55 int serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageFlags flags);
56
57 /** Get information about an account's attention commands, from the prpl.
58 *
59 * @return The attention command numbered 'code' from the prpl's attention_types, or NULL.
60 */
61 PurpleAttentionType *purple_get_attention_type_from_code(PurpleAccount *account, guint type_code);
62
63 /** Send an attention request message.
64 *
65 * @param gc The connection to send the message on.
66 * @param who Whose attention to request.
67 * @param type An index into the prpl's attention_types list determining the type
68 * of the attention request command to send. 0 if prpl only defines one
69 * (for example, Yahoo and MSN), but some protocols define more (MySpaceIM).
70 *
71 * Note that you can't send arbitrary PurpleAttentionType's, because there is
72 * only a fixed set of attention commands.
73 */
74 void serv_send_attention(PurpleConnection *gc, const char *who, guint type_code);
75
76 /** Process an incoming attention message.
77 *
78 * @param gc The connection that received the attention message.
79 * @param who Who requested your attention.
80 * @param type An index into the prpl's attention_types list determining the type
81 * of the attention request command to send.
82 */
83 void serv_got_attention(PurpleConnection *gc, const char *who, guint type_code);
84
56 void serv_get_info(PurpleConnection *, const char *); 85 void serv_get_info(PurpleConnection *, const char *);
57 void serv_set_info(PurpleConnection *, const char *); 86 void serv_set_info(PurpleConnection *, const char *);
58 87
59 void serv_add_permit(PurpleConnection *, const char *); 88 void serv_add_permit(PurpleConnection *, const char *);
60 void serv_add_deny(PurpleConnection *, const char *); 89 void serv_add_deny(PurpleConnection *, const char *);
65 void serv_chat_leave(PurpleConnection *, int); 94 void serv_chat_leave(PurpleConnection *, int);
66 void serv_chat_whisper(PurpleConnection *, int, const char *, const char *); 95 void serv_chat_whisper(PurpleConnection *, int, const char *, const char *);
67 int serv_chat_send(PurpleConnection *, int, const char *, PurpleMessageFlags flags); 96 int serv_chat_send(PurpleConnection *, int, const char *, PurpleMessageFlags flags);
68 void serv_alias_buddy(PurpleBuddy *); 97 void serv_alias_buddy(PurpleBuddy *);
69 void serv_got_alias(PurpleConnection *gc, const char *who, const char *alias); 98 void serv_got_alias(PurpleConnection *gc, const char *who, const char *alias);
70 void serv_got_attention(PurpleConnection *gc, const char *who, struct _PurpleAttentionType *attn, gboolean incoming); 99
71 100
72 /** 101 /**
73 * Receive a typing message from a remote user. Either PURPLE_TYPING 102 * Receive a typing message from a remote user. Either PURPLE_TYPING
74 * or PURPLE_TYPED. If the user has stopped typing then use 103 * or PURPLE_TYPED. If the user has stopped typing then use
75 * serv_got_typing_stopped instead. 104 * serv_got_typing_stopped instead.