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

📄 jprovne.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 3 页
字号:
                    }

                }
                else if (strcmp(parm_element, CSD_CALLTYPE) == 0)
                {
                    attr_p = attr_p->next;
                    if (g_prov_bearer == PROV_CSD_BEARER)
                    {
                        mmi_prov_NE_handle_csd_calltype(attr_p);
                    }
                }

                else if (strcmp(parm_element, ISP_NAME) == 0)
                {

                    attr_p = attr_p->next;
                    mmi_prov_handle_profile_name(attr_p);

                }
            }
        }

        root_p = root_p->next;
        if (root_p != NULL)
        {
            attr_p = root_p->attribute_list;
        }
        else
        {
            *nextroot_p = root_p;
            return i_ret;
        }
    }
    return i_ret;
}


/*****************************************************************************
 * FUNCTION
 *  mmi_prov_NE_handle_url_tag
 * DESCRIPTION
 *  URL characteristic tag obtained in the NE OTA settings is handled
 * PARAMETERS
 *  nextroot_p      [IN]        IN\OUT
 * RETURNS
 *  void
 *****************************************************************************/
PROV_RETCODE mmi_prov_NE_handle_url_tag(TAG **nextroot_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    PROV_RETCODE i_ret = PROV_OK;
    ATTRIBUTE *attr_p = NULL;
    TAG *root_p;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    root_p = *nextroot_p;
    attr_p = root_p->attribute_list;

    while (root_p != NULL)
    {

        if (strcmp(root_p->name, CHARACTERISTIC) == 0)
        {
            if (strcmp(attr_p->name, TYPE) == 0)
            {
                attr_p = attr_p->next;
                mmi_prov_handle_homepage_url(attr_p);
            }
        }

        root_p = root_p->next;
        if (root_p != NULL)
        {
            attr_p = root_p->attribute_list;
            *nextroot_p = root_p;
            return i_ret;
        }
        else
        {
            *nextroot_p = root_p;
            return i_ret;
        }
    }
    return i_ret;
}


/*****************************************************************************
 * FUNCTION
 *  mmi_prov_NE_handle_name_tag
 * DESCRIPTION
 *  NAME characteristic tag obtained in the NE OTA settings is handled
 * PARAMETERS
 *  nextroot_p      [IN]        IN\OUT
 * RETURNS
 *  void
 *****************************************************************************/
PROV_RETCODE mmi_prov_NE_handle_name_tag(TAG **nextroot_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PROV_RETCODE i_ret = PROV_OK;
    ATTRIBUTE *attr_p = NULL;
    TAG *root_p;
    S8 parm_element[PROV_PROFILE_PROFILE_NAME_LEN + 1];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    root_p = *nextroot_p;
    root_p = root_p->next;
    attr_p = root_p->attribute_list;

    while (root_p != NULL)
    {
        if (strcmp(root_p->name, CHARACTERISTIC) == 0)
        {
            *nextroot_p = root_p;
            return i_ret;
        }
        else if (strcmp(root_p->name, PARM) == 0)
        {

            if (strcmp(attr_p->name, NAME) == 0)
            {
                UnicodeToAnsii(parm_element, (S8*) attr_p->value);
                if (strcmp(parm_element, NAME_PARM) == 0)
                {
                    attr_p = attr_p->next;
                    mmi_prov_handle_profile_name(attr_p);
                }
            }
        }

        root_p = root_p->next;
        if (root_p != NULL)
        {
            attr_p = root_p->attribute_list;
        }
        else
        {
            *nextroot_p = root_p;
            return i_ret;
        }
    }
    return i_ret;
}


/*****************************************************************************
 * FUNCTION
 *  mmi_prov_NE_handle_bookmark_tag
 * DESCRIPTION
 *  BOOKMARK characteristic tag obtained in the NE OTA settings is handled
 * PARAMETERS
 *  nextroot_p      [IN]        IN\OUT
 * RETURNS
 *  PROV_RETCODE
 *****************************************************************************/
PROV_RETCODE mmi_prov_NE_handle_bookmark_tag(TAG **nextroot_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    PROV_RETCODE i_ret = PROV_OK;
    ATTRIBUTE *attr_p = NULL;
    TAG *root_p;
    S8 parm_element[PROV_MIN_SIZE_REQ + 1];
    U8 bkm_title_p[PROV_BKM_TITLE_LEN * ENCODING_LENGTH] = {0, };
    U8 bkm_url_p[PROV_BKM_URL_LEN * ENCODING_LENGTH] = {0, };
    U32 valid_bookmark = 0;
    U32 len = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* to handle the case when only bookmarks are received */
    if (g_prov_bearer == PROV_INVALID_BEARER)
    {
        g_prov_setting_type |= PROV_BOOKMARK_SETTINGS;
    }

    root_p = *nextroot_p;
    root_p = root_p->next;
    attr_p = root_p->attribute_list;

    while (root_p != NULL)
    {
        if (strcmp(root_p->name, CHARACTERISTIC) == 0)
        {
            *nextroot_p = root_p;
            if (valid_bookmark)
            {
                i_ret = mmi_brw_add_prov_bookmark(bkm_title_p, bkm_url_p);
            }
            return i_ret;
        }
        else if (strcmp(root_p->name, PARM) == 0)
        {
            if (strcmp(attr_p->name, NAME) == 0)
            {
                UnicodeToAnsii(parm_element, (S8*) attr_p->value);
                if (strcmp(parm_element, NAME_PARM) == 0)
                {
                    attr_p = attr_p->next;
                    if (strcmp(attr_p->name, VALUE) == 0)
                    {
                        len = UCS2Strlen((S8*) attr_p->value);
                        if (len >= PROV_BKM_TITLE_LEN)
                        {
                            len = PROV_BKM_TITLE_LEN - 1;
                        }
                        UCS2Strncpy((S8*) bkm_title_p, (S8*) attr_p->value, len);
                    }

                }
                else if (strcmp(parm_element, URL) == 0)
                {
                    attr_p = attr_p->next;
                    if (strcmp(attr_p->name, VALUE) == 0)
                    {
                        len = UCS2Strlen((S8*) attr_p->value);
                        if (len >= PROV_BKM_URL_LEN)
                        {
                            len = PROV_BKM_URL_LEN - 1;
                        }
                        UCS2Strncpy((S8*) bkm_url_p, (S8*) attr_p->value, len);
                        valid_bookmark = 0x01;
                    }
                }
            }
        }

        root_p = root_p->next;
        if (root_p != NULL)
        {
            attr_p = root_p->attribute_list;
            if (attr_p == NULL && root_p->name == NULL)
            {
                if (valid_bookmark)
                {
                    i_ret = mmi_brw_add_prov_bookmark(bkm_title_p, bkm_url_p);
                }
                *nextroot_p = root_p;
                return i_ret;
            }
        }
        else
        {
            *nextroot_p = root_p;

            if (valid_bookmark)
            {
                i_ret = mmi_brw_add_prov_bookmark(bkm_title_p, bkm_url_p);
            }
            return i_ret;
        }
    }
    if (valid_bookmark)
    {
        i_ret = mmi_brw_add_prov_bookmark(bkm_title_p, bkm_url_p);
    }
    return i_ret;
}


/*****************************************************************************
 * FUNCTION
 *  mmi_prov_NE_handle_mmsurl_tag
 * DESCRIPTION
 *  MMSCURL characteristic tag obtained in the NE OTA settings is handled
 * PARAMETERS
 *  nextroot_p      [IN]        IN\OUT
 * RETURNS
 *  PROV_RETCODE
 *****************************************************************************/
PROV_RETCODE mmi_prov_NE_handle_mmsurl_tag(TAG **nextroot_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PROV_RETCODE i_ret = PROV_OK;
    ATTRIBUTE *attr_p = NULL;
    TAG *root_p;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    root_p = *nextroot_p;
    attr_p = root_p->attribute_list;

    while (root_p != NULL)
    {
        if (strcmp(root_p->name, CHARACTERISTIC) == 0)
        {

            if (strcmp(attr_p->name, TYPE) == 0)
            {
                attr_p = attr_p->next;
                mmi_prov_handle_mmsc_url(attr_p);
                g_prov_setting_type |= PROV_MMS_SETTINGS;
                g_prov_setting_type &= ~PROV_BRS_SETTINGS;
            }
        }
        root_p = root_p->next;
        if (root_p != NULL)
        {
            attr_p = root_p->attribute_list;
            *nextroot_p = root_p;
            return i_ret;
        }
        else
        {
            *nextroot_p = root_p;
            return i_ret;
        }
    }
    return i_ret;
}


/*****************************************************************************
 * FUNCTION
 *  mmi_prov_NE_handle_id_tag
 * DESCRIPTION
 *  ID characteristic tag obtained in the NE OTA settings is handled
 * PARAMETERS
 *  nextroot_p      [IN]        IN\OUT
 * RETURNS
 *  PROV_RETCODE
 *****************************************************************************/
PROV_RETCODE mmi_prov_NE_handle_id_tag(TAG **nextroot_p)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    PROV_RETCODE i_ret = PROV_OK;
    ATTRIBUTE *attr_p = NULL;
    TAG *root_p;
    S8 parm_element[PROV_MIN_SIZE_REQ + 1];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    root_p = *nextroot_p;
    root_p = root_p->next;
    attr_p = root_p->attribute_list;

    while (root_p != NULL)
    {
        if (strcmp(root_p->name, CHARACTERISTIC) == 0)
        {
            *nextroot_p = root_p;
            return i_ret;
        }
        else if (strcmp(root_p->name, PARM) == 0)
        {

            if (strcmp(attr_p->name, NAME) == 0)
            {
                UnicodeToAnsii(parm_element, (S8*) attr_p->value);
                if (strcmp(parm_element, NAME_PARM) == 0)
                {
                    attr_p = attr_p->next;
                    if (strcmp(attr_p->name, VALUE) == 0)
                    {
                        UnicodeToAnsii(parm_element, (S8*) attr_p->value);
                        /* Note : dara check if we need to support this */
                    }
                }
            }
        }

⌨️ 快捷键说明

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