photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.h
changeset 0 4e91876724a2
child 30 a60acebbbd9d
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   The slideshow engine API
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CSHWSLIDESHOWENGINEIMPL_H__
       
    22 #define __CSHWSLIDESHOWENGINEIMPL_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 #include "shwslideshowengine.h"
       
    29 #include "shweventobserver.h"
       
    30 #include "shweventpublisherbase.h"
       
    31 #include <alf/alfbrush.h>
       
    32 #include <alf/alfdisplay.h>
       
    33 // FORWARD DECLARATIONS
       
    34 class MGlxMediaList;
       
    35 class CGlxThumbnailContext;
       
    36 class CGlxVisualListManager;
       
    37 class MGlxVisualList;
       
    38 class CShwPlaybackFactory;
       
    39 class CShwEventRouter;
       
    40 
       
    41 class CAlfEnv;
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45  * CCShwSlideshowEngineImpl
       
    46  * 
       
    47  * @author Kimmo Hoikka
       
    48  * @lib shwslideshowengine.lib
       
    49  * @internal reviewed 07/06/2007 by Loughlin
       
    50  */
       
    51 NONSHARABLE_CLASS( CShwSlideshowEngineImpl )
       
    52 	: public CShwEventPublisherBase,
       
    53 	public MShwEventObserver
       
    54 	{
       
    55 	public: // Constructors and destructor
       
    56 
       
    57 		/**
       
    58 		 * Constructor
       
    59 		 * @param aObserver, observer of the engine.
       
    60 		 */
       
    61 		static CShwSlideshowEngineImpl* NewL( MShwEngineObserver& aObserver );
       
    62 
       
    63 		/**
       
    64 		 * Destructor.
       
    65 		 */
       
    66 		~CShwSlideshowEngineImpl();
       
    67 
       
    68 	private:
       
    69 		
       
    70 		/**
       
    71 		 * Constructor for performing 1st stage construction
       
    72 		 * @param aObserver, observer of the engine.
       
    73 		 */
       
    74 		CShwSlideshowEngineImpl( MShwEngineObserver& aObserver );
       
    75 
       
    76 		/**
       
    77 		 * 2nd stage construction
       
    78 		 */
       
    79 		void ConstructL();
       
    80 			
       
    81 	public: // the API
       
    82 
       
    83 		/// @ref CShwSlideshowEngine::StartL
       
    84 		void StartL(
       
    85 			CAlfEnv& aEnv, 
       
    86 			CAlfDisplay& aDisplay, 
       
    87 			MGlxMediaList& aItemsToShow,
       
    88 			MShwMusicObserver& aMusicObserver,
       
    89 			TSize aScreenSize );
       
    90 		/// @ref CShwSlideshowEngine::NextItemL
       
    91 		void NextItemL();
       
    92 		/// @ref CShwSlideshowEngine::PreviousItemL
       
    93 		void PreviousItemL();
       
    94 		/// @ref CShwSlideshowEngine::PauseL
       
    95 		void PauseL();
       
    96 		/// @ref CShwSlideshowEngine::ResumeL
       
    97 		void ResumeL();
       
    98 		/// @ref CShwSlideshowEngine::ToggleUiControlsVisibiltyL
       
    99 		void ToggleUiControlsVisibiltyL();
       
   100 		/// @ref CShwSlideshowEngine::LSKPressedL
       
   101 		void LSKPressedL();
       
   102 		/// @ref CShwSlideshowEngine::State
       
   103 		CShwSlideshowEngine::TShwState State() const;
       
   104 		/// @ref CShwSlideshowEngine::AvailableEffectsL
       
   105 		static void AvailableEffectsL( RArray<TShwEffectInfo>& aEffects );
       
   106 		/// @ref CShwSlideshowEngine::VolumeUpL
       
   107 		void VolumeUpL();
       
   108 		/// @ref CShwSlideshowEngine::VolumeDownL
       
   109 		void VolumeDownL();
       
   110 
       
   111 	public: // From MShwEventObserver
       
   112 
       
   113 		/// @ref MShwEventObserver::NotifyL
       
   114 		void NotifyL( MShwEvent* aEvent );
       
   115 
       
   116 	private:	// Implementation
       
   117 
       
   118 		/// Ref: the observer
       
   119 		MShwEngineObserver& iObserver;
       
   120 		/// Own: the media list to play
       
   121 		MGlxMediaList* iMediaList;
       
   122 		/// Own: the visual list manager
       
   123 		CGlxVisualListManager* iVisualListManager;
       
   124 		/// Own: the visual list to play
       
   125 		MGlxVisualList* iVisualList;
       
   126 		/// Own: the factory that creates the event controllers
       
   127 		CShwPlaybackFactory* iFactory;
       
   128 		/// Own: the event controllers
       
   129 		CShwEventRouter* iEventRouter;
       
   130 		/// Own: state flag
       
   131 		CShwSlideshowEngine::TShwState iState;
       
   132 		/// Ref: The HUI display
       
   133 		CAlfDisplay* iDisplay;
       
   134 	};
       
   135 
       
   136 #endif // __CSHWSLIDESHOWENGINEIMPL_H__