Пример #1
0
bool Menu::handleKeyboardDialog(KeyboardButton key, bool pressed) {
    if (!pressed)
        return (dialogText.length() > 0);

    if (dialogText.length() > 0) {
        if (dialogButton2.length() == 0) {
            if (key == enterKey) {
                ackDialog();
            }
        } else {
            if (key == enterKey) {
                ackDialog();
            } else if (key == leftKey) {
                dialogState = !dialogState;
            } else if (key == rightKey) {
                dialogState = !dialogState;
            } else if (key == upKey) {
                dialogState = !dialogState;
            } else if (key == downKey) {
                dialogState = !dialogState;
            }
        }
        return true;
    }

    return false;
}
Пример #2
0
    int  Refer2InviteCore::getAnswerFrom3 ( Event *e)
    {
        MAND_LOG(DBG_SIP,  "state:getAnswerFrom3: event: %s", e->toString());
        switch (e->m_type)
        {
            case EVT_ENTER: return 0;
            case EVT_EXIT : return 0;
            default       : return 1;
            case EVT_INT_CALL_ANSWERED:
            {
                // it should be a response from Phone3
                if (e->m_fsm != m_uaTable[CLNT3])
                    return 1;

                // Take the sdp from the response of phone3
                // and send it to phone2
                Response rcvdResp(e->m_pOsipMsg);
                Request ack2;
                ack2.create(SIP_REQ_ACK, m_dialogs[CLNT2]);

//                 SdpMsg sdp(processSDP(m_dialogs[CLNT2], m_dialogs[CLNT3], rcvdResp));
//                 ack2.AddSdp(sdp);

                Transport::send(ack2);

                ackDialog(m_dialogs[CLNT3]);

                FSM_TRAN(&Refer2InviteCore::completeTransfer);
                return 0;
            }
        }
    }