📄 jprovwap.c
字号:
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */
/*****************************************************************************
* FUNCTION
* mmi_prov_prof_save_gprs_data_acct
* DESCRIPTION
* This is API for sending the Set request to L4 for the selected GPRS data acount
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_prov_prof_save_gprs_data_acct(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_prov_set_gprs_req();
}
/*****************************************************************************
* FUNCTION
* mmi_prov_prof_save_csd_data_acct
* DESCRIPTION
* This is API for sending the Set request to L4 for the selected CSD data acount
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_prov_prof_save_csd_data_acct(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_prov_set_csd_req();
}
/*****************************************************************************
* FUNCTION
* mmi_prov_handle_back
* DESCRIPTION
* To handle the BACK key pressed during the time of installation of received prov. settings
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_prov_handle_back(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_prov_handle_data_account_mem_free();
if (g_prov_appl_flag > 0)
{
mmi_prov_oma_check_pending_application();
}
else
{
mmi_prov_handle_get_next_prov_data();
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_add_to_queue
* DESCRIPTION
* This Add's the new settings received into the queue to be processed later on.
* PARAMETERS
* prov_buffer_p [IN] Provisioing data buffer
* prov_length [IN]
* provLength(?) [IN] Buffer length
* RETURNS
* void
*****************************************************************************/
void mmi_prov_add_to_queue(S8 *prov_buffer_p, U32 prov_length)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (g_prov_data_queue_last_item >= PROV_MAX_NBR_DOCUMENTS)
{
g_prov_data_queue_last_item = 0;
}
prov_data_queue[g_prov_data_queue_last_item] =
(prov_queue_data_struct*) jdd_MemAlloc(sizeof(prov_queue_data_struct), 1);
prov_data_queue[g_prov_data_queue_last_item]->pbuffer = jdd_MemAlloc(prov_length, 1);
memcpy(prov_data_queue[g_prov_data_queue_last_item]->pbuffer, prov_buffer_p, prov_length);
prov_data_queue[g_prov_data_queue_last_item]->plength = prov_length;
prov_data_queue[g_prov_data_queue_last_item]->instal_stringID = g_prov_instal_stringID;
g_prov_data_queue_last_item++;
g_prov_data_queue_size++;
}
/*****************************************************************************
* FUNCTION
* mmi_prov_delete_queue_entry
* DESCRIPTION
* Deletes the current queue entry
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_prov_delete_queue_entry(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (prov_data_queue[g_prov_data_queue_current_item]->pbuffer)
{
jdd_MemFree(prov_data_queue[g_prov_data_queue_current_item]->pbuffer);
prov_data_queue[g_prov_data_queue_current_item]->pbuffer = NULL;
}
if (prov_data_queue[g_prov_data_queue_current_item])
{
jdd_MemFree(prov_data_queue[g_prov_data_queue_current_item]);
prov_data_queue[g_prov_data_queue_current_item] = NULL;
}
++g_prov_data_queue_current_item;
--g_prov_data_queue_size;
if (g_prov_data_queue_current_item >= PROV_MAX_NBR_DOCUMENTS)
{
g_prov_data_queue_current_item = 0;
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_handle_terminate
* DESCRIPTION
* THis API terminates the Provisoining module
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_prov_handle_terminate(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
while (g_prov_data_queue_size > 0)
{
if (prov_data_queue[g_prov_data_queue_current_item]->pbuffer)
{
jdd_MemFree(prov_data_queue[g_prov_data_queue_current_item]->pbuffer);
prov_data_queue[g_prov_data_queue_current_item]->pbuffer = NULL;
}
if (prov_data_queue[g_prov_data_queue_current_item])
{
jdd_MemFree(prov_data_queue[g_prov_data_queue_current_item]);
prov_data_queue[g_prov_data_queue_current_item] = NULL;
}
g_prov_data_queue_size--;
g_prov_data_queue_current_item++;
if (g_prov_data_queue_current_item >= PROV_MAX_NBR_DOCUMENTS)
{
g_prov_data_queue_current_item = 0;
}
}
g_prov_bearer = PROV_INVALID_BEARER;
g_prov_setting_type |= PROV_BRS_SETTINGS;
mmi_prov_handle_data_account_mem_free();
mmi_prov_handle_profile_mem_free();
}
/*****************************************************************************
* FUNCTION
* mmi_prov_hilite_data_account
* DESCRIPTION
*
* PARAMETERS
* index [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_prov_hilite_data_account(S32 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
g_prov_data_account_index = (U8) index;
}
/*****************************************************************************
* FUNCTION
* mmi_prov_check_and_install_new_settings
* DESCRIPTION
* THis Checks if there is any provisioning data availbale to be installed
* PARAMETERS
* void
* RETURNS
* U8
*****************************************************************************/
U8 mmi_prov_check_and_install_new_settings(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if(g_prov_pend_set)
{
mmi_prov_handle_get_next_prov_data();
}
if (g_prov_settings_present)
{
if (g_prov_data_queue_size > 0)
{
/* mmi_prov_show_install_settings_dialog(); */
return 1;
}
else
{
g_prov_settings_present = 0x00;
return 0;
}
}
else
{
return 0;
}
}
/*****************************************************************************
* FUNCTION
* mmi_prov_check_if_substring
* DESCRIPTION
* This function checks whether the sub-string starts with the given string.
* on an error it returns -1 else returns 0.
* PARAMETERS
* string_p [IN] The main string
* sub_string_p [IN] The sub string to be checked
* RETURNS
* S32
*****************************************************************************/
S32 mmi_prov_check_if_substring(const S8 *string_p, const S8 *sub_string_p)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 buf_len;
S32 start_len;
S32 i;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (string_p == NULL)
{
return -1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -