📄 mmibookservices.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: MmiBookServices.c
$Revision: 1.0
$Author: Condat(UK)
$Date: 25/10/00
********************************************************************************
Description:
This provides the implementation of service functions for use with the
phone book module
********************************************************************************
$History: MmiBookServices.c
25/10/00 Original Condat(UK) BMI version.
$End
*******************************************************************************/
/********************************************************************************
$History: MmiBookServices.c
22/07/02 zy Mobile Innovation add the function:bookShowInformationWithIcon
make the information dialog has icons
08/08 fzq modified
20/08/02 ver0.103 fzq modified
01/11/2003 sunsj
modify the phone book input area and display method
10/11/2003 sunsj
modify the number display method when input phone book record
2003/11/19 sunsj add name icon
$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 "mfw_cnvt.h" //GW Added for 'mfw_SIM2GsmStr'
#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 "MmiBookController.h"
#include "MmiBookPhonebook.h"
#include "mmiusersymbolinput.h"
#include "mmisettings.h"
static void book_edit_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason);
static void book_add_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason);
static void book_search_information(T_MFW_HND win, UBYTE identifier, UBYTE reason);
static void ChangeFlashDCTbDataName(T_EasyName NumChangeName);//yq added 2003/1/24
//JVJE #include "MmiMsgsEdit.h"
//JVJE#include "MmiSmsCB.h"
//#include "MmiMsgs.h"
/*******************************************************************************
Private data elements
*******************************************************************************/
static MfwHnd phb;
static int NewIndex;
void ShowDetailView(int txtid1,int txtid2);
static void cleardown(int txtid);
static void clearup();
#if ( MAIN_LCD_SIZE==2 )
extern unsigned char iconWaitting[];
#endif
void UpdateDetailDate(T_phbk *Phbk); /* 2003/10/21 sunsj add */
/* 2004/05/26 sunsj modify */
#if(MAIN_LCD_SIZE==4)
#define PHONEBOOK_RECORD_PERPAGE 3
#elif(MAIN_LCD_SIZE==3)
#define PHONEBOOK_RECORD_PERPAGE 4
#endif
/*******************************************************************************
Public Methods
*******************************************************************************/
/*******************************************************************************
$Function: bookInitialise
$Description: Initialise the phone book application
$Returns: none, side effect is to set up the static phone
book element
$Arguments: none
*******************************************************************************/
void bookInitialise( MfwHnd parent )
{
//TRACE_FUNCTION( "bookInitialise()" );
phb = phb_create( 0, (MfwEvt) (E_PHB_UPN_LIST | E_PHB_ERROR | E_PHB_STATUS | E_PHB_READY), (MfwCb) bookEvent );
bookCreateNewPhoneBook();
}
/*******************************************************************************
$Function: bookExit
$Description: Exit the phone book application, this will delete the static
phone book element
$Returns: none
$Arguments: none
*******************************************************************************/
void bookExit( void )
{
//TRACE_FUNCTION( "bookExit()" );
phb_delete( phb );
bookDeletePhoneBook();
}
/*******************************************************************************
$Function: bookShowInformation
$Description: general information dialog routine
$Returns: none
$Arguments: parent, window,
text, to be displayed,
cb_function, call back on completion of window
*******************************************************************************/
/* 2004/03/02 sunsj modify */
void bookShowInformation( MfwHnd parent, int txtId, char *text, T_VOID_FUNC cb_function )
{
T_DISPLAY_DATA display_info;
//TRACE_FUNCTION( "bookShowInformation()" );
dialog_info_init(&display_info);//gdy add
display_info.KeyEvents = KEY_CLEAR|KEY_LEFT|KEY_RIGHT;
display_info.TextId = 0;
display_info.TextId2 = txtId;
display_info.TextString = text;
display_info.TextString2 = '\0';
display_info.LeftSoftKey = TxtNull;
display_info.RightSoftKey = TxtSoftBack;
display_info.Time = FOREVER;
display_info.Callback = (T_VOID_FUNC) cb_function;
display_info.Identifier =0;
switch( display_info.TextId2 )
{
case TxtCopySucceed:
case TxtDelSucceed:
case TxtAddSucceed:
case TxtEditSucceed:
case TxtEntryDeleted:
case TxtDeleted:
case TxtDelMember:
case TxtMemberAdd:
display_info.iconindex=REMIND_SUCCEED;
display_info.Time = ONE_SECS;
break;
case TxtFailed:
case TxtReadError:
case TxtWriteError:
case TxtNoVoiceDial:
case TxtVoiceDialFull:
case TxtDelFail:
case TxtEditFail:
case TxtAddFail:
case TxtCopyFail:
display_info.iconindex=REMIND_FAILURE;
display_info.Time = ONE_SECS;
break;
case TxtPleaseWait:
display_info.iconindex=REMIND_WAITTING;
display_info.Time = FIVE_SECS;
break;
case TxtPhbkFull:
case TxtPhbkSimEmpty:
case TxtPhbkNvmFull:
case TxtPhbkNvmEmpty:
case TxtPhbkSimFull:
case TxtEmptyList:
case TxtCapacityFull:
case TxtCallTimeout:
display_info.iconindex=REMIND_NORECORD;
break;
default:
display_info.Time=1000;
break;
}
// Call Info Screen
info_dialog( parent, &display_info );
}
void bookShowPhbkInformation( MfwHnd parent, int txtId, char *text, T_VOID_FUNC cb_function )
{
T_DISPLAY_DATA display_info;
//TRACE_FUNCTION( "bookShowInformation()" );
dialog_info_init(&display_info);//gdy add
//display_info.KeyEvents = KEY_CLEAR;/*2003/12/3, wangyan modify*/
display_info.KeyEvents = KEY_CLEAR|KEY_RIGHT | KEY_HUP;
display_info.TextId = txtId;
display_info.TextId2 = 0;
display_info.TextString = '\0';
display_info.TextString2 =text;
display_info.LeftSoftKey = TxtNull;
display_info.RightSoftKey = TxtSoftBack;
display_info.Time = ONE_SECS;
display_info.Callback = (T_VOID_FUNC) cb_function;
display_info.iconindex=REMIND_SUCCEED;
// Call Info Screen
info_dialog( parent, &display_info );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -