diff 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
line wrap: on
line diff
--- a/src/conversation.h	Tue Jun 20 04:05:56 2006 +0000
+++ b/src/conversation.h	Tue Jun 20 08:17:49 2006 +0000
@@ -186,7 +186,7 @@
 	GaimTypingState typing_state;      /**< The current typing state.    */
 	guint  typing_timeout;             /**< The typing timer handle.     */
 	time_t type_again;                 /**< The type again time.         */
-	guint  type_again_timeout;         /**< The type again timer handle. */
+	guint  send_typed_timeout;         /**< The type again timer handle. */
 
 	GaimBuddyIcon *icon;               /**< The buddy icon.              */
 };
@@ -666,19 +666,25 @@
 guint gaim_conv_im_get_typing_timeout(const GaimConvIm *im);
 
 /**
- * Sets the IM's time until it should send another typing notification.
+ * Sets the quiet-time when no GAIM_TYPING messages will be sent.
+ * Few protocols need this (maybe only MSN).  If the user is still
+ * typing after this quiet-period, then another GAIM_TYPING message
+ * will be sent.
  *
  * @param im  The IM.
- * @param val The time.
+ * @param val The number of seconds to wait before allowing another
+ *            GAIM_TYPING message to be sent to the user.  Or 0 to
+ *            not send another GAIM_TYPING message.
  */
-void gaim_conv_im_set_type_again(GaimConvIm *im, time_t val);
+void gaim_conv_im_set_type_again(GaimConvIm *im, unsigned int val);
 
 /**
- * Returns the IM's time until it should send another typing notification.
+ * Returns the time after which another GAIM_TYPING message should be sent.
  *
  * @param im The IM.
  *
- * @return The time.
+ * @return The time in seconds since the epoch.  Or 0 if no additional
+ *         GAIM_TYPING message should be sent.
  */
 time_t gaim_conv_im_get_type_again(const GaimConvIm *im);
 
@@ -687,14 +693,14 @@
  *
  * @param im      The IM.
  */
-void gaim_conv_im_start_type_again_timeout(GaimConvIm *im);
+void gaim_conv_im_start_send_typed_timeout(GaimConvIm *im);
 
 /**
  * Stops the IM's type again timeout.
  *
  * @param im The IM.
  */
-void gaim_conv_im_stop_type_again_timeout(GaimConvIm *im);
+void gaim_conv_im_stop_send_typed_timeout(GaimConvIm *im);
 
 /**
  * Returns the IM's type again timeout interval.
@@ -703,7 +709,7 @@
  *
  * @return The type again timeout interval.
  */
-guint gaim_conv_im_get_type_again_timeout(const GaimConvIm *im);
+guint gaim_conv_im_get_send_typed_timeout(const GaimConvIm *im);
 
 /**
  * Updates the visual typing notification for an IM conversation.