|
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: Main test class declaration for MMS Data Plugin |
|
15 */ |
|
16 |
|
17 #ifndef TESTUNIDATAMODELMMSPLUGIN_H_ |
|
18 #define TESTUNIDATAMODELMMSPLUGIN_H_ |
|
19 |
|
20 #ifdef BUILD_TESTUNIDATAMODELMMSPLUGIN_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 <QDateTime> |
|
33 |
|
34 //Forward Declarations |
|
35 class UniDataModelPluginInterface; |
|
36 class UniDataModelLoader; |
|
37 class TestObserverMMS; |
|
38 class CMmsClientMtm; |
|
39 class ConvergedMessage; |
|
40 class RFs; |
|
41 |
|
42 //Class Declaration |
|
43 class TEST_EXPORT TestUniDataModelMMSPlugin : public QObject |
|
44 { |
|
45 Q_OBJECT |
|
46 |
|
47 private slots: |
|
48 |
|
49 /** |
|
50 * Initialises the whole Test |
|
51 **/ |
|
52 void initTestCase();//called before the first testfunction is executed. |
|
53 |
|
54 /** |
|
55 * Initialises each Test Case |
|
56 **/ |
|
57 void init();//called before each testfunction is executed. |
|
58 |
|
59 /** |
|
60 * Tests that the MMS message is created successfully in the Inbox Folder |
|
61 **/ |
|
62 void testInboxMessage(); |
|
63 |
|
64 /** |
|
65 * Cleans up each Test Case |
|
66 **/ |
|
67 void cleanup();//called after every testfunction. |
|
68 |
|
69 /** |
|
70 * Cleans up the whole Test Case |
|
71 **/ |
|
72 void cleanupTestCase();//called after the last testfunction was executed. |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Creates the MMS message in the Inbox Folder |
|
78 **/ |
|
79 void createMMS(TMsvId pId, TBool subjectField); |
|
80 |
|
81 private: //Data |
|
82 |
|
83 /** |
|
84 * pluginInterface - UniDataMMSPlug-in |
|
85 **/ |
|
86 UniDataModelPluginInterface* pluginInterface; |
|
87 |
|
88 /** |
|
89 * pluginLoader - UniDataPlug-in Loader |
|
90 **/ |
|
91 UniDataModelLoader* pluginLoader; |
|
92 |
|
93 /** |
|
94 * iObserver - Observer pointer For Test Class |
|
95 **/ |
|
96 TestObserverMMS* iObserver; |
|
97 |
|
98 /** |
|
99 * iMSession - Session |
|
100 **/ |
|
101 CMsvSession* iMSession; |
|
102 |
|
103 /** |
|
104 * iMmsClientMtm - MMS Client MTM |
|
105 **/ |
|
106 CMmsClientMtm* iMmsClientMtm; |
|
107 |
|
108 /** |
|
109 * iMessageId - MMS Message ID of the MMS created in the Inbox Folder |
|
110 **/ |
|
111 TMsvId iMessageId; |
|
112 |
|
113 /** |
|
114 * retTimeStamp - Timestamp for the MMS being Created |
|
115 **/ |
|
116 QDateTime retTimeStamp; |
|
117 |
|
118 /** |
|
119 * iFs - File Server |
|
120 **/ |
|
121 RFs iFs; |
|
122 |
|
123 /** |
|
124 * iServiceId - MMS Service Id |
|
125 **/ |
|
126 TMsvId iServiceId; |
|
127 |
|
128 /** |
|
129 * msgSize - Size of the MMS message created in the Inbox Folder |
|
130 **/ |
|
131 TInt msgSize; |
|
132 }; |
|
133 |
|
134 //Observer Class Declaration |
|
135 class TestObserverMMS : public MMsvSessionObserver |
|
136 { |
|
137 public: |
|
138 |
|
139 /** |
|
140 * Handles various outcome Events after the different services like Creation, Sending, etc. of a MMS Message |
|
141 **/ |
|
142 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, |
|
143 TAny* aArg3); |
|
144 }; |
|
145 |
|
146 #endif /* TESTUNIDATAMODELMMSPLUGIN_H_ */ |