|
1 /** |
|
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __ADD_MODIFY_DELETE_CONTACTS__ |
|
21 #define __ADD_MODIFY_DELETE_CONTACTS__ |
|
22 |
|
23 // System Includes |
|
24 #include <test/testexecutestepbase.h> |
|
25 #include <cntdb.h> |
|
26 #include <cntitem.h> |
|
27 #include <cntviewbase.h> |
|
28 #include <cntfldst.h> |
|
29 #include <cntfilt.h> |
|
30 #include <e32math.h> |
|
31 |
|
32 // User Includes |
|
33 #include "ClientServer.h" |
|
34 |
|
35 /** |
|
36 * This class supports |
|
37 * 1) Determination of desired contact field Uids |
|
38 * 2) Adding contact item fields with random alpha, numeric or alpha numeric content |
|
39 * 3) Addition of contact item fields which meet the desired contact view filter criteria |
|
40 */ |
|
41 class TAddModifyDeleteContactFields |
|
42 { |
|
43 public: |
|
44 TStorageType GetStorageType(const TFieldType& aFieldType); |
|
45 void SetDataL(const TFieldType& aFieldType, CContactItemField& aField); |
|
46 void UpdateFieldsL(CContactItem& aContact); |
|
47 TUid GetContactFieldType(const TPtrC& aContactFieldString); |
|
48 void AddFieldsSpecificToFilterL(CContactItem& aContact); |
|
49 void AddFilterBasedFieldsL(CContactItem& aContact, TInt aBitWiseFilter); |
|
50 void SetWorkPhoneL(CContactItem& aContact, const TDesC& aWorkPhone); |
|
51 void SetWorkMobileL(CContactItem& aContact, const TDesC& aWorkMobile); |
|
52 void SetHomePhoneL(CContactItem& aContact, const TDesC& aHomePhone); |
|
53 void SetHomeMobileL(CContactItem& aContact, const TDesC& aHomeMobile); |
|
54 void SetHomeEmailAddressL(CContactItem& aContact, const TDesC& aEmailAddress); |
|
55 void SetWorkEmailAddressL(CContactItem& aContact, const TDesC& aEmailAddress); |
|
56 void SetFaxL(CContactItem& aContact, const TDesC& aFax); |
|
57 void SetIMAddressL(CContactItem& aContact, const TDesC& aIMAddress); |
|
58 void SetVoiceDialL(CContactItem& aContact, const TDesC& aVoiceDial); |
|
59 void SetRingToneL(CContactItem& aContact, const TDesC& aRingTone); |
|
60 void SetTextFieldL(CContactItem& aContact, const CContentType& aTypesToMatch, const TDesC& aText); |
|
61 void SetRandomAlphaString(TDes& aBuf,TInt aLength); |
|
62 void SetRandomNumericString(TDes& aBuf,TInt aLength); |
|
63 void SetRandomAlphaNumericString(TDes& aBuf,TInt aLength); |
|
64 TText RandomAlphaCharCode(); |
|
65 TText RandomNumericCharCode(); |
|
66 TText RandomAlphaNumbericCharCode(); |
|
67 TText RandomCharCode(TText aLowerBound,TText aUpperBound,TText aException); |
|
68 TText RandomCharCode(TText aLowerBound,TText aUpperBound); |
|
69 |
|
70 private: |
|
71 TInt64 iRandSeed; |
|
72 }; |
|
73 |
|
74 #endif |
|
75 |
|
76 |
|
77 |