1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 /* |
2 // All rights reserved. |
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 // This component and the accompanying materials are made available |
3 * All rights reserved. |
4 // under the terms of "Eclipse Public License v1.0" |
4 * This component and the accompanying materials are made available |
5 // which accompanies this distribution, and is available |
5 * under the terms of "Eclipse Public License v1.0" |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 * which accompanies this distribution, and is available |
7 // |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 // Initial Contributors: |
8 * |
9 // Nokia Corporation - initial contribution. |
9 * Initial Contributors: |
10 // |
10 * Nokia Corporation - initial contribution. |
11 // Contributors: |
11 * |
12 // |
12 * Contributors: |
13 // Description: |
13 * |
14 // Packaging Test module |
14 * Description: |
15 // |
15 * Packaging Test module |
16 // |
16 * |
|
17 */ |
|
18 |
17 |
19 |
18 |
20 |
19 #include <e32test.h> |
21 #include <e32test.h> |
20 #include <coreappstest/testserver.h> |
22 #include <coreappstest/testserver.h> |
21 |
23 |
22 _LIT(KTestName, "T_Packager"); // Used by Testhelper |
24 _LIT(KTestName, "T_Packager"); // Used by Testhelper |
23 |
25 |
24 #include <cntfldst.h> |
26 #include <cntfldst.h> |
25 #include "testhelpers.h" |
27 #include "testhelpers.h" |
26 //#include "T_CntTest.h" |
28 //#include "t_cnttest.h" |
27 |
29 |
28 #include "NbCntTestLib/NbCntTestLib.h" |
30 #include "nbcnttestlib/nbcnttestlib.h" |
29 |
31 |
30 #include "T_Packager.h" |
32 #include "t_packager.h" |
31 #include "T_CntTestImplDefs.h" |
33 #include "t_cnttestimpldefs.h" |
32 #include "CCntPackager.h" |
34 #include "ccntpackager.h" |
33 #include <cntfilt.h> |
35 #include <cntfilt.h> |
34 |
36 |
35 |
37 |
36 |
38 |
37 //#define RUN_CNT |
39 //#define RUN_CNT |
38 #define RUN_PL |
40 #define RUN_PL |
39 |
41 |
40 // |
42 //////////////////////////////////////////////////////////////////// |
41 // This test used to spit out a lot of html files which display |
43 // This test used to spit out a lot of html files which display |
42 // the contents of contact items. There are a lot of files |
44 // the contents of contact items. There are a lot of files |
43 // generated in the process which, as this is normally run on the |
45 // generated in the process which, as this is normally run on the |
44 // overnight build, are not read and just take up disk space. |
46 // overnight build, are not read and just take up disk space. |
45 // Therefore, the call to the contact dumping method has been |
47 // Therefore, the call to the contact dumping method has been |
46 // configured out by #ifdefs and needs to be manually re-activated. |
48 // configured out by #ifdefs and needs to be manually re-activated. |
47 // |
49 // |
48 // So, uncomment the following line to turn on contact dumping. |
50 // So, uncomment the following line to turn on contact dumping. |
49 //#define __T_PACKAGER_DUMP_CONTACT__ |
51 //#define __T_PACKAGER_DUMP_CONTACT__ |
50 // |
52 //////////////////////////////////////////////////////////////////// |
51 |
53 |
52 |
54 |
53 #define KUidContactFieldCustom1Value 0x101FD209 |
55 #define KUidContactFieldCustom1Value 0x101FD209 |
54 #define KUidContactFieldCustom2Value 0x101FD20A |
56 #define KUidContactFieldCustom2Value 0x101FD20A |
55 const TUid KUidContactFieldCustom1={KUidContactFieldCustom1Value}; |
57 const TUid KUidContactFieldCustom1={KUidContactFieldCustom1Value}; |
93 #endif |
95 #endif |
94 |
96 |
95 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
97 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
96 TCnt theCnt(card); |
98 TCnt theCnt(card); |
97 |
99 |
98 theCnt[KUidContactFieldGivenName] = _L("AExample"); |
100 theCnt[KUidContactFieldGivenName] = _L("David"); |
99 theCnt[KUidContactFieldFamilyName] = _L("BExample"); |
101 theCnt[KUidContactFieldFamilyName] = _L("Coulthard"); |
100 |
102 |
101 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
103 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
102 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
104 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
103 |
105 |
104 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
106 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
105 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
107 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
106 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
108 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
107 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
109 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
108 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
110 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
109 |
111 |
110 theCnt[KUidContactFieldCompanyName] = _L("SymbianFoundation"); |
112 theCnt[KUidContactFieldCompanyName] = _L("McLaren"); |
111 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
113 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
112 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
114 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
113 |
115 |
114 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
116 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
115 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |
117 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |
224 |
226 |
225 |
227 |
226 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
228 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
227 TCnt theCnt(card); |
229 TCnt theCnt(card); |
228 |
230 |
229 theCnt[KUidContactFieldGivenName] = _L("AExample"); |
231 theCnt[KUidContactFieldGivenName] = _L("David"); |
230 theCnt[KUidContactFieldFamilyName] = _L("BExample"); |
232 theCnt[KUidContactFieldFamilyName] = _L("Coulthard"); |
231 |
233 |
232 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
234 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
233 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
235 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
234 |
236 |
235 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
237 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
236 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
238 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
237 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
239 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
238 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
240 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
239 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
241 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
240 |
242 |
241 theCnt[KUidContactFieldCompanyName] = _L("SymbianFoundation"); |
243 theCnt[KUidContactFieldCompanyName] = _L("McLaren"); |
242 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
244 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
243 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
245 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
244 |
246 |
245 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
247 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
246 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |
248 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |
911 #endif |
913 #endif |
912 |
914 |
913 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
915 CContactItem* card = CContactCard::NewLC(&goldenTemplate); |
914 TCnt theCnt(card); |
916 TCnt theCnt(card); |
915 |
917 |
916 theCnt[KUidContactFieldGivenName] = _L("AExample"); |
918 theCnt[KUidContactFieldGivenName] = _L("David"); |
917 theCnt[KUidContactFieldFamilyName] = _L("BExample"); |
919 theCnt[KUidContactFieldFamilyName] = _L("Coulthard"); |
918 |
920 |
919 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
921 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell = _L("mo1 39849342"); |
920 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
922 theCnt[KUidContactFieldPhoneNumber] & KHome & KVoice & KCell += _L("mo2 34530903495803948503984545"); |
921 |
923 |
922 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
924 theCnt[KUidContactFieldEMail] & KHome = _L("home@email"); |
923 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
925 theCnt[KUidContactFieldAddress] & KHome = _L("Home addresssssss"); |
924 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
926 theCnt[KUidContactFieldLocality] & KHome = _L("Glazgo"); |
925 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
927 theCnt[KUidContactFieldIMAddress] & KHome & KWv = _L("wireless@village"); |
926 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
928 theCnt[KUidContactFieldSecondName] = _L("Second name"); |
927 |
929 |
928 theCnt[KUidContactFieldCompanyName] = _L("SymbianFoundation"); |
930 theCnt[KUidContactFieldCompanyName] = _L("McLaren"); |
929 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
931 theCnt[KUidContactFieldJobTitle] = _L("Driver"); |
930 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
932 theCnt[KUidContactFieldPhoneNumber] & KWork & KVoice = _L("work Tel 2342"); |
931 |
933 |
932 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
934 theCnt[KUidContactFieldEMail] & KWork = _L("work@email"); |
933 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |
935 theCnt[KUidContactFieldUrl] & KWork = _L("sdfsd"); |