commsfwtools/preparedefaultcommsdatabase/src/CommsDatValidator.cpp
changeset 2 dee179edb159
parent 0 dfb7c4ff071f
child 12 8b5d60ce1e94
equal deleted inserted replaced
1:21d2ab05f085 2:dee179edb159
  1231 // statements) it is usual to start from 1 and count upwards.
  1231 // statements) it is usual to start from 1 and count upwards.
  1232 //
  1232 //
  1233 // This might change, so is not included in the check at top of the function, when finding mapped AP records.
  1233 // This might change, so is not included in the check at top of the function, when finding mapped AP records.
  1234 //
  1234 //
  1235 //static const TUint KAPToIAPTagMappingThreshold     = 255;
  1235 //static const TUint KAPToIAPTagMappingThreshold     = 255;
  1236 static const TUint KAPToIAPRecordIdMappingConstant = 251;
       
  1237 
  1236 
  1238 // TCleanupOperation function.
  1237 // TCleanupOperation function.
  1239 //
  1238 //
  1240 template <class T>
  1239 template <class T>
  1241 void DestroyRPointerArray(TAny* aPtr)
  1240 void DestroyRPointerArray(TAny* aPtr)
  1396 
  1395 
  1397    	    CCDAccessPointRecord *newAPRecord =
  1396    	    CCDAccessPointRecord *newAPRecord =
  1398    	                static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
  1397    	                static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord));
  1399 		CleanupStack::PushL(newAPRecord);
  1398 		CleanupStack::PushL(newAPRecord);
  1400 
  1399 
  1401 	    const TInt KBaseAPRecordId = KAPToIAPRecordIdMappingConstant - KThisIAPRecordId;
       
  1402 
       
  1403         // ... and finally the link record
  1400         // ... and finally the link record
  1404 
  1401 
  1405         // The clean up stack handling of 'pBearerType' seems a bit contorted.
  1402         // The clean up stack handling of 'pBearerType' seems a bit contorted.
  1406         
  1403         
  1407         CCDBearerTypeRecord* pBearerType = NULL;
  1404         CCDBearerTypeRecord* pBearerType = NULL;
  1429            	TPtrC name(pBearerType->iRecordName);
  1426            	TPtrC name(pBearerType->iRecordName);
  1430             tempName.Format(KAPNameFormat, &name, &KMappedFrom, KThisIAPRecordId);
  1427             tempName.Format(KAPNameFormat, &name, &KMappedFrom, KThisIAPRecordId);
  1431             InitialiseAccessPointRecordL(
  1428             InitialiseAccessPointRecordL(
  1432                 *newAPRecord,
  1429                 *newAPRecord,
  1433                 tempName,
  1430                 tempName,
  1434                 KBaseAPRecordId - KThisIAPRecordId,
  1431                 KCDNewRecordRequest,
  1435                 KLinkAPTag,
  1432                 KLinkAPTag,
  1436                 pBearerType->iTier,
  1433                 pBearerType->iTier,
  1437                 pBearerType->iMCpr,
  1434                 pBearerType->iMCpr,
  1438                 KZero,
  1435                 KZero,
  1439                 pBearerType->iCpr,
  1436                 pBearerType->iCpr,