示例#1
0
static unsigned int nullprpl_send_typing(PurpleConnection *gc, const char *name,
                                         PurpleIMTypingState typing) {
  purple_debug_info("nullprpl", "%s %s\n", purple_account_get_username(purple_connection_get_account(gc)),
                    typing_state_to_string(typing));
  foreach_nullprpl_gc(notify_typing, gc, (gpointer)typing);
  return 0;
}
示例#2
0
static unsigned int
purplemot_send_typing(PurpleConnection *gc, const char *name,
    PurpleTypingState typing)
{
  purple_debug_info("purplemot", "%s %s\n", gc->account->username,
                    typing_state_to_string(typing));
  return 0;
}
示例#3
0
static void notify_typing(PurpleConnection *from, PurpleConnection *to,
                          gpointer typing) {
  const char *from_username = purple_account_get_username(purple_connection_get_account(from));
  const char *action = typing_state_to_string((PurpleIMTypingState)typing);
  purple_debug_info("nullprpl", "notifying %s that %s %s\n",
                    purple_account_get_username(purple_connection_get_account(to)), from_username, action);

  purple_serv_got_typing(to,
                  from_username,
                  0, /* if non-zero, a timeout in seconds after which to
                      * reset the typing status to PURPLE_IM_NOT_TYPING */
                  (PurpleIMTypingState)typing);
}