photosgallery/slideshow/engine/inc/shwslideshowengine.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:    This file defines the API for ShwSlideshowEngine.dll
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __SHWSLIDESHOWENGINE_H__
       
    22 #define __SHWSLIDESHOWENGINE_H__
       
    23 
       
    24 // Include Files
       
    25 #include <e32base.h>
       
    26 #include <e32std.h>
       
    27 #include <alf/alfdisplay.h>
       
    28 #include <alf/alfenv.h>
       
    29 
       
    30 // Forward declarations
       
    31 class CAlfEnv;
       
    32 class CAlfDisplay;
       
    33 class MGlxMediaList;
       
    34 class MShwEngineObserver;
       
    35 class CShwSlideshowEngineImpl;
       
    36 class TShwEffectInfo;
       
    37 class MShwMusicObserver;
       
    38 
       
    39 // Class Definition
       
    40 /**
       
    41  * CShwSlideshowEngine
       
    42  *
       
    43  * This is the main API for the slideshow engine
       
    44  * 
       
    45  * @author Kimmo Hoikka
       
    46  * @lib shwslideshowengine.lib
       
    47  * @internal reviewed 07/06/2007 by Loughlin
       
    48  */
       
    49 NONSHARABLE_CLASS( CShwSlideshowEngine ) : public CBase
       
    50     {
       
    51     public:
       
    52 
       
    53         /**
       
    54          * The state of the engine.
       
    55          */
       
    56         enum TShwState 
       
    57             {
       
    58             EShwStateInitialized = 1,
       
    59             EShwStateRunning,
       
    60             EShwStatePaused
       
    61             };
       
    62 
       
    63     public: // Construction
       
    64 
       
    65         /**
       
    66          * Constructor
       
    67          * @param aObserver, observer of the engine.
       
    68          */
       
    69         IMPORT_C static CShwSlideshowEngine* NewL( 
       
    70             MShwEngineObserver& aObserver );
       
    71 
       
    72         /**
       
    73          * Destructor
       
    74          */
       
    75         IMPORT_C ~CShwSlideshowEngine();
       
    76 
       
    77     public: // the API
       
    78 
       
    79         /**
       
    80          * This method starts the slideshow.
       
    81          * @param CHuiEnv& the HUI environment to use
       
    82          * @param CHuiDisplay& the HUI display to draw the list to
       
    83          * @param MGlxMediaList& the items to show.
       
    84          * @param MShwMusicObserver& the music control observer.
       
    85          * @param aScreenSize the size for the slideshow screen
       
    86          */
       
    87         IMPORT_C void StartL( CAlfEnv& aEnv, CAlfDisplay& aDisplay,
       
    88                             MGlxMediaList& aItemsToShow,
       
    89                             MShwMusicObserver& aMusicObserver,
       
    90                             TSize aScreenSize );
       
    91 
       
    92         /**
       
    93          * This method commands engine to proceed to next item.
       
    94          */
       
    95         IMPORT_C void NextItemL();
       
    96 
       
    97         /**
       
    98          * This method commands engine to proceed to previous item.
       
    99          */
       
   100         IMPORT_C void PreviousItemL();
       
   101 
       
   102         /**
       
   103          * This method pauses the slideshow
       
   104          */
       
   105         IMPORT_C void PauseL();
       
   106 
       
   107         /**
       
   108          * This method resumes the paused slideshow
       
   109          */
       
   110         IMPORT_C void ResumeL();
       
   111 
       
   112         /**
       
   113          * This method returns the state of the slideshow
       
   114          * @return the state of the engine
       
   115          */
       
   116         IMPORT_C TShwState State() const;
       
   117 
       
   118         /**
       
   119          * This method retrieves the available effects
       
   120          * @param an array where the effect infos are added
       
   121          */
       
   122         IMPORT_C static void AvailableEffectsL(RArray<TShwEffectInfo>& aEffects);
       
   123 
       
   124         /**
       
   125          * This method increases the volume
       
   126          */
       
   127         IMPORT_C void VolumeUpL();
       
   128 
       
   129         /**
       
   130          * This method decreases the volume
       
   131          */
       
   132         IMPORT_C void VolumeDownL();
       
   133         
       
   134         /**
       
   135          * This method change the ui staus in slideshow when MSK Preesed
       
   136          */
       
   137         IMPORT_C void ToggleUiControlsVisibiltyL();
       
   138         
       
   139         /**
       
   140          * This method react when LSK Preesed
       
   141          */
       
   142         IMPORT_C void LSKPressedL();
       
   143 
       
   144     private: // Implementation
       
   145 
       
   146         /// C++ constructor, no derivation or use outside the DLL
       
   147         CShwSlideshowEngine();
       
   148         /// Own: the real implementation
       
   149         CShwSlideshowEngineImpl* iImpl;
       
   150 
       
   151     };
       
   152 
       
   153 #endif  // __SHWSLIDESHOWENGINE_H__