41
|
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_VCAL_PLUGIN_H
|
|
18 |
#define TEST_UNI_DATA_MODEL_VCAL_PLUGIN_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 |
|
|
50 |
typedef enum
|
|
51 |
{ // GENERATE A MESSAGE USING....
|
|
52 |
ENoMessage, // .. error cases
|
|
53 |
EBioIapSettingsMessage, // .. IAP grammar, includes Internet settings
|
|
54 |
// Email settings, and logon scripts,
|
|
55 |
EBioEnpMessage, // .. Email Notification grammar.
|
|
56 |
EBioRingTonesMessage, // .. Ringing Tones binary data
|
|
57 |
EBioOpLogoMessage, // .. Logo for Operator service
|
|
58 |
EBioCompBusCardMessage, // .. Compact Business Card data
|
|
59 |
EBiovCardMessage, // .. virtual business card data
|
|
60 |
EBiovCalenderMessage, // .. vCalender data
|
|
61 |
EBioWAPSettingsMessage, // .. wap settings
|
|
62 |
EBioWPRVSettingsMessage // .. wprv settings
|
|
63 |
} TBIOMessageType;
|
|
64 |
|
|
65 |
|
|
66 |
class TEST_EXPORT TestUniDataModelVCalPlugin : public QObject
|
|
67 |
{
|
|
68 |
Q_OBJECT
|
|
69 |
|
|
70 |
private slots:
|
|
71 |
//called by frame work.
|
|
72 |
void initTestCase();//called before the first testfunction is executed.
|
|
73 |
void init();//called before each testfunction is executed.
|
|
74 |
|
|
75 |
//test cases.
|
|
76 |
void testInBoxVCalMessage();
|
|
77 |
void testDraftsVCalMessage();
|
|
78 |
void testUnusedAPIs();
|
|
79 |
void cleanup();//called after every testfunction.
|
|
80 |
void cleanupTestCase();//called after the last testfunction was executed.
|
|
81 |
|
|
82 |
private:
|
|
83 |
|
|
84 |
TMsvId CreateBIOEntryL(TDesC& aText, TBIOMessageType aMessageType);
|
|
85 |
void CreateBioEntryClientSideL(TMsvEntry& aEntry, CRichText& aBody);
|
|
86 |
HBufC* ReadFromFileL(const TDesC& aFile);
|
|
87 |
void SetSessionPath(const TDesC& aSessionPath);
|
|
88 |
TMsvId CreateBIOEntryFromFileL(const TDesC& aFilename,
|
|
89 |
TBIOMessageType aMessageType);
|
|
90 |
TBIOMessageType SetMessageType(const TDesC& aFileName);
|
|
91 |
CMsvEntrySelection* GenerateMessagesL();
|
|
92 |
TMsvId SetBIOServiceIdL();
|
|
93 |
void SetForMtmTypeL(TMsvEntry& aEntry, TBIOMessageType aType);
|
|
94 |
|
|
95 |
private:
|
|
96 |
|
|
97 |
UniDataModelPluginInterface* pluginInterface;
|
|
98 |
MsgObserver* iObserver;
|
|
99 |
CMsvSession* iMSession;
|
|
100 |
CClientMtmRegistry* iMtmReg;
|
|
101 |
TMsvId messageId;
|
|
102 |
UniDataModelLoader* pluginLoader;
|
|
103 |
QDateTime retTimeStamp;
|
|
104 |
RFs iFs;
|
|
105 |
CDir* iDir;
|
|
106 |
TInt iFilesProcessed;
|
|
107 |
CMsvEntry* iMsvEntry;
|
|
108 |
CBIODatabase* iBioDb;
|
|
109 |
TMsvId newEntryId;
|
|
110 |
HBufC* tempNumber;
|
|
111 |
TBufC<KMaxFileName> currentFile;
|
|
112 |
TBool inbox;
|
|
113 |
TBool drafts;
|
|
114 |
};
|
|
115 |
|
|
116 |
class MsgObserver : public MMsvSessionObserver
|
|
117 |
{
|
|
118 |
public:
|
|
119 |
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2,
|
|
120 |
TAny* aArg3);
|
|
121 |
};
|
|
122 |
|
|
123 |
#endif //TEST_UNI_DATA_MODEL_VCAL_PLUGIN_H
|