📄 jprovne.c
字号:
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_csd_calltype
* DESCRIPTION
* This function handles CSD calll type parm received in the Nokia settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_csd_calltype(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S8 parm_element[PROV_MIN_SIZE_REQ + 1];
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
UnicodeToAnsii(parm_element, (S8*) attr_p->value);
if (strcmp(parm_element, ANALOGUE) == 0)
{
g_prov_set_csd_req_p->type = CSMCC_ITC_3_1_K_AUDIO;
}
else if (strcmp(parm_element, "ISDN") == 0)
{
g_prov_set_csd_req_p->type = CSMCC_ITC_UDI;
}
else
{
g_prov_set_csd_req_p->type = CSMCC_ITC_3_1_K_AUDIO;
}
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_csd_callspeed
* DESCRIPTION
* This function handles CSD call speed parameter received in the OMA settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_csd_callspeed(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S8 parm_element[PROV_MIN_SIZE_REQ + 1];
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
UnicodeToAnsii(parm_element, (S8*) attr_p->value);
if (strcmp(parm_element, AUTO) == 0 || strcmp(parm_element, "9600") == 0)
{
g_prov_set_csd_req_p->rate = CSD_PROF_RATE_9600;
}
else if (strcmp(parm_element, "4800") == 0)
{
g_prov_set_csd_req_p->rate = CSD_PROF_RATE_4800;
}
else if (strcmp(parm_element, "14400") == 0)
{
g_prov_set_csd_req_p->rate = CSD_PROF_RATE_14400;
}
else
{
g_prov_set_csd_req_p->rate = CSD_PROF_RATE_9600;
}
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_proxy_authname
* DESCRIPTION
* This function handles CSD call speed parameter received in the OMA settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_proxy_authname(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 len;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
len = UCS2Strlen((S8*) attr_p->value);
if (len >= PROV_PROFILE_USERNAME_LEN)
{
len = PROV_PROFILE_USERNAME_LEN - 1;
}
if (GetUCS2Flag((PS8) attr_p->value))
{
memset(g_ph_wap_profile_p->username, 0, PROV_PROFILE_USERNAME_LEN);
memset(g_ph_mms_profile_p->username, 0, PROV_PROFILE_USERNAME_LEN);
}
UnicodeNToAnsii((S8*) g_ph_wap_profile_p->username, (S8*) attr_p->value, len * ENCODING_LENGTH);
g_ph_wap_profile_p->username[len] = '\0';
UnicodeNToAnsii((S8*) g_ph_mms_profile_p->username, (S8*) attr_p->value, len * ENCODING_LENGTH);
g_ph_mms_profile_p->username[len] = '\0';
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_proxy_authsecret
* DESCRIPTION
* This function handles CSD call speed parameter received in the OMA settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_proxy_authsecret(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 len;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
len = UCS2Strlen((S8*) attr_p->value);
if (len >= PROV_PROFILE_PASSWORD_LEN)
{
len = PROV_PROFILE_PASSWORD_LEN - 1;
}
if (GetUCS2Flag((PS8) attr_p->value))
{
memset(g_ph_wap_profile_p->password, 0, PROV_PROFILE_PASSWORD_LEN);
memset(g_ph_mms_profile_p->password, 0, PROV_PROFILE_PASSWORD_LEN);
}
UnicodeNToAnsii((S8*) g_ph_wap_profile_p->password, (S8*) attr_p->value, len * ENCODING_LENGTH);
g_ph_wap_profile_p->password[len] = '\0';
UnicodeNToAnsii((S8*) g_ph_mms_profile_p->password, (S8*) attr_p->value, len * ENCODING_LENGTH);
g_ph_mms_profile_p->password[len] = '\0';
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_csd_dialstring
* DESCRIPTION
* This function handles CSD dail string parameter received in the settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_csd_dialstring(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 len;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
len = UCS2Strlen((S8*) attr_p->value);
if (g_prov_set_csd_req_p != NULL)
{
if (len >= PROV_MAX_DIAL_NUM_LEN)
{
len = PROV_MAX_DIAL_NUM_LEN - 1;
}
if (mmi_phb_op_check_valid_number((S8*) attr_p->value))
{
UnicodeNToAnsii((S8*) g_prov_set_csd_req_p->dest.number, (S8*) attr_p->value, len * ENCODING_LENGTH);
g_prov_set_csd_req_p->dest.number[len] = '\0';
g_prov_set_csd_req_p->dest.type = CSMCC_DEFAULT_ADDR_TYPE;
}
else
{
memset(g_prov_set_csd_req_p->dest.number, 0, MAX_DIAL_NUM_LEN);
g_prov_set_csd_req_p->dest.type = CSMCC_DEFAULT_ADDR_TYPE;
}
}
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_gprs_apn
* DESCRIPTION
* This function handles GPRS APN parameter received for the GPRS bearer in the settings
* PARAMETERS
* attr_p [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_gprs_apn(ATTRIBUTE *attr_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U32 len;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (strcmp(attr_p->name, VALUE) == 0)
{
len = UCS2Strlen((S8*) attr_p->value);
#ifdef __GPRS_MODE__
if (g_prov_set_gprs_req_p != NULL)
{
if (len >= PROV_MAX_GPRS_MMI_APN_LEN)
{
len = PROV_MAX_GPRS_MMI_APN_LEN - 1;
}
g_prov_set_gprs_req_p->gprs_account.apn_length = len;
UnicodeNToAnsii(
(S8*) g_prov_set_gprs_req_p->gprs_account.apn,
(S8*) attr_p->value,
len * ENCODING_LENGTH);
g_prov_set_gprs_req_p->gprs_account.apn[len] = '\0';
}
#endif /* __GPRS_MODE__ */
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_convert_ip_string_to_array
* DESCRIPTION
* This converts an IP string into an array
* PARAMETERS
* parm_element_p [IN]
* proxy_ip_p [?] IN\OUT
* RETURNS
* U8
*****************************************************************************/
U8 mmi_prov_convert_ip_string_to_array(S8 *parm_element_p, U8 *proxy_ip_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S8 proxy[MAX_PART_IP_ADDRESS];
U32 i, j;
U32 ip_part;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (!mmi_brw_check_ip(parm_element_p))
{
return PROV_ERR;
}
if ((*parm_element_p) < '0' || (*parm_element_p) > '9')
{
return PROV_ERR;
}
for (j = 0; j < MAX_PART_IP_ADDRESS; ++j)
{
for (i = 0; (i < 3) && (strlen(parm_element_p));)
{
if (*parm_element_p == '.')
{
break;
}
if ((*parm_element_p) >= '0' && (*parm_element_p) <= '9')
{
proxy[i] = *parm_element_p++;
i++;
}
else
{
return PROV_ERR;
}
}
proxy[i] = '\0';
ip_part = (U32) atoi(proxy);
if (ip_part > PROV_IP_PART_MAX_VALUE)
{
ip_part = PROV_IP_PART_MAX_VALUE;
}
proxy_ip_p[j] = (U8) ip_part;
++parm_element_p;
}
return PROV_OK;
}
/* temp function shall be removed once jattayu provides */
/*****************************************************************************
* FUNCTION
* mmi_prov_NE_handle_WSP_headers
* DESCRIPTION
*
* PARAMETERS
* prov_buffer_p [IN]
* provLength [?]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_NE_handle_WSP_headers(U8 **prov_buffer_p, U32 *provLength)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 buffLen;
U8 *tempBuffer = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
tempBuffer = *prov_buffer_p;
if (tempBuffer[1] == WSP_PUSH_HEADER)
{
buffLen = tempBuffer[2];
tempBuffer += 3;
*provLength -= 3;
tempBuffer += buffLen;
*provLength -= buffLen;
memcpy(*prov_buffer_p, tempBuffer, (*provLength));
}
}
#endif /* defined (JATAAYU_SUPPORT) && (defined (WAP_SUPPORT) || (defined (MMS_SUPPORT))) */
#endif /* _JPROVNE_C */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -