Mercurial > pidgin
comparison src/server.h @ 13842:a9ff4499d9ce
[gaim-migrate @ 16295]
Hopefully improve the typing notification code so it's a lot easier
to understand. This also creates a distinction between the signals
emitted when receiving GAIM_TYPED and GAIM_NOT_TYPING messages
(by adding a gaim-typed signal). And the gaim-not-typing signal
should work in all cases.
Most of this is stuff I changed last week during work, thanks to
Meebo
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 20 Jun 2006 08:17:49 +0000 |
| parents | 8cecf7929eb3 |
| children |
comparison
equal
deleted
inserted
replaced
| 13841:f3d4a9902ead | 13842:a9ff4499d9ce |
|---|---|
| 31 | 31 |
| 32 #ifdef __cplusplus | 32 #ifdef __cplusplus |
| 33 extern "C" { | 33 extern "C" { |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 /** | |
| 37 * Send a typing message to a given user over a given connection. | |
| 38 * | |
| 39 * TODO: Could probably move this into the conversation API. | |
| 40 * | |
| 41 * @param typing One of GAIM_TYPING, GAIM_TYPED, or GAIM_NOT_TYPING. | |
| 42 * @return A quiet-period, specified in seconds, where Gaim will not | |
| 43 * send any additional typing notification messages. Most | |
| 44 * protocols should return 0, which means that no additional | |
| 45 * GAIM_TYPING messages need to be sent. If this is 5, for | |
| 46 * example, then Gaim will wait five seconds, and if the Gaim | |
| 47 * user is still typing then Gaim will send another GAIM_TYPING | |
| 48 * message. | |
| 49 */ | |
| 50 unsigned int serv_send_typing(GaimConnection *gc, const char *name, GaimTypingState state); | |
| 51 | |
| 52 void serv_move_buddy(GaimBuddy *, GaimGroup *, GaimGroup *); | |
| 36 int serv_send_im(GaimConnection *, const char *, const char *, GaimMessageFlags flags); | 53 int serv_send_im(GaimConnection *, const char *, const char *, GaimMessageFlags flags); |
| 37 void serv_get_info(GaimConnection *, const char *); | 54 void serv_get_info(GaimConnection *, const char *); |
| 38 void serv_set_info(GaimConnection *, const char *); | 55 void serv_set_info(GaimConnection *, const char *); |
| 39 int serv_send_typing(GaimConnection *, const char *, int); | 56 |
| 40 void serv_move_buddy(GaimBuddy *, GaimGroup *, GaimGroup *); | |
| 41 void serv_add_permit(GaimConnection *, const char *); | 57 void serv_add_permit(GaimConnection *, const char *); |
| 42 void serv_add_deny(GaimConnection *, const char *); | 58 void serv_add_deny(GaimConnection *, const char *); |
| 43 void serv_rem_permit(GaimConnection *, const char *); | 59 void serv_rem_permit(GaimConnection *, const char *); |
| 44 void serv_rem_deny(GaimConnection *, const char *); | 60 void serv_rem_deny(GaimConnection *, const char *); |
| 45 void serv_set_permit_deny(GaimConnection *); | 61 void serv_set_permit_deny(GaimConnection *); |
| 49 void serv_chat_leave(GaimConnection *, int); | 65 void serv_chat_leave(GaimConnection *, int); |
| 50 void serv_chat_whisper(GaimConnection *, int, const char *, const char *); | 66 void serv_chat_whisper(GaimConnection *, int, const char *, const char *); |
| 51 int serv_chat_send(GaimConnection *, int, const char *, GaimMessageFlags flags); | 67 int serv_chat_send(GaimConnection *, int, const char *, GaimMessageFlags flags); |
| 52 void serv_alias_buddy(GaimBuddy *); | 68 void serv_alias_buddy(GaimBuddy *); |
| 53 void serv_got_alias(GaimConnection *gc, const char *who, const char *alias); | 69 void serv_got_alias(GaimConnection *gc, const char *who, const char *alias); |
| 70 | |
| 71 /** | |
| 72 * Receive a typing message from a remote user. Either GAIM_TYPING | |
| 73 * or GAIM_TYPED. If the user has stopped typing then use | |
| 74 * serv_got_typing_stopped instead. | |
| 75 * | |
| 76 * TODO: Could probably move this into the conversation API. | |
| 77 * | |
| 78 * @param timeout If this is a number greater than 0, then | |
| 79 * Gaim will wait this number of seconds and then | |
| 80 * set this buddy to the GAIM_NOT_TYPING state. This | |
| 81 * is used by protocols that send repeated typing messages | |
| 82 * while the user is composing the message. | |
| 83 */ | |
| 54 void serv_got_typing(GaimConnection *gc, const char *name, int timeout, | 84 void serv_got_typing(GaimConnection *gc, const char *name, int timeout, |
| 55 GaimTypingState state); | 85 GaimTypingState state); |
| 56 void serv_set_buddyicon(GaimConnection *gc, const char *filename); | 86 |
| 87 /** | |
| 88 * TODO: Could probably move this into the conversation API. | |
| 89 */ | |
| 57 void serv_got_typing_stopped(GaimConnection *gc, const char *name); | 90 void serv_got_typing_stopped(GaimConnection *gc, const char *name); |
| 91 | |
| 58 void serv_got_im(GaimConnection *gc, const char *who, const char *msg, | 92 void serv_got_im(GaimConnection *gc, const char *who, const char *msg, |
| 59 GaimMessageFlags flags, time_t mtime); | 93 GaimMessageFlags flags, time_t mtime); |
| 94 void serv_set_buddyicon(GaimConnection *gc, const char *filename); | |
| 60 void serv_got_chat_invite(GaimConnection *gc, const char *name, | 95 void serv_got_chat_invite(GaimConnection *gc, const char *name, |
| 61 const char *who, const char *message, | 96 const char *who, const char *message, |
| 62 GHashTable *data); | 97 GHashTable *data); |
| 63 GaimConversation *serv_got_joined_chat(GaimConnection *gc, | 98 GaimConversation *serv_got_joined_chat(GaimConnection *gc, |
| 64 int id, const char *name); | 99 int id, const char *name); |
