📄 mmibookcalldetailswindow.c
字号:
/*******************************************************************************
CONDAT (UK)
********************************************************************************
This software product is the property of Condat (UK) Ltd and may not be
disclosed to any third party without the express permission of the owner.
********************************************************************************
$Project name: Basic MMI
$Project code: BMI (6349)
$Module: PhoneBook
$File: MmiBookCallDetailsWindow.c
$Revision: 1.0
$Author: Condat(UK)
$Date: 25/10/00
********************************************************************************
Description:
This provides the implementation of the call details window for the
phone book module
********************************************************************************
$History: MmiBookCallDetailsWindow.c
25/10/00 Original Condat(UK) BMI version.
$End
*******************************************************************************/
/*******************************************************************************
Include Files
*******************************************************************************/
#define ENTITY_MFW
/* includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#if defined (NEW_FRAME)
#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"
#else
#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"
#endif
#include "mfw_sys.h"
#include "mfw_mfw.h"
#include "mfw_win.h"
#include "mfw_kbd.h"
#include "mfw_lng.h"
#include "mfw_edt.h"
#include "mfw_icn.h"
#include "mfw_mnu.h"
#include "mfw_tim.h"
#include "mfw_sim.h"
#include "mfw_cm.h"
#include "mfw_nm.h"
#include "mfw_phb.h"
#include "mfw_mme.h"
#include "mfw_sat.h"
#include "mfw_sms.h"
#include "dspl.h"
#include "ksd.h"
#include "psa.h"
#include "MmiMain.h"
#include "MmiBookController.h"
#include "MmiDummy.h"
#include "MmiDialogs.h"
#include "MmiLists.h"
#include "MmiMenu.h"
#include "MmiCall.h"
#include "MmiIcons.h"
#include "MmiIdle.h"
#include "MmiSoftKeys.h"
#include "MmiSounds.h"
#include "MmiIdle.h"
#include "MmiNetwork.h"
#include "MmiSat_i.h"
#include "MmiAoc.h"
#include "gdi.h"
#include "audio.h"
#include "cus_aci.h"
#include "p_sim.h"
#include "mfw_ffs.h"
#include "MmiTimers.h"
#include "MmiBookShared.h"
#include "MmiCPHS.h"
/*******************************************************************************
Private methods
*******************************************************************************/
/*******************************************************************************
$Function: bookCallDetails
$Description: dialog function for the call details windows
$Returns: None.
$Arguments: win, window handle
event, event to be handled
value, not used
parameter, not used
*******************************************************************************/
static void bookCallDetails( T_MFW_HND win, USHORT event, SHORT value, void * parameter )
{
T_MFW_WIN *win_data = ((T_MFW_HDR *) win)->data;
tBookStandard *data = (tBookStandard *)win_data->user;
TRACE_FUNCTION( "bookCallDetails()" );
/* Only event we need to deal with is the initialise
*/
if ( event == CALL_DETAILS_INIT )
winShow( data->win );
}
/*******************************************************************************
$Function: bookCallDetailsWinCB
$Description: Window call back function
$Returns: MFW_EVENT_CONSUMED
$Arguments: e, event to be handles, w, window handle
*******************************************************************************/
static int bookCallDetailsWinCB( MfwEvt e, MfwWin *w )
{
tBookStandard * data = (tBookStandard *)w->user;
TRACE_FUNCTION("bookCallDetailsWinCB");
switch( e )
{
case MfwWinVisible:
{
char TempBuffer[32];
T_MFW_PHB_ENTRY p_pEntry;
tMmiPhbData current = data->phbk->current;
T_MFW_PHB_ENTRY *my = ¤t.entry[ current.selectedName - current.missedCallsOffset ];
/* default screen update prior to painting below
*/
dspl_ClearAll();
/* try to get the name from the phone book, null the structure out
if we can't find it at all
*/
#ifdef NO_ASCIIZ
{
UBYTE result;
if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) )
{
result = mfw_getStrMode( p_pEntry.name.data, p_pEntry.name.len);
/*if (result EQ MFW_DCS_UCS2)
mfw_SIM2UcsStr( MFW_DCS_7bits,
p_pEntry.name.data,
p_pEntry.name.len,
my->name.data,
my->name.len );
else*/
memcpy( (char*) my->name.data, (char*)p_pEntry.name.data, /*p_pEntry.name.len*/PHB_MAX_LEN );
my->name.len = p_pEntry.name.len;
}
else
{
TRACE_EVENT(">>>>Length set to zero");
my->name.len = 0;
}
}
#else
if ( bookFindNameInPhonebook( (const char *) my->number, &p_pEntry ) )
memcpy( (char*) my->name, (char*)&p_pEntry.name, NAME_SCREEN_MAX );
else
memset( (char*) my->name, '\0', NAME_SCREEN_MAX );
#endif
/* copy the date values into the temporary buffer for now, this will be
the same no matter how we deal with things later (note dealing with BCD here)
*/
/*JVJE
sprintf( TempBuffer, "%02d/%02d/%02d %02d:%02d:%02d",
(UBYTE) ( ( my->date.day[0] ) << 4 ) +
( my->date.day[1] ),
(UBYTE) ( ( my->date.month[0] ) << 4 ) +
( my->date.month[1] ),
(UBYTE) ( ( my->date.year[0] ) << 4 ) +
( my->date.year[1] ),
(UBYTE) ( ( my->time.hour[0] ) << 4 ) +
( my->time.hour[1] ),
(UBYTE) ( ( my->time.minute[0] ) << 4 ) +
( my->time.minute[1] ),
(UBYTE) ( ( my->time.second[0] ) << 4 ) +
( my->time.second[1] ) );
*/
memset((char*)TempBuffer ,'\0',32);
/* if we are in the Service Numbers book, then just show the name
*/
/*JVJE
if ( bookFindNameInSDNPhonebook( (const char *) my->number, &p_pEntry ) )
{
sprintf( (char *) data->edtBuf, "%s%s%s",
(char *) my->name, "\n", TempBuffer );
}
else
*/
#ifdef NO_ASCIIZ
// convert from GSM to Alpha characters
//bookGsm2Alpha( (UBYTE *) my->name.data );
#ifdef EASY_TEXT_ENABLED
if (my->name.data[0] ==0x80)//if unicode
{ //display name as unicode
dspl_TextOut(0,0, DSPL_TXTATTR_UNICODE, (char *)my->name.data);
if ((my->name.data[MAX_LINE+2] != 0) && (my->name.data[MAX_LINE+3] != 0))
dspl_TextOut(0, FIRST_LINE_CHINESE, 0, (char *) &my->name.data[MAX_LINE+2]);
//display number
dspl_TextOut(0, SECOND_LINE_CHINESE, 0, (char *) my->number);
if (strlen((char *) my->number) > MAX_LINE)
dspl_TextOut(0, SECOND_LINE_CHINESE + FIRST_LINE, 0, (char *) &my->number[MAX_LINE]);
}
else
#endif
{
if (CphsPresent() == TRUE)
{
sprintf( (char *) data->edtBuf, "%s%s%s%s%d%s%s",
(char *) my->name.data, "\n",
(char *) my->number,"\n Line ", my->line,"\n",
TempBuffer );
}
else
sprintf( (char *) data->edtBuf, "%s%s%s%s%s",
(char *) my->name.data, "\n",
(char *) my->number,"\n",
TempBuffer );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -