|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __TE_PHBK_TESTSTEP_BASE__ |
|
17 #define __TE_PHBK_TESTSTEP_BASE__ |
|
18 |
|
19 #include <test/testexecutestepbase.h> |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <etel.h> |
|
23 #include <etelmm.h> |
|
24 #include <e32test.h> |
|
25 #include <e32keys.h> |
|
26 #include <c32comm.h> |
|
27 #include <f32file.h> |
|
28 #include <mmretrieve.h> |
|
29 #include <mpbutil.h> |
|
30 |
|
31 _LIT(KMmtsyName,"MM"); |
|
32 _LIT(KPhoneName,"GsmPhone1"); |
|
33 |
|
34 const TInt KPBDataClientBuf=800; // this buffer should be able to fit approx 50 entires |
|
35 const TInt KPBDataClientSmallBuf=45; // this buffer should be able to fit approx 3 entires |
|
36 const TInt KPPBEntriesNum=7; |
|
37 const TInt KBufSize=30; |
|
38 |
|
39 const TUint8 KTypeOfNumber=0x81; |
|
40 |
|
41 _LIT16(KSymbolText,"(:,)=(),"); |
|
42 _LIT16(KAnnText,"Ann"); |
|
43 _LIT16(KMattSText,"MattS"); |
|
44 _LIT16(KAndyText,"Andy Cloke"); // has an OK in it! |
|
45 _LIT16(KMattMText,"MattM"); |
|
46 _LIT16(KPaulText,"Paul"); |
|
47 _LIT16(KMumAndDadText,"Mum and Dad"); |
|
48 _LIT16(KTextTooLong,"ABCDEFGHIJKLMNOPQRSTUVWXYZABCD"); |
|
49 _LIT16(KHenrikText,"Henrik"); |
|
50 _LIT16(KHenrikSVText,"HenrikSV"); |
|
51 _LIT16(KMikaelText,"Mikael"); |
|
52 _LIT16(KIngeText,"Inge"); |
|
53 _LIT16(KPatrickText,"Patrick"); |
|
54 _LIT16(KPontusText,"Pontus"); |
|
55 _LIT16(KAndersText,"Anders"); |
|
56 _LIT16(KHajText,"Haj"); |
|
57 |
|
58 _LIT16(KSymbolPhoneNum,"01632960000"); |
|
59 _LIT16(KAnnPhoneNum,"01632960000"); |
|
60 _LIT16(KMattSPhoneNum,"01632960000"); |
|
61 _LIT16(KAndyPhoneNum,"01632960000"); |
|
62 _LIT16(KMattMPhoneNum,"01632960000"); |
|
63 _LIT16(KPaulPhoneNum,"01632960000"); |
|
64 _LIT16(KMumAndDadPhoneNum,"01632960000"); |
|
65 _LIT16(KNumberTooLong,"0171123456789012345678901234567331111114011111111150111111116011111111701111111180111");// needs to be over 80 since the Ericsson 320 can take that many digits |
|
66 _LIT16(KHenrikPhoneNum,"1712081801"); |
|
67 _LIT16(KHenrikSVPhoneNum,"1712081802"); |
|
68 _LIT16(KMikaelPhoneNum,"1712081803"); |
|
69 _LIT16(KIngePhoneNum,"1712081804"); |
|
70 _LIT16(KPatrickPhoneNum,"1712081805"); |
|
71 _LIT16(KPontusPhoneNum,"1712081806"); |
|
72 _LIT16(KAndersPhoneNum,"1712081807"); |
|
73 _LIT16(KHajPhoneNum,"1712081808"); |
|
74 |
|
75 _LIT16(KSearch1,"Ann"); |
|
76 _LIT16(KSearch2,"Matt"); // Used in a search, phone book contains 'MattS' and 'MattM' |
|
77 _LIT16(KSearch3,"Unknown"); |
|
78 _LIT16(KSearch4,"Mum"); |
|
79 |
|
80 const TUint KAddressType=129; |
|
81 |
|
82 class CPhBkTestStep : public CTestStep |
|
83 { |
|
84 public: |
|
85 virtual TVerdict doTestStepPreambleL(); |
|
86 virtual TVerdict doTestStepPostambleL(); |
|
87 |
|
88 protected: |
|
89 void WaitWithTimeout(TRequestStatus& aStatus, TInt aNumberOfMicroSeconds) ; |
|
90 TInt clearPhoneBookL(const TDesC& aPhoneBookName) ; |
|
91 void checkPhoneBookInfoL(RMobilePhoneStore::TMobilePhoneStoreInfoV1& aInfo) ; |
|
92 void WriteBatchOfEntriesToThePhoneL() ; |
|
93 TInt CheckPhoneStoreInfo(RMobilePhone& aPhone, const TDesC& aPhoneStoreName, |
|
94 const TDesC& aMode, |
|
95 const TDesC& aPhoneStoreDescription); |
|
96 |
|
97 protected: |
|
98 RTelServer iTelServer; |
|
99 RMobilePhone iPhone; |
|
100 TRequestStatus iStatus; |
|
101 RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iDummyInfo; |
|
102 TBool iMESupported; |
|
103 TBool iMTSupported; |
|
104 }; |
|
105 |
|
106 #endif // __TE_PHBK_TESTSTEP_BASE__ |