photosgallery/slideshow/engine/controlsrc/shwviewcontrol.h
changeset 0 4e91876724a2
child 35 420f6808bf21
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 view control for the slideshow
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CSHWVIEWCONTROL_H__
       
    22 #define __CSHWVIEWCONTROL_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 #include "shweventobserver.h"
       
    29 #include "shweventpublisherbase.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class MGlxMediaList;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * CShwViewControl
       
    38  * 
       
    39  * @author Kimmo Hoikka
       
    40  * @lib shwslideshowengine.lib
       
    41  * @internal reviewed 07/06/2007 by Loughlin
       
    42  */
       
    43 NONSHARABLE_CLASS( CShwViewControl )
       
    44 	: public CShwEventPublisherBase, public MShwEventObserver
       
    45 	{
       
    46 	public: // Constructors and destructor
       
    47 
       
    48 		/**
       
    49 		 * Constructor.
       
    50 		 * @param aList, the list that is shown in slideshow
       
    51 		 * @param aTransitionDuration, the duration for transition in milliseconds
       
    52 		 * @param aViewDuration, the duration for view in milliseconds
       
    53 		 */
       
    54 		static CShwViewControl* NewL( 
       
    55 			MGlxMediaList& aList, TInt aTransitionDuration, TInt aViewDuration );
       
    56 
       
    57 		/**
       
    58 		 * Destructor.
       
    59 		 */
       
    60 		~CShwViewControl();
       
    61 
       
    62 	private:
       
    63 
       
    64 		/**
       
    65 		 * @param aList, the list that is shown in slideshow
       
    66 		 * Constructor
       
    67 		 */
       
    68 		CShwViewControl( MGlxMediaList& aList );
       
    69 
       
    70 		/**
       
    71 		 * 2nd stage constructor
       
    72 		 */
       
    73 		void ConstructL();
       
    74 
       
    75 	public: // From MShwEventObserver
       
    76 
       
    77 		/// @ref MShwEventObserver::NotifyL
       
    78 		void NotifyL( MShwEvent* aEvent );
       
    79 
       
    80 	private: // Implementation
       
    81 
       
    82         /// Check if state allows to send start view and send it
       
    83 	    void SendStartViewL();
       
    84         /// Check if state allows to send start transition and send it
       
    85 	    void CheckAndSendStartTransitionL();
       
    86 
       
    87         /// Ref: the medialist
       
    88         MGlxMediaList& iList;
       
    89 		/// Own: Transition duration
       
    90 		TInt iTransitionDuration;
       
    91 		/// Own: View duration
       
    92 		TInt iViewDuration;
       
    93 		/// Own: Flag to tell whether we received ready to start view
       
    94 		TBool iReadyToViewReceived;
       
    95 		/// Own: Flag to tell whether we received transition ready
       
    96 		TBool iTransitionReadyReceived;
       
    97 		/// Own: Flag to tell whether we received ready to advance
       
    98 		TBool iReadyToAdvanceReceived;
       
    99 		/// Own: Flag to tell whether we received timer beat
       
   100 		TBool iTimerReceived;
       
   101 		/// Own: Flag to tell that user navigated during pause
       
   102 		TBool iUserNavigated;
       
   103 		/// Own: Flag set to ETrue when paused, EFalse when playing
       
   104 		TBool iPaused;
       
   105 		/// Own: Flag to tell if user navigated while paused
       
   106 		TBool iUserNavigatedWhilePaused;
       
   107 
       
   108 	};
       
   109 
       
   110 #endif // __CSHWVIEWCONTROL_H__