messagingapp/msgutils/unidatamodel/unimmsdataplugin/tsrc/testunidatamodelmmsplugin/testunidatamodelmmsplugin.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     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 TESTUNIDATAMODELMMSPLUGIN_H_
       
    18 #define TESTUNIDATAMODELMMSPLUGIN_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 <QDateTime>
       
    33 
       
    34 class UniDataModelPluginInterface;
       
    35 class UniDataModelLoader;
       
    36 class TestObserverMMS;
       
    37 class CMmsClientMtm;
       
    38 class CMmsHeaders;
       
    39 class CMmsSettings;
       
    40 
       
    41 class ConvergedMessage;
       
    42 class RFs;
       
    43 
       
    44 class TEST_EXPORT TestUniDataModelMMSPlugin : public QObject
       
    45 {
       
    46 Q_OBJECT
       
    47 
       
    48 private slots:
       
    49     //called by frame work.
       
    50     void initTestCase();//called before the first testfunction is executed.
       
    51     void cleanupTestCase();//called after the last testfunction was executed.
       
    52     void init();//called before each testfunction is executed.
       
    53     void cleanup();//called after every testfunction.
       
    54     
       
    55     void testInboxMessage();
       
    56     void testPluginLoading(); 
       
    57     void testGetPluginWithoutLoading();
       
    58     void testPluginLoadingMultipleTimes();
       
    59 	void testOutboxMessage();
       
    60     void testInboxImageMMSMessage();
       
    61 //    void testUnusedAPIs();
       
    62     
       
    63 private:
       
    64     void createMMS(TMsvId pId, TBool subjectField);
       
    65     void createInboxImageMMS();
       
    66     
       
    67 private:
       
    68     UniDataModelPluginInterface* pluginInterface;
       
    69     TestObserverMMS* iObserver;
       
    70     CMsvSession* iMSession;
       
    71     CClientMtmRegistry* iMtmReg;
       
    72     CMmsClientMtm* iMmsClientMtm;
       
    73     TMsvId iMessageId;
       
    74     RArray<TMsvId> idArr;
       
    75     UniDataModelLoader* pluginLoader;
       
    76     QDateTime retTimeStamp ;
       
    77     RFs iFs;
       
    78     CMmsSettings* iSettings;
       
    79     CMmsHeaders* iMmsHeaders;
       
    80     TMsvId iServiceId;
       
    81     TInt msgSize;
       
    82 };
       
    83 
       
    84 class TestObserverMMS : public MMsvSessionObserver
       
    85 {
       
    86 public:
       
    87     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2,
       
    88                              TAny* aArg3);
       
    89 };
       
    90 
       
    91 #endif /* TESTUNIDATAMODELMMSPLUGIN_H_ */