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