src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java
/**
     * Converts <tt>state</tt> into the corresponding smack <tt>ChatState</tt>
     * and sends it to contact.
     *
     * @param contact the contact that we'd like to send our state to.
     * @param state the state we'd like to sent.
     */
Converts state into the corresponding smack ChatState
and sends it to contact.

@param contact the contact that we'd like to send our state to.
@param state the state we'd like to sent.
Converts state into the corresponding smack ChatState and sends it to contact . @param contact the contact that we ' d like to send our state to . @param state the state we ' d like to sent .
private void sendXep85ChatState(ContactJabberImpl contact, int state)
        throws NotConnectedException, InterruptedException
    {
        if(opSetBasicIM == null
            || parentProvider.getConnection() == null)
            return;
        Jid toJID = opSetBasicIM.getRecentJIDForAddress(
            contact.getAddressAsJid().asBareJid());
        if(toJID == null)
            return;
        if (logger.isTraceEnabled())
            logger.trace("Sending XEP-0085 chat state=" + state
                + " to " + toJID);
        ChatState chatState;
        if(state == STATE_TYPING)
        {
            chatState = ChatState.composing;
        }
        else if(state == STATE_STOPPED)
        {
            chatState = ChatState.inactive;
        }
        else if(state == STATE_PAUSED)
        {
            chatState = ChatState.paused;
        }
        else
        {
            chatState = ChatState.gone;
        }
        setCurrentState(chatState, toJID);
    }
private void sendXep85ChatState ( ContactJabberImpl contact , int state ) throws NotConnectedException , InterruptedException { if ( opSetBasicIM == null || parentProvider . getConnection ( ) == null ) return ; Jid toJID = opSetBasicIM . getRecentJIDForAddress ( contact . getAddressAsJid ( ) . asBareJid ( ) ) ; if ( toJID == null ) return ; if ( logger . isTraceEnabled ( ) ) logger . trace ( "Sending XEP-0085 chat state=" + state + " to " + toJID ) ; ChatState chatState ; if ( state == STATE_TYPING ) { chatState = ChatState . composing ; } else if ( state == STATE_STOPPED ) { chatState = ChatState . inactive ; } else if ( state == STATE_PAUSED ) { chatState = ChatState . paused ; } else { chatState = ChatState . gone ; } setCurrentState ( chatState , toJID ) ; }
Converts <tt>state</tt> into the corresponding smack <tt>ChatState</tt>
 and sends it to contact.
Converts <tt > state< / tt > into the corresponding smack <tt > ChatState< / tt > and sends it to contact .
// find the currently contacted jid to send typing info to him // or if we do not have a jid and we have already sent message to the // bare jid we will also send typing info there // if we haven't sent a message yet, do not send typing notifications