messagingapp/msgutils/unidatautils/unidatamodelloader/tsrc/testunidatamodelloader/inc/testunidatamodelloader.h
changeset 70 a15d9966050f
equal deleted inserted replaced
61:8ba0afbb4637 70:a15d9966050f
       
     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     void testMMSMessage();
       
    79     void testSMSMessage();
       
    80   
       
    81     void cleanup();//called after every testfunction.
       
    82     void cleanupTestCase();//called after the last testfunction was executed.
       
    83     
       
    84 private:
       
    85     
       
    86     UniDataModelPluginInterface* pluginInterface;
       
    87     MsgObserver* iObserver;
       
    88     CMsvSession* iMSession;
       
    89     CClientMtmRegistry* iMtmReg;
       
    90     TMsvId messageId;
       
    91     UniDataModelLoader* pluginLoader;
       
    92     QDateTime retTimeStamp;
       
    93     RFs iFs;
       
    94     CMsvEntry* iMsvEntry;
       
    95     CBIODatabase* iBioDb;
       
    96     TMsvId newEntryId;
       
    97     HBufC* tempNumber;
       
    98     TBufC<KMaxFileName> currentFile;
       
    99     TBool inbox;
       
   100     
       
   101 };
       
   102 
       
   103 class MsgObserver : public MMsvSessionObserver
       
   104 {
       
   105 public:
       
   106     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2,
       
   107                              TAny* aArg3);
       
   108 };
       
   109 
       
   110 #endif //TEST_UNI_DATA_MODEL_LOADER_H