Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi ,

i want to traverse the addressbook on the phone so i hav written the below code

if(pApp->m_pAddrBook )
res = IADDRBOOK_EnumCategoryInit(pApp->m_pAddrBook );
IADDRBOOK_EnumNextCategory(pApp->m_pAddrBook ,pc);
DBGPRINTF("pc= %d",pc);

res = IADDRBOOK_EnumFieldsInfoInit(pApp->m_pAddrBook , AEE_ADDR_CAT_NONE);
DBGPRINTF ("IADDRBOOK_EnumFieldsInfoInit = %d",res);

while(IADDRBOOK_EnumNextFieldsInfo(pApp->m_pAddrBook ,&pf))
{
DBGPRINTF("FieldId= %d",pf.fieldID);
DBGPRINTF("MaxItems= %d",pf.nMaxItems);
DBGPRINTF("fType= %d",pf.fType);

res = IADDRBOOK_EnumRecInit(pApp>m_pAddrBook ,AEE_ADDR_CAT_NONE,AEE_ADDRFIELD_NONE, NULL,0);

DBGPRINTF("EnumRecInit = %d",res);
pApp->no_of_rec = IADDRBOOK_GetNumRecs(pApp->m_pAddrBook );
DBGPRINTF("NoOfRec= %d",pApp->no_of_rec);

pApp->m_pIAddrRec = IADDRBOOK_EnumNextRec(pApp->m_pAddrBook );
pApp->m_AddrField = IADDRREC_GetField(pApp->m_pIAddrRec,24);
DBGPRINTF("fID = %d",pApp->m_AddrField->fID);
DBGPRINTF("fType = %d",pApp->m_AddrField->fType);
DBGPRINTF("DataLen = %d",pApp->m_AddrField->wDataLen);

i hav got ptr to the record but how do i actually get the filed values present in the record.
could some 1 pls help me out...

i tried using the AEEAddrField * IADDRREC_GetField(IAddrRec * pIAddrRec, int nFieldIdx) function. but could not identify wht values is required in the nFieldIdx parameter

need some suggestion over this...

thanks in advance
Pribhi.

IADDRREC_GetFieldCount() - gives the count of the number of fields found in this record.
IADDRREC_GetField()- This function retrieves information about the field at the given index. The index is zero based and ranges from zero to NumFields -1 (where NumFields is the number of fields in this record, which is obtained from IADDRREC_GetFieldCount() ).

IADDRREC_GetFieldCount() - gives the count of the number of fields found in this record.
IADDRREC_GetField()- This function retrieves information about the field at the given index. The index is zero based and ranges from zero to NumFields -1 (where NumFields is the number of fields in this record, which is obtained from IADDRREC_GetFieldCount() ).