phonebookengines/contactsmodel/tsrc/TTVCARD.CPP
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookengines/contactsmodel/tsrc/TTVCARD.CPP	Wed Sep 01 12:29:52 2010 +0100
@@ -0,0 +1,135 @@
+// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+ 
+#if !defined(__T_TTVERS_H__)
+    #include "T_TTVERS.H"
+#endif
+
+void CVCardTest::GetSampleVersitL()
+	{
+
+	iParser=CParserVCard::NewL();
+	iVersit.Zero();
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("BEGIN:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("UID:AAA"));
+	iVersit.Append(KVersitTokenCRLF);
+	
+	iVersit.Append(_L8("VERSION:2.1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("N;QUOTED-PRINTABLE;X-EPOCCNTMODELLABEL0=FamilyName;X-EPOCCNTMODELLABEL1=GivenName;X-EPOCCNTMODELLABEL2=OtherName:ManyPhones;given;additional;Mr."));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME;X-EPOCCNTMODELFIELDLABEL=ANewLabel:Oldhome1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME:Oldhome2"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME:Oldhome3"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK:Oldwork1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK:Oldwork2"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK:Oldwork3"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK:Oldwork4"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ADR:Cleopatra"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ORG:To be deleted"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("END:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	}
+
+void CVCardTest::GetSampleVersit2L()
+	{
+	iParser=CParserVCard::NewL();
+	iVersit.Zero();
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("BEGIN:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("VERSION:2.1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("UID:AAA"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ADR:A new house"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME;3:Newhome3"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME;1;X-EPOCCNTMODELFIELDLABEL=ANewModLabel:Newhome1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME;2: newhome2"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK;4:Newwork4"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK;2:Newwork2"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK;1:Newwork1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK;3:Newwork3"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ORG:"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("END:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	}
+
+void CVCardTest::GetSampleVersit3L()
+	{
+	iParser=CParserVCard::NewL();
+	iVersit.Zero();
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("BEGIN:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("VERSION:2.1"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("UID:BBB"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("REV:20040121T105018Z"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("N:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ADR;WORK:;;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ADR;HOME:;;;;;;"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;WORK;VOICE:11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;HOME;VOICE:11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;CELL;VOICE:11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;PAGER:11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TEL;FAX;WORK:11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("EMAIL;INTERNET:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("TITLE:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ORG:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("NOTE:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("URL:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("ROLE:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("FN:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"));
+	iVersit.Append(KVersitTokenCRLF);
+	iVersit.Append(_L8("END:VCARD"));
+	iVersit.Append(KVersitTokenCRLF);
+	}