975 |
975 |
976 RArray<CNSmlDMAlertItem> iItemArray; |
976 RArray<CNSmlDMAlertItem> iItemArray; |
977 |
977 |
978 |
978 |
979 CNSmlDMAlertItem* item = new (ELeave) CNSmlDMAlertItem ; |
979 CNSmlDMAlertItem* item = new (ELeave) CNSmlDMAlertItem ; |
980 |
980 CleanupStack::PushL(item); |
981 HBufC8 *data = HBufC8::NewL(1024); |
981 HBufC8 *data = HBufC8::NewL(1024); |
982 |
982 CleanupStack::PushL(data); |
|
983 |
983 TPtr8 ptr = data->Des(); |
984 TPtr8 ptr = data->Des(); |
984 //ptr.Append(KDataStart); |
985 //ptr.Append(KDataStart); |
985 ptr.Append(KResultCodeStart); |
986 ptr.Append(KResultCodeStart); |
986 ptr.Append(dataresult); |
987 ptr.Append(dataresult); |
987 ptr.Append(KResultCodeEnd); |
988 ptr.Append(KResultCodeEnd); |
988 ptr.Append(KIdentifierStart); |
989 ptr.Append(KIdentifierStart); |
989 ptr.Append(mapping); |
990 ptr.Append(mapping); |
990 ptr.Append(KIdentifierEnd); |
991 ptr.Append(KIdentifierEnd); |
991 //ptr.Append(KDataEnd); |
992 //ptr.Append(KDataEnd); |
992 |
993 |
993 HBufC8 *sourceuri = genericalerts[i]->iSourceURI; |
994 HBufC8 *sourceuri = genericalerts[i]->iSourceURI; |
994 |
995 |
995 item->iSource = sourceuri; |
996 item->iSource = sourceuri; |
996 |
997 |
997 HBufC8 *targeturi = targetURIGet.AllocL(); |
998 HBufC8 *targeturi = targetURIGet.AllocL(); |
998 |
999 CleanupStack::PushL(targeturi); |
999 item->iTarget = targeturi; |
1000 item->iTarget = targeturi; |
1000 |
1001 |
1001 HBufC8 *metatype = scomometatype.AllocL(); |
1002 HBufC8 *metatype = scomometatype.AllocL(); |
1002 |
1003 CleanupStack::PushL(metatype); |
1003 item->iMetaType = metatype; |
1004 item->iMetaType = metatype; |
1004 |
1005 |
1005 HBufC8 *metaformat = scomometaformat.AllocL(); |
1006 HBufC8 *metaformat = scomometaformat.AllocL(); |
1006 |
1007 CleanupStack::PushL(metaformat); |
1007 item->iMetaFormat = metaformat; |
1008 item->iMetaFormat = metaformat; |
1008 |
1009 |
1009 HBufC8 *metamark = scomomark.AllocL(); |
1010 HBufC8 *metamark = scomomark.AllocL(); |
1010 |
1011 CleanupStack::PushL(metamark); |
1011 item->iMetaMark = metamark; |
1012 item->iMetaMark = metamark; |
1012 |
1013 |
1013 item->iData = data; |
1014 item->iData = data; |
1014 |
1015 |
1015 iItemArray.AppendL(*item); |
1016 iItemArray.AppendL(*item); |
1016 |
1017 |
1017 TRAP_IGNORE(privateAPI.AddDMGenericAlertRequestL( |
1018 TRAP_IGNORE(privateAPI.AddDMGenericAlertRequestL( |
1018 *genericalerts[i]->iCorrelator,iItemArray )); |
1019 *genericalerts[i]->iCorrelator,iItemArray )); |
|
1020 |
|
1021 CleanupStack::PopAndDestroy( metamark); |
|
1022 CleanupStack::PopAndDestroy( metaformat); |
|
1023 CleanupStack::PopAndDestroy( metatype); |
|
1024 CleanupStack::PopAndDestroy( targeturi); |
|
1025 CleanupStack::PopAndDestroy( data); |
|
1026 CleanupStack::PopAndDestroy( item); |
1019 |
1027 |
1020 |
1028 iItemArray.Reset(); |
1021 delete data; |
1029 iItemArray.Close(); |
1022 |
1030 CleanupStack::PopAndDestroy( &privateAPI); |
1023 delete metamark; |
|
1024 |
|
1025 delete metaformat; |
|
1026 |
|
1027 delete metatype; |
|
1028 |
|
1029 delete targeturi; |
|
1030 delete item; |
|
1031 |
|
1032 iItemArray.Reset(); |
|
1033 iItemArray.Close(); |
|
1034 CleanupStack::PopAndDestroy( &privateAPI); |
|
1035 } |
1031 } |
1036 } |
1032 } |
1037 genericalerts.ResetAndDestroy(); |
1033 genericalerts.ResetAndDestroy(); |
1038 CleanupStack::PopAndDestroy(); //serverid |
1034 CleanupStack::PopAndDestroy(); //serverid |
1039 |
1035 |
4142 if ( !iTrustAdded) |
4138 if ( !iTrustAdded) |
4143 { |
4139 { |
4144 RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust Closing Session" ); |
4140 RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust Closing Session" ); |
4145 iManagement.Close(); |
4141 iManagement.Close(); |
4146 iSessionOpened = EFalse; |
4142 iSessionOpened = EFalse; |
4147 RApplicationManagement &session = SessionL(); |
4143 // RApplicationManagement &session = SessionL(); // coverity Fix |
4148 RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust new session started" ); |
4144 RDEBUG( "CSCOMOAdapter::CheckStateChangesL(): Adding Trust new session started" ); |
4149 } |
4145 } |
4150 } |
4146 } |
4151 |
4147 |
4152 // ------------------------------------------------------------------------------------- |
4148 // ------------------------------------------------------------------------------------- |