clock/tsrc/unittest_clockengines/inc/unittest_clockengines.h
changeset 83 5aadd1120515
equal deleted inserted replaced
82:dcd0ca396fa1 83:5aadd1120515
       
     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 
       
    18 #ifndef UNITTEST_CLOCKENGINES_H
       
    19 #define UNITTEST_CLOCKENGINES_H
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <etelmm.h>
       
    24 
       
    25 // User Includes
       
    26 #include "clockpluginobserver.h"
       
    27 
       
    28 // Forward declarations.
       
    29 class RClkSrvInterface;
       
    30 class CClockTimeSourceInterface;
       
    31 class CClockTimeZoneResolver;
       
    32 
       
    33 /*!
       
    34 	\class TestClockEngines
       
    35 	
       
    36 	This object has functions to test the public apis in the component
       
    37 	Clockengines.
       
    38  */
       
    39 class TestClockEngines: public QObject, MClockPluginObserver
       
    40 {
       
    41 	Q_OBJECT
       
    42 
       
    43 private slots:
       
    44 	// Test case setup.
       
    45 	void init();
       
    46 	void cleanup();
       
    47 	
       
    48 	// Test cases.
       
    49 	void testConnectToServer();
       
    50 	void testActiveProtocol();
       
    51 	void testActivateAllProtocols();
       
    52 	void testIsProtocolActive();
       
    53 	void testGetProtocolInfo();
       
    54 	void testGetCurrentMcc();
       
    55 	void testGetCurrentTimeZoneId();
       
    56 	
       
    57 	void testDeActivateProtocol();
       
    58 	void testDeActivateAllProtocols(); 
       
    59 	
       
    60 	void tesTimeZoneResolverSingleZone1();
       
    61 	void tesTimeZoneResolverSingleZone2();
       
    62 	void tesTimeZoneResolverSingleZone3();
       
    63 	void tesTimeZoneResolverSingleZone4();
       
    64 	void tesTimeZoneResolverSingleZone5();
       
    65 	void tesTimeZoneResolverSingleZone6();
       
    66 	void tesTimeZoneResolverSingleZone7();	
       
    67 	
       
    68 	void tesTimeZoneResolverMultiZone1();
       
    69     void tesTimeZoneResolverMultiZone2();
       
    70     void tesTimeZoneResolverMultiZone3();
       
    71     void tesTimeZoneResolverMultiZone4();
       
    72     void tesTimeZoneResolverMultiZone5();   
       
    73 	
       
    74     void testTimeZoneResolverSingleZoneWrongMCC();
       
    75 	void NotifyTimeChangeL( CClockTimeSourceInterface& plugin  );
       
    76 	void testVersion();
       
    77 	void testCreatePluginInstance();
       
    78 	void testGetNitzData();
       
    79 	void testInvalidPlugin();
       
    80 	void testTimeUpdateOn();
       
    81 	void testTimeUpdateOff();
       
    82 	
       
    83 private:
       
    84 	RClkSrvInterface               *mClockServerCltHandle;
       
    85 	CClockTimeSourceInterface      *mClkTimeUpdaterInterface;
       
    86 	CClockTimeZoneResolver         *mTzResolver;
       
    87 	STimeAttributes                 mTimeInfo;
       
    88 	int                             mTzId;
       
    89 	STimeAttributes                 mNitzInfo;
       
    90 	RMobilePhone::TMobilePhoneNetworkCountryCode   mMCC;
       
    91 	int mError;
       
    92 };
       
    93 
       
    94 #endif // UNITTEST_CLOCKENGINES_H
       
    95 
       
    96 // End of file	--Don't remove this.