📄 atbwapaui.c
字号:
View_header = NULL;
Current_view = NULL;
return ATB_wap_terminate(¶meter2);
}
#endif
}
}
/*******************************************************************************
$Function: ATB_wap_UIdata
$Description: Returns the UI pointer, for use by AUI
$Returns: The void pointer
$Arguments:
*******************************************************************************/
void * ATB_wap_UIdata()
{
#ifndef MMS_WAP_ENABLED
if (View_header)
return View_header->UIdata;
#else
if(Current_view)
return Current_view->UIdata;
#endif
else
return NULL;
}
/*******************************************************************************
$Function: ATB_wap_terminate
$Description: Closes the WAP application and frees all the memory allocated
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments:
*******************************************************************************/
T_WAP_RES ATB_wap_terminate(T_MMI_WAP_TERMINATE_IND *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_terminate");
#endif
disconnect_wap_call(parameter->access_type); // Patch call to ACI to disconnect the call. It has to be revised.
M_MMI_WAP_TERMINATE_IND(parameter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_configure
$Description: Sends configuration information to the browser, the more important being:
- ConfigHISTORY_SIZE, the number of URLs stored in the history
- ConfigCACHE_AGE, period for the cache to store a card
- ConfigDISPLAY_IMAGES, images to be displayed or not
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Properties of configuration
*******************************************************************************/
T_WAP_RES ATB_wap_configure(T_MMI_WAP_CONFIGURE_IND *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_configure");
TRACE_EVENT_P1("MMI object ID: %d",parameter->object_id);
TRACE_EVENT_P3( "Type, Param, Length: %d, %d, %d", parameter->type, parameter->param, parameter->length);
#endif
M_MMI_WAP_CONFIGURE_IND(parameter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_connection_configure
$Description: Sends network configuration information to the browser, such as the
bearer, IP addresses, passwords and ids, etc.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Properties of configuration
*******************************************************************************/
T_WAP_RES ATB_wap_connection_configure(T_MMI_WAP_CONNECTION_CONFIGURE_IND *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_connection_configure");
#endif
M_MMI_WAP_CONNECTION_CONFIGURE_IND(parameter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_download_url
$Description: Requests the WAP browser to download a particular URL
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Properties of the URL download
*******************************************************************************/
T_WAP_RES ATB_wap_download_url(T_MMI_WAP_DOWNLOAD_URL_IND *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_download_url");
#endif
M_MMI_WAP_DOWNLOAD_URL_IND(parameter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_stop_download
$Description: Requests the WAP browser to stop downloading a particular URL
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
*******************************************************************************/
T_WAP_RES ATB_wap_stop_download(T_WAP_VIEW *View)
{
T_MMI_WAP_BROWSE_CONTROL_IND parameter;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_stop_download");
#endif
parameter.object_id = View->object_id;
parameter.browse_command = WAP_DOWNLOAD_STOP;
M_MMI_WAP_BROWSE_CONTROL_IND(¶meter);
ATB_wap_status_change(View,ATB_WAP_NO_STATUS);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_card_refresh
$Description: Requests the WAP browser to refresh the current card from the network
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
*******************************************************************************/
T_WAP_RES ATB_wap_card_refresh(T_WAP_VIEW *View)
{
T_MMI_WAP_BROWSE_CONTROL_IND parameter;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_card_refresh");
#endif
parameter.object_id = View->object_id;
parameter.browse_command = WAP_CARD_REFRESH;
M_MMI_WAP_BROWSE_CONTROL_IND(¶meter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_card_display
$Description: Requests the WAP browser to redisplay a card held in the cache
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
*******************************************************************************/
T_WAP_RES ATB_wap_card_display(T_WAP_VIEW *View)
{
T_MMI_WAP_BROWSE_CONTROL_IND parameter;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_card_display");
#endif
parameter.object_id = View->object_id;
parameter.browse_command = WAP_CARD_DISPLAY;
M_MMI_WAP_BROWSE_CONTROL_IND(¶meter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_card_go_back
$Description: Requests the WAP browser to go to the previous card
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
*******************************************************************************/
T_WAP_RES ATB_wap_card_go_back(T_WAP_VIEW *View)
{
T_MMI_WAP_BROWSE_CONTROL_IND parameter;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_card_go_back");
#endif
parameter.object_id = View->object_id;
parameter.browse_command = WAP_CARD_GO_BACK;
M_MMI_WAP_BROWSE_CONTROL_IND(¶meter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_card_key_event
$Description: Requests the WAP browser react to a key event, up/down etc.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
keyType - the type of key selected
*******************************************************************************/
T_WAP_RES ATB_wap_card_key_event(T_WAP_VIEW *View, WAP_CONTROL_TYPES keyType)
{
T_MMI_WAP_BROWSE_CONTROL_IND command;
T_MMI_WAP_DRAW_CARD_REQ current_card;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_card_key_event");
#endif
command.object_id = View->object_id;
command.browse_command = keyType;
M_MMI_WAP_BROWSE_CONTROL_IND(&command);
if (keyType == WAP_KEY_SELECT) // For select, need to redraw card
{ // in order to update changed elements
current_card.object_id = View->object_id;
M_MMI_WAP_DRAW_CARD_REQ(¤t_card);
}
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_key_selected
$Description: Send the id of the selected WAP key to the AUS browser.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
keyId - Key identifier
*******************************************************************************/
T_WAP_RES ATB_wap_key_selected(T_WAP_VIEW *View, USHORT keyId)
{
T_MMI_WAP_KEY_SELECTED_IND parameter;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_key_selected");
#endif
parameter.object_id = View->object_id;
parameter.keyId = keyId;
M_MMI_WAP_KEY_SELECTED_IND(¶meter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_card scroll
$Description: Scroll to a y position on the current card
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: View - the current view
scrollPos - Y position on card to which to scroll
*******************************************************************************/
T_WAP_RES ATB_wap_card_scroll(T_WAP_VIEW *View, SHORT scrollPos)
{
T_MMI_WAP_BROWSE_CONTROL_IND parameter;
// Make sure the scroll destination is on the card
if (scrollPos > (View->cardHeight-WAP_SCREEN_HEIGHT))
scrollPos = View->cardHeight-WAP_SCREEN_HEIGHT;
if (scrollPos<0)
scrollPos = 0;
// Send the event
parameter.object_id = View->object_id;
parameter.browse_command = WAP_KEY_SCROLL;
parameter.browse_parameter = (USHORT)scrollPos;
M_MMI_WAP_BROWSE_CONTROL_IND(¶meter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_input_dialog_closed
$Description: Provides the answer of an input dialog.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Dialog confirmation information
*******************************************************************************/
T_WAP_RES ATB_wap_input_dialog_closed(T_MMI_WAP_INPUT_DIALOG_CNF *parameter)
{
T_MMI_WAP_DRAW_CARD_REQ current_card;
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_input_dialog_closed");
#endif
M_MMI_WAP_INPUT_DIALOG_CNF(parameter);
current_card.object_id = parameter->object_id;
M_MMI_WAP_DRAW_CARD_REQ(¤t_card);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_password_dialog_closed
$Description: Provides the answer of a password dialog.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Dialog confirmation information
*******************************************************************************/
T_WAP_RES ATB_wap_password_dialog_closed(T_MMI_WAP_PASSWORD_DIALOG_CNF *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_password_dialog_closed");
#endif
M_MMI_WAP_PASSWORD_DIALOG_CNF(parameter);
return WAP_OK;
}
/*******************************************************************************
$Function: ATB_wap_confirm_dialog_closed
$Description: Provides the answer of a confirmation dialog.
$Returns: WAP_OK if successful, WAP_FAIL if otherwise
$Arguments: parameter - Dialog confirmation information
*******************************************************************************/
T_WAP_RES ATB_wap_confirm_dialog_closed(T_MMI_WAP_CONFIRM_DIALOG_CNF *parameter)
{
#ifdef TRACE_ATBWAPAUI
TRACE_FUNCTION("ATB_wap_confirm_dialog_closed");
#endif
M_MMI_WAP_CONFIRM_DIALOG_CNF(parameter);
return WAP_OK;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -