440 // Commit transaction |
440 // Commit transaction |
441 RPropertyHashMap propertyHashMap; |
441 RPropertyHashMap propertyHashMap; |
442 |
442 |
443 TBool layoutChanged( EFalse ); |
443 TBool layoutChanged( EFalse ); |
444 |
444 |
445 TRAPD( error, tr->CommitL( iFactory->PolicyArray(), propertyHashMap ) ); |
445 TRAPD( error, tr->CommitL( layoutChanged, propertyHashMap ) ); |
446 |
446 |
447 if( error == KErrNone ) |
447 if( error == KErrNone ) |
448 { |
448 { |
449 TRAP_IGNORE( SetPropertyArraysL( propertyHashMap ) ); |
449 TRAP_IGNORE( SetPropertyArraysL( propertyHashMap ) ); |
450 } |
450 } |
1013 aText, |
1012 aText, |
1014 priority ); |
1013 priority ); |
1015 } |
1014 } |
1016 |
1015 |
1017 iPolicyEvaluator->EvaluateContentPolicyL( |
1016 iPolicyEvaluator->EvaluateContentPolicyL( |
1018 *target, iFactory->PolicyArray() ); |
1017 *target, element->PolicyArray() ); |
1019 |
1018 |
1020 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1019 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1021 *target, iFactory->PolicyArray() ); |
1020 *target, element->PolicyArray() ); |
1022 |
1021 |
1023 ProcessTransactionElementL( element ); |
1022 ProcessTransactionElementL( element ); |
1024 } |
1023 } |
1025 else |
1024 else |
1026 { |
1025 { |
1130 MTransactionElement* element = |
1129 MTransactionElement* element = |
1131 iFactory->CreateImageTransactionElementL( |
1130 iFactory->CreateImageTransactionElementL( |
1132 *target, aFile, priority ); |
1131 *target, aFile, priority ); |
1133 |
1132 |
1134 iPolicyEvaluator->EvaluateContentPolicyL( |
1133 iPolicyEvaluator->EvaluateContentPolicyL( |
1135 *target, iFactory->PolicyArray() ); |
1134 *target, element->PolicyArray() ); |
1136 |
1135 |
1137 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1136 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1138 *target, iFactory->PolicyArray() ); |
1137 *target, element->PolicyArray() ); |
1139 |
1138 |
1140 ProcessTransactionElementL( element ); |
1139 ProcessTransactionElementL( element ); |
1141 } |
1140 } |
1142 else |
1141 else |
1143 { |
1142 { |
1213 MTransactionElement* element = |
1212 MTransactionElement* element = |
1214 iFactory->CreateEmptyContentTransactionElementL( |
1213 iFactory->CreateEmptyContentTransactionElementL( |
1215 *target, aIndex ); |
1214 *target, aIndex ); |
1216 |
1215 |
1217 iPolicyEvaluator->EvaluateEmptyContentPolicyL( |
1216 iPolicyEvaluator->EvaluateEmptyContentPolicyL( |
1218 *target, iFactory->PolicyArray() ); |
1217 *target, element->PolicyArray() ); |
1219 |
1218 |
1220 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1219 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1221 *target, iFactory->PolicyArray() ); |
1220 *target, element->PolicyArray() ); |
1222 |
1221 |
1223 ProcessTransactionElementL( element ); |
1222 ProcessTransactionElementL( element ); |
1224 |
1223 |
1225 if ( priority > KErrNotFound ) // Only for prioritized elements |
1224 if ( priority > KErrNotFound ) // Only for prioritized elements |
1226 { |
1225 { |
1274 TBool layoutChanged( EFalse ); |
1273 TBool layoutChanged( EFalse ); |
1275 |
1274 |
1276 RPropertyHashMap propertyHashMap; |
1275 RPropertyHashMap propertyHashMap; |
1277 CleanupClosePushL( propertyHashMap ); |
1276 CleanupClosePushL( propertyHashMap ); |
1278 |
1277 |
1279 aElement->CommitL( iFactory->PolicyArray(), propertyHashMap ); |
1278 aElement->CommitL( layoutChanged, propertyHashMap ); |
1280 SetPropertyArraysL( propertyHashMap ); |
1279 SetPropertyArraysL( propertyHashMap ); |
1281 |
1280 |
1282 CleanupStack::PopAndDestroy( &propertyHashMap ); |
1281 CleanupStack::PopAndDestroy( &propertyHashMap ); |
1283 |
1282 |
1284 iFactory->ReleaseTransactionElement( aElement ); |
1283 iFactory->ReleaseTransactionElement( aElement ); |
1443 *target, aIcon, priority ); |
1442 *target, aIcon, priority ); |
1444 |
1443 |
1445 if ( aResource ) |
1444 if ( aResource ) |
1446 { |
1445 { |
1447 iPolicyEvaluator->EvaluateResourcePolicyL( |
1446 iPolicyEvaluator->EvaluateResourcePolicyL( |
1448 *target, *aResource, iFactory->PolicyArray() ); |
1447 *target, *aResource, element->PolicyArray() ); |
1449 |
1448 |
1450 iPolicyEvaluator->EvaluateContentPolicyL( |
1449 iPolicyEvaluator->EvaluateContentPolicyL( |
1451 *target, iFactory->PolicyArray() ); |
1450 *target, element->PolicyArray() ); |
1452 |
1451 |
1453 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1452 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1454 *target, iFactory->PolicyArray() ); |
1453 *target, element->PolicyArray() ); |
1455 } |
1454 } |
1456 |
1455 |
1457 else |
1456 else |
1458 { |
1457 { |
1459 iPolicyEvaluator->EvaluateContentPolicyL( |
1458 iPolicyEvaluator->EvaluateContentPolicyL( |
1460 *target, iFactory->PolicyArray() ); |
1459 *target, element->PolicyArray() ); |
1461 |
1460 |
1462 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1461 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1463 *target, iFactory->PolicyArray() ); |
1462 *target, element->PolicyArray() ); |
1464 } |
1463 } |
1465 |
1464 |
1466 ProcessTransactionElementL( element ); |
1465 ProcessTransactionElementL( element ); |
1467 |
1466 |
1468 return KErrNone; |
1467 return KErrNone; |
1521 } |
1520 } |
1522 |
1521 |
1523 if ( aResource ) |
1522 if ( aResource ) |
1524 { |
1523 { |
1525 iPolicyEvaluator->EvaluateResourcePolicyL( |
1524 iPolicyEvaluator->EvaluateResourcePolicyL( |
1526 *target, *aResource, iFactory->PolicyArray() ); |
1525 *target, *aResource, element->PolicyArray() ); |
1527 |
1526 |
1528 iPolicyEvaluator->EvaluateContentPolicyL( |
1527 iPolicyEvaluator->EvaluateContentPolicyL( |
1529 *target, iFactory->PolicyArray() ); |
1528 *target, element->PolicyArray() ); |
1530 |
1529 |
1531 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1530 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1532 *target, iFactory->PolicyArray() ); |
1531 *target, element->PolicyArray() ); |
1533 } |
1532 } |
1534 else |
1533 else |
1535 { |
1534 { |
1536 iPolicyEvaluator->EvaluateContentPolicyL( |
1535 iPolicyEvaluator->EvaluateContentPolicyL( |
1537 *target, iFactory->PolicyArray() ); |
1536 *target, element->PolicyArray() ); |
1538 |
1537 |
1539 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1538 iPolicyEvaluator->EvaluateVisibilityPolicyL( |
1540 *target, iFactory->PolicyArray() ); |
1539 *target, element->PolicyArray() ); |
1541 } |
1540 } |
1542 |
1541 |
1543 ProcessTransactionElementL( element ); |
1542 ProcessTransactionElementL( element ); |
1544 |
1543 |
1545 return KErrNone; |
1544 return KErrNone; |