⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callstructuremanagement.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
                TotalCallCount++;
                break;
            }
            case CM_HOLD_STATE:
            {
                NumOfHoldCalls++;
                TotalCallCount++;
                break;
            }
        }

    }
    cm_p->state_info.NumofActivecalls = (U8) NumofActivecalls;
    cm_p->state_info.NumofHeldcalls = (U8) NumOfHoldCalls;
    cm_p->state_info.TotalCallCount = (U8) TotalCallCount;
    if (OutgoingFlag)
    {
        if (GetCurrentState() != CM_OUTGOING_STATE)
        {
            SetPreviousState(GetCurrentState());
            SetCurrentState(CM_OUTGOING_STATE);
        }
        return;
    }
    if (IncomingFlag)
    {
        if (GetCurrentState() != CM_INCOMING_STATE)
        {
            SetPreviousState(GetCurrentState());
            SetCurrentState(CM_INCOMING_STATE);
        }
        return;
    }
    if ((cm_p->state_info.NumofHeldcalls == cm_p->state_info.TotalCallCount) && (cm_p->state_info.TotalCallCount != 0))
    {
        if (GetCurrentState() != CM_HOLD_STATE)
        {
            SetPreviousState(GetCurrentState());
            SetCurrentState(CM_HOLD_STATE);
        }
        return;
    }
    if (cm_p->state_info.NumofActivecalls > 0)
    {
        if (GetCurrentState() != CM_ACTIVE_STATE)
        {
            SetPreviousState(GetCurrentState());
            SetCurrentState(CM_ACTIVE_STATE);
        }
        return;
    }
    if (TotalCallCount == 0)
    {
        SetPreviousState(GetCurrentState());
        SetCurrentState(CM_IDLE_STATE);
    }
}


/*****************************************************************************
 * FUNCTION
 *  SetHoldFlag
 * DESCRIPTION
 *  This function is a wrapper to set state of the hold requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SetHoldFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE)
        {
            SetCallflag(count, CM_HOLD_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetHoldFlag
 * DESCRIPTION
 *  This function is a wrapper to set state of the hold requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetHoldFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE)
        {
            ResetCallflag(count, CM_HOLD_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  SetRetrieveFlag
 * DESCRIPTION
 *  This function is a wrapper to set retrieve requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SetRetrieveFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if (cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE)
        {
            SetCallflag(count, CM_RETRIEVE_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetRetrieveFlag
 * DESCRIPTION
 *  This function is a wrapper to set retrieve requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetRetrieveFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if (cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE)
        {
            ResetCallflag(count, CM_RETRIEVE_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  GetAllCallFlags
 * DESCRIPTION
 *  This function is a wrapper to set swap requested
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
U8 GetAllCallFlags(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 count, flag = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if (cm_p->state_info.AllCalls[count].call_handle != -1)
        {
            flag |= cm_p->state_info.AllCalls[count].status_flag;
        }
    }
    PRINT_INFORMATION(("GetAllCallFlags: %d\n", flag));
    return flag;
}


/*****************************************************************************
 * FUNCTION
 *  SetSwapFlag
 * DESCRIPTION
 *  This function is a wrapper to set swap requested
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SetSwapFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE) ||
            (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE))
        {
            SetCallflag(count, CM_SWAP_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetSwapFlag
 * DESCRIPTION
 *  This function is a wrapper to set swap requested
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetSwapFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE) ||
            (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE))
        {
            ResetCallflag(count, CM_SWAP_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  SetConfFlag
 * DESCRIPTION
 *  This function is a wrapper to set conference requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SetConfFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE) ||
            (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE))
        {
            SetCallflag(count, CM_CONF_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetConfFlag
 * DESCRIPTION
 *  This function is a wrapper to set conference requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetConfFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].curr_state == CM_HOLD_STATE) ||
            (cm_p->state_info.AllCalls[count].curr_state == CM_ACTIVE_STATE))
        {
            ResetCallflag(count, CM_CONF_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetSplitFlag
 * DESCRIPTION
 *  This function is a wrapper to set split requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetSplitFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].status_flag & CM_SPLIT_REQUESTED) != 0)
        {
            ResetCallflag(count, CM_SPLIT_REQUESTED, FALSE);
        }
    }
}


/*****************************************************************************
 * FUNCTION
 *  ResetEctFlag
 * DESCRIPTION
 *  This function is a wrapper to set split requested flag
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetEctFlag(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 count;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (count = 0; count < MAX_CALLS; count++)
    {
        if ((cm_p->state_info.AllCalls[count].status_flag & CM_ECT_REQUESTED) != 0)
        {
            ResetCallflag(count, CM_ECT_REQUESTED, FALSE);
        }
    }
}

/*****************************************************************************
 * FUNCTION
 *  SetAllHangupFlag
 * DESCRIPTION
 *  This function is a wrapper to set hangup all 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -