src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java
/**
     * Sends a typing notification state.
     *
     * @param typingState the typing notification state to send
     * @return the result of this operation. One of the TYPING_NOTIFICATION_XXX
     * constants defined in this class
     */
Sends a typing notification state.
@param typingState the typing notification state to send
@return the result of this operation. One of the TYPING_NOTIFICATION_XXX
constants defined in this class
Sends a typing notification state . @param typingState the typing notification state to send @return the result of this operation . One of the TYPING_NOTIFICATION_XXX constants defined in this class
public int sendTypingNotification(int typingState)
    {
        if (!allowsTypingNotifications())
            return -1;
        ProtocolProviderService protocolProvider
            = contact.getProtocolProvider();
        OperationSetTypingNotifications tnOperationSet
            = protocolProvider
                .getOperationSet(OperationSetTypingNotifications.class);
        if(protocolProvider.isRegistered()
            && contact.getPresenceStatus().getStatus()
                    >= PresenceStatus.ONLINE_THRESHOLD)
        {
            try
            {
                tnOperationSet.sendTypingNotification(
                    contact, typingState);
                return ChatPanel.TYPING_NOTIFICATION_SUCCESSFULLY_SENT;
            }
            catch (Exception ex)
            {
                logger.error("Failed to send typing notifications.", ex);
                return ChatPanel.TYPING_NOTIFICATION_SEND_FAILED;
            }
        }
        return ChatPanel.TYPING_NOTIFICATION_SEND_FAILED;
    }
public int sendTypingNotification ( int typingState ) { if ( ! allowsTypingNotifications ( ) ) return - 1 ; ProtocolProviderService protocolProvider = contact . getProtocolProvider ( ) ; OperationSetTypingNotifications tnOperationSet = protocolProvider . getOperationSet ( OperationSetTypingNotifications . class ) ; if ( protocolProvider . isRegistered ( ) && contact . getPresenceStatus ( ) . getStatus ( ) >= PresenceStatus . ONLINE_THRESHOLD ) { try { tnOperationSet . sendTypingNotification ( contact , typingState ) ; return ChatPanel . TYPING_NOTIFICATION_SUCCESSFULLY_SENT ; } catch ( Exception ex ) { logger . error ( "Failed to send typing notifications." , ex ) ; return ChatPanel . TYPING_NOTIFICATION_SEND_FAILED ; } } return ChatPanel . TYPING_NOTIFICATION_SEND_FAILED ; }
Sends a typing notification state.
Sends a typing notification state .
// If this chat transport does not support sms messaging we do // nothing here. // if protocol is not registered or contact is offline don't // try to send typing notifications