Hello,
I would like to know whether CommsDat API is suitable to Wi-Fi access point management. I have too much troubles with it.
For example, I want to get a linked record from Service table (CCDWlanServiceRecord), traversing from IAP table. Here is my code:
I recieve a User::Leave on method GetL(). As it is inline, I can see the source of my problem. It is here, in User::Leave:Code:CMDBSession* iDb = CMDBSession::NewL(CMDBSession::LatestVersion()); CMDBRecordSet<CCDIAPRecord>* ptrIapRecordSet = new (ELeave) CMDBRecordSet<CCDIAPRecord>(KCDTIdIAPRecord); ptrIapRecordSet->LoadL(*iDb); TInt i(0); while (i < ptrIapRecordSet->iRecords.Count()) { CCDIAPRecord* ptrIapRecord = static_cast<CCDIAPRecord *>(ptrIapRecordSet->iRecords[i]); ptrIapRecord->iService.LoadL(*iDb); _LIT(KSearch, "myadhoc"); if(ptrIapRecord->iRecordName.GetL() == strLANService) { CCDWlanServiceRecord* iWLanService = static_cast<CCDWlanServiceRecord*>(ptrIapRecord->iService.iLinkedRecord); _LIT(Str2, "iWlanSSID"); notifier.Notify(Str2, iWLanService->iWLanSSID.GetL(), KButt1, KButt2, whichbutton, stat); } }
I cannot what is the reason of this leave. Am I doing something wrong with CommsDat, or is it a bug in it, or what? Can someone give me a guidance?Code:inline CMDBField<TYPE>& GetL() { if(IsNull() && !(ElementId() & KCDChangedFlag)) { User::Leave(KErrNotFound); //todo commsdat specific error code } return (TYPE&)iValue; }



