Mercurial > pidgin
comparison src/conversation.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 | dd00149f6f9b |
children | df0dba522147 |
comparison
equal
deleted
inserted
replaced
13841:f3d4a9902ead | 13842:a9ff4499d9ce |
---|---|
184 GaimConversation *conv; /**< The parent conversation. */ | 184 GaimConversation *conv; /**< The parent conversation. */ |
185 | 185 |
186 GaimTypingState typing_state; /**< The current typing state. */ | 186 GaimTypingState typing_state; /**< The current typing state. */ |
187 guint typing_timeout; /**< The typing timer handle. */ | 187 guint typing_timeout; /**< The typing timer handle. */ |
188 time_t type_again; /**< The type again time. */ | 188 time_t type_again; /**< The type again time. */ |
189 guint type_again_timeout; /**< The type again timer handle. */ | 189 guint send_typed_timeout; /**< The type again timer handle. */ |
190 | 190 |
191 GaimBuddyIcon *icon; /**< The buddy icon. */ | 191 GaimBuddyIcon *icon; /**< The buddy icon. */ |
192 }; | 192 }; |
193 | 193 |
194 /** | 194 /** |
664 * @return The timeout. | 664 * @return The timeout. |
665 */ | 665 */ |
666 guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); | 666 guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im); |
667 | 667 |
668 /** | 668 /** |
669 * Sets the IM's time until it should send another typing notification. | 669 * Sets the quiet-time when no GAIM_TYPING messages will be sent. |
670 * Few protocols need this (maybe only MSN). If the user is still | |
671 * typing after this quiet-period, then another GAIM_TYPING message | |
672 * will be sent. | |
670 * | 673 * |
671 * @param im The IM. | 674 * @param im The IM. |
672 * @param val The time. | 675 * @param val The number of seconds to wait before allowing another |
673 */ | 676 * GAIM_TYPING message to be sent to the user. Or 0 to |
674 void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val); | 677 * not send another GAIM_TYPING message. |
675 | 678 */ |
676 /** | 679 void gaim_conv_im_set_type_again(GaimConvIm *im, unsigned int val); |
677 * Returns the IM's time until it should send another typing notification. | 680 |
681 /** | |
682 * Returns the time after which another GAIM_TYPING message should be sent. | |
678 * | 683 * |
679 * @param im The IM. | 684 * @param im The IM. |
680 * | 685 * |
681 * @return The time. | 686 * @return The time in seconds since the epoch. Or 0 if no additional |
687 * GAIM_TYPING message should be sent. | |
682 */ | 688 */ |
683 time_t gaim_conv_im_get_type_again(const GaimConvIm *im); | 689 time_t gaim_conv_im_get_type_again(const GaimConvIm *im); |
684 | 690 |
685 /** | 691 /** |
686 * Starts the IM's type again timeout. | 692 * Starts the IM's type again timeout. |
687 * | 693 * |
688 * @param im The IM. | 694 * @param im The IM. |
689 */ | 695 */ |
690 void gaim_conv_im_start_type_again_timeout(GaimConvIm *im); | 696 void gaim_conv_im_start_send_typed_timeout(GaimConvIm *im); |
691 | 697 |
692 /** | 698 /** |
693 * Stops the IM's type again timeout. | 699 * Stops the IM's type again timeout. |
694 * | 700 * |
695 * @param im The IM. | 701 * @param im The IM. |
696 */ | 702 */ |
697 void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im); | 703 void gaim_conv_im_stop_send_typed_timeout(GaimConvIm *im); |
698 | 704 |
699 /** | 705 /** |
700 * Returns the IM's type again timeout interval. | 706 * Returns the IM's type again timeout interval. |
701 * | 707 * |
702 * @param im The IM. | 708 * @param im The IM. |
703 * | 709 * |
704 * @return The type again timeout interval. | 710 * @return The type again timeout interval. |
705 */ | 711 */ |
706 guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im); | 712 guint gaim_conv_im_get_send_typed_timeout(const GaimConvIm *im); |
707 | 713 |
708 /** | 714 /** |
709 * Updates the visual typing notification for an IM conversation. | 715 * Updates the visual typing notification for an IM conversation. |
710 * | 716 * |
711 * @param im The IM. | 717 * @param im The IM. |