cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp
changeset 61 8b0c979bbe8c
parent 44 a0c4ceac30d0
equal deleted inserted replaced
59:2709c04a4af5 61:8b0c979bbe8c
   458             isLocalised = ETrue;
   458             isLocalised = ETrue;
   459             }
   459             }
   460             break;
   460             break;
   461         case CMManager::ESnapPurposeIntranet:
   461         case CMManager::ESnapPurposeIntranet:
   462             {
   462             {
   463             _LIT( KDestinationTextId, "txt_occ_dblist_intranet");
   463             // Intranet is handled in a special way. If localised metadata is OFF
   464             resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
   464             // destination's network record name is returned
   465             isLocalised = ETrue;
   465             TUint32 localized( 0 );
       
   466             GetMetadataL( CMManager::ESnapMetadataDestinationIsLocalised, localized );
       
   467             if ( localized )
       
   468                 {
       
   469                 _LIT( KDestinationTextId, "txt_occ_dblist_intranet");
       
   470                 resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
       
   471                 isLocalised = ETrue;
       
   472                 }
   466             }
   473             }
   467             break;
   474             break;
   468         default:
   475         default:
   469             break;
   476             break;
   470         }
   477         }
  1629     if ( aMetadata > CMManager::ELocalisedDestIntranet )
  1636     if ( aMetadata > CMManager::ELocalisedDestIntranet )
  1630         {
  1637         {
  1631         User::Leave( KErrArgument );
  1638         User::Leave( KErrArgument );
  1632         }
  1639         }
  1633 
  1640 
  1634     TUint32 temp = ~(
       
  1635             CMManager::ESnapMetadataInternet |
       
  1636             CMManager::ESnapMetadataDestinationIsLocalised |
       
  1637             CMManager::ESnapMetadataPurpose );
       
  1638     if ( aMetadata == CMManager::ENotLocalisedDest )
  1641     if ( aMetadata == CMManager::ENotLocalisedDest )
  1639         {
  1642         {
  1640         // Clear old ESnapMetadataInternet-bit,
  1643         // Clear old ESnapMetadataDestinationIsLocalised-bits.
  1641         // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
  1644         iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ~( CMManager::ESnapMetadataDestinationIsLocalised );
  1642         iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
       
  1643         }
  1645         }
  1644     else
  1646     else
  1645         {
  1647         {
  1646         if ( iCache->DestinationExistsWithMetadataLocalizedL( *this, aMetadata ) )
  1648         if ( iCache->DestinationExistsWithMetadataLocalizedL( *this, aMetadata ) )
  1647             {
  1649             {
  1648             User::Leave( KErrAlreadyExists );
  1650             User::Leave( KErrAlreadyExists );
  1649             }
  1651             }
       
  1652 
       
  1653         TUint32 temp = ~(
       
  1654                 CMManager::ESnapMetadataInternet |
       
  1655                 CMManager::ESnapMetadataDestinationIsLocalised |
       
  1656                 CMManager::ESnapMetadataPurpose );
  1650 
  1657 
  1651         // Clear old ESnapMetadataInternet-bit,
  1658         // Clear old ESnapMetadataInternet-bit,
  1652         // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
  1659         // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
  1653         TUint32 value = iMetadataRecord->iMetadata & temp;
  1660         TUint32 value = iMetadataRecord->iMetadata & temp;
  1654         switch ( aMetadata )
  1661         switch ( aMetadata )