730 |
730 |
731 void CVPbkVCardPropertyExporter::AddRevL() |
731 void CVPbkVCardPropertyExporter::AddRevL() |
732 { |
732 { |
733 MVPbkStoreContact* tempContact = const_cast<MVPbkStoreContact*>(iContact); |
733 MVPbkStoreContact* tempContact = const_cast<MVPbkStoreContact*>(iContact); |
734 if( tempContact ) |
734 if( tempContact ) |
735 { |
735 { |
736 MVPbkStoreContact2* tempContact2 = reinterpret_cast<MVPbkStoreContact2*> |
736 MVPbkStoreContact2* tempContact2 = reinterpret_cast<MVPbkStoreContact2*> |
737 (tempContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid) ); |
737 (tempContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid) ); |
738 if(tempContact2) |
738 if(tempContact2) |
739 { |
739 { |
740 MVPbkStoreContactProperties* propreties = tempContact2->PropertiesL(); |
740 MVPbkStoreContactProperties* propreties = tempContact2->PropertiesL(); |
741 CleanupDeletePushL(propreties); |
741 if( propreties ) |
742 |
742 { |
743 // Convert the last_modified field defined in Contact Model database |
743 CleanupDeletePushL(propreties); |
744 // to REV (Revision) field in vCard Specification 2.1 |
744 |
745 CParserPropertyValueDateTime* valueDateTime = |
745 // Convert the last_modified field defined in Contact Model database |
746 CreateDateTimePropertyL( |
746 // to REV (Revision) field in vCard Specification 2.1 |
747 propreties->LastModifiedL(), |
747 CParserPropertyValueDateTime* valueDateTime = |
748 TVersitDateTime::EIsUTC ); |
748 CreateDateTimePropertyL( |
749 CleanupStack::PopAndDestroy(propreties); |
749 propreties->LastModifiedL(), |
750 |
750 TVersitDateTime::EIsUTC ); |
751 CleanupStack::PushL(valueDateTime); |
751 CleanupStack::PopAndDestroy(propreties); |
752 CParserProperty* property = |
752 |
753 CParserGroupedProperty::NewL(*valueDateTime, KREV, NULL, NULL); |
753 CleanupStack::PushL(valueDateTime); |
754 |
754 CParserProperty* property = |
755 CleanupStack::PushL( property ); |
755 CParserGroupedProperty::NewL(*valueDateTime, KREV, NULL, NULL); |
756 iParser->AddPropertyL(property); //takes ownership |
756 |
757 CleanupStack::Pop(2);//valueDateTime and property |
757 CleanupStack::PushL( property ); |
|
758 iParser->AddPropertyL(property); //takes ownership |
|
759 CleanupStack::Pop(2);//valueDateTime and property |
|
760 } |
758 } |
761 } |
759 } |
762 } |
760 } |
763 } |
761 |
764 |
762 CParserPropertyValueDateTime* CVPbkVCardPropertyExporter::CreateDateTimePropertyL |
765 CParserPropertyValueDateTime* CVPbkVCardPropertyExporter::CreateDateTimePropertyL |