photosgallery/slideshow/engine/tsrc/t_cshwplaybackfactory/t_cshwplaybackfactory.h
branchRCL_3
changeset 24 ea65f74e6de4
parent 23 b023a8d2866a
child 25 8e5f6eea9c9f
equal deleted inserted replaced
23:b023a8d2866a 24:ea65f74e6de4
     1 /*
       
     2 * Copyright (c) 2007-2007 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:    Test suite for CShwPlaybackFactory
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __T_CSHWPLAYBACKFACTORY_H__
       
    22 #define __T_CSHWPLAYBACKFACTORY_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/CEUnitTestSuiteClass.h>
       
    26 #include <digia/eunit/EUnitDecorators.h>
       
    27 
       
    28 
       
    29 //  INTERNAL INCLUDES
       
    30 #include "shwplaybackfactory.h"
       
    31 #include "shwmusicobserver.h"
       
    32 
       
    33 #include "tmglxmedialist_stub.h"
       
    34 #include "tmglxvisuallist_adapter.h"
       
    35 
       
    36 //  FORWARD DECLARATIONS
       
    37 class CHuiEnv;
       
    38 
       
    39 //  CLASS DEFINITION
       
    40 /**
       
    41  * EUnit test suite for CShwPlaybackFactory
       
    42  */
       
    43 NONSHARABLE_CLASS( T_CShwPlaybackFactory )
       
    44 	: public CEUnitTestSuiteClass,
       
    45 	public MGlxMediaList_Stub_Observer,
       
    46 	public MGlxVisualList_Observer,
       
    47 	public MShwMusicObserver
       
    48 	{
       
    49 	public:     // Constructors and destructors
       
    50 
       
    51 		/**
       
    52 		 * Two phase construction
       
    53 		 */
       
    54 		static T_CShwPlaybackFactory* NewL();
       
    55 		static T_CShwPlaybackFactory* NewLC();
       
    56 		/**
       
    57 		 * Destructor
       
    58 		 */
       
    59 		~T_CShwPlaybackFactory();
       
    60 
       
    61 	private:    // Constructors and destructors
       
    62 
       
    63 		T_CShwPlaybackFactory();
       
    64 		void ConstructL();
       
    65 
       
    66 	public:     // from MGlxMediaList_Stub_Observer and MGlxVisualList_Observer
       
    67 	
       
    68 		void MGlxMediaList_MethodCalled( TMGlxMediaListMethodId /*aMethodId*/ )
       
    69 			{ // not interested on the events
       
    70 			}
       
    71 		void MGlxVisualList_MethodCalled( TMGlxVisualListMethodId /*aMethodId*/ )
       
    72 			{ // not interested on the events
       
    73 			}
       
    74 
       
    75 	public:	// From MShwMusicObserver
       
    76 
       
    77 		void MusicOnL()
       
    78 			{ // not interested on the events
       
    79 			}
       
    80 		void MusicOff()
       
    81 			{ // not interested on the events
       
    82 			}
       
    83 		void MusicVolume( TInt /*aCurrentVolume*/, TInt /*aMaxVolume*/ )
       
    84 			{ // not interested on the events
       
    85 			}
       
    86 		void ErrorWithTrackL( TInt /*aErrorCode*/ )
       
    87 			{ // not interested on the events
       
    88 			}
       
    89 
       
    90 	private:    // New methods
       
    91 
       
    92 		void Empty();
       
    93 		void SetupL();
       
    94 		void Teardown();
       
    95 		void T_ContructL();
       
    96 		void T_ContructValidEffectL();
       
    97 		void T_EventObserversL();
       
    98 		void T_EventPublishersL();
       
    99 
       
   100 	private:    // Data
       
   101 		
       
   102 		CHuiEnv* iHuiEnv;
       
   103 		TMGlxMediaList_Stub* iStubMedialist;
       
   104 		TMGlxVisualList_Adapter* iStubVisuallist;
       
   105 
       
   106 		// class under test
       
   107 		CShwPlaybackFactory* iCShwPlaybackFactory;
       
   108 		EUNIT_DECLARE_TEST_TABLE; 
       
   109 
       
   110 	};
       
   111 
       
   112 #endif      //  __T_CSHWPLAYBACKFACTORY_H__
       
   113 
       
   114 // End of file