1. MMI_PHB_ENTRY_STRUCT
主要的数据结构,包含了phonebook entry.
typedef struct
{
U8 storage; /* 0-none, 1-SIM, 2-ME */ //SIM entry or a Phone entry
U8 type;
U16 index; //按照字母顺序的排列索引
U16 record_index; //按照实际存储的物理位置排列索引
MMI_PHB_NUMBER_STRUCT tel; //号码
MMI_PHB_NAME_STRUCT alpha_id; //姓名
} MMI_PHB_ENTRY_STRUCT;
typedef struct
{
U8 name_length; /* Name Length */
U8 name_dcs; /* Name Data Coding Scheme */
U8 name[(MAX_PB_NAME_LENGTH + 1) *ENCODING_LENGTH];
} MMI_PHB_NAME_STRUCT;
typedef struct
{
U8 type; /* 129-default, 145-international */
U8 length;
U8 number[(MAX_PB_NUMBER_LENGTH + 1 + 1) *ENCODING_LENGTH]; /* 1 for + Sign and 1 for Null Termination. */
} MMI_PHB_NUMBER_STRUCT;
2. PHB_OPTIONAL_FIELDS_STRUCT
这个结构只有phone entries才有,存储在NVRAM中。
/* Optional field in a phonebook entry */
typedef struct
{
U8 homeNumber[MAX_PB_NUMBER_LENGTH + 1 + 1];
U8 companyName[(MAX_PB_COMPANY_LENGTH + 1) *ENCODING_LENGTH];
U8 emailAddress[MAX_PB_EMAIL_LENGTH + 1];
U8 officeNumber[MAX_PB_NUMBER_LENGTH + 1 + 1];
U8 faxNumber[MAX_PB_NUMBER_LENGTH + 1 + 1];
} PHB_OPTIONAL_FIELDS_STRUCT;
3. PHB_CM_INTERFACE
在CM中,根据号码到电话簿中查找,如果存在,就返回这个结构
typedef struct
{
U8 name[(MAX_PB_NAME_LENGTH + 1) *ENCODING_LENGTH];
U8 number[(MAX_PB_NUMBER_LENGTH + 1 + 1) *ENCODING_LENGTH];
U8 name_dcs;
U8 alertType; /* MMI_ALERT_TYPE */
U16 pictureId;
U16 ringtoneId;
U16 backlightId;
U16 record_index; /* For Query Image Path */
U16 videoId;
U16 video_record_index;
U8 dialInList;
} PHB_CM_INTERFACE;
下面2个结构在代码中看不到!!!
static PHB_OPTIONAL_IDS_STRUCT g_phb_optional_ids;
static PHB_CALLER_GROUP_STRUCT g_phb_caller_group[MAX_PB_CALLER_GROUPS];
在simulator中查看:
type struct
{
pictureTagID;
ringtoneID;
callerGroupID;
}g_phb_optional_ids;
type struct
{
groupName[];
ringToneID;
pictureTagID;
LEDPatternId;
VideoID;
alertType;
is_modified;
}g_phb_caller_group