|
1 /* |
|
2 * Copyright (c) 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 #ifndef TEST_UNI_DATA_MODEL_LOADER_H |
|
18 #define TEST_UNI_DATA_MODEL_LOADER_H |
|
19 |
|
20 #ifdef BUILD_TEST_DLL |
|
21 #define TEST_EXPORT Q_DECL_EXPORT |
|
22 #else |
|
23 #define TEST_EXPORT Q_DECL_IMPORT |
|
24 #endif |
|
25 |
|
26 #include <QObject> |
|
27 #include <txtetext.h> |
|
28 #include <txtrich.h> |
|
29 #include <mtclreg.h> |
|
30 #include <mtclbase.h> |
|
31 #include <msvids.h> |
|
32 #include <smsclnt.h> |
|
33 #include <smuthdr.h> |
|
34 #include <QDateTime> |
|
35 #include <e32math.h> |
|
36 |
|
37 |
|
38 #include <bsp.h> |
|
39 |
|
40 const TInt32 KUidBIOVCalenderMsg = {0x10005533}; // VCalender diary |
|
41 |
|
42 class UniDataModelPluginInterface; |
|
43 class UniDataModelLoader; |
|
44 class MsgObserver; |
|
45 class S60QConversions; |
|
46 class ConvergedMessage; |
|
47 class CBIODatabase; |
|
48 class ConvergedMessgageAddress; |
|
49 class UniEditorPluginInterface; |
|
50 |
|
51 typedef enum |
|
52 { // GENERATE A MESSAGE USING.... |
|
53 ENoMessage, // .. error cases |
|
54 EBioIapSettingsMessage, // .. IAP grammar, includes Internet settings |
|
55 // Email settings, and logon scripts, |
|
56 EBioEnpMessage, // .. Email Notification grammar. |
|
57 EBioRingTonesMessage, // .. Ringing Tones binary data |
|
58 EBioOpLogoMessage, // .. Logo for Operator service |
|
59 EBioCompBusCardMessage, // .. Compact Business Card data |
|
60 EBiovCardMessage, // .. virtual business card data |
|
61 EBiovCalenderMessage, // .. vCalender data |
|
62 EBioWAPSettingsMessage, // .. wap settings |
|
63 EBioWPRVSettingsMessage // .. wprv settings |
|
64 } TBIOMessageType; |
|
65 |
|
66 |
|
67 class TEST_EXPORT TestUniDataModelLoader: public QObject |
|
68 { |
|
69 Q_OBJECT |
|
70 |
|
71 private slots: |
|
72 //called by frame work. |
|
73 void initTestCase();//called before the first testfunction is executed. |
|
74 void init();//called before each testfunction is executed. |
|
75 |
|
76 //test cases. |
|
77 void testBioMessage(); |
|
78 |
|
79 void testMMSMessage(); |
|
80 void testSMSMessage(); |
|
81 |
|
82 void cleanup();//called after every testfunction. |
|
83 void cleanupTestCase();//called after the last testfunction was executed. |
|
84 |
|
85 private: |
|
86 |
|
87 UniDataModelPluginInterface* pluginInterface; |
|
88 MsgObserver* iObserver; |
|
89 CMsvSession* iMSession; |
|
90 CClientMtmRegistry* iMtmReg; |
|
91 TMsvId messageId; |
|
92 UniDataModelLoader* pluginLoader; |
|
93 QDateTime retTimeStamp; |
|
94 RFs iFs; |
|
95 CMsvEntry* iMsvEntry; |
|
96 CBIODatabase* iBioDb; |
|
97 TMsvId newEntryId; |
|
98 HBufC* tempNumber; |
|
99 TBufC<KMaxFileName> currentFile; |
|
100 TBool inbox; |
|
101 |
|
102 }; |
|
103 |
|
104 class MsgObserver : public MMsvSessionObserver |
|
105 { |
|
106 public: |
|
107 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, |
|
108 TAny* aArg3); |
|
109 }; |
|
110 |
|
111 #endif //TEST_UNI_DATA_MODEL_LOADER_H |