photosgallery/slideshow/engine/inc/shwsettingsmodel.h
changeset 0 4e91876724a2
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 settings model for the slideshow
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CSHWSETTINGSMDL_H__
       
    22 #define __CSHWSETTINGSMDL_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATIONS
       
    30 
       
    31 /**
       
    32  *  CShwSettingsModel
       
    33  *  Stores and reads user definable settings for the slideshow
       
    34  * @internal reviewed 08/06/2007 by Kimmo Hoikka
       
    35  */
       
    36 NONSHARABLE_CLASS( CShwSettingsModel ) : public CBase
       
    37 	{
       
    38 	public:  // Constructors and destructor
       
    39 	    /**
       
    40 	    * Symbian two stage Constructor.
       
    41 	    * @return contructed object
       
    42 	    */
       
    43 	    IMPORT_C static CShwSettingsModel* NewL();
       
    44 
       
    45 	    /**
       
    46 	    * Destructor.
       
    47 	    */
       
    48 	    IMPORT_C ~CShwSettingsModel();
       
    49 
       
    50 	private: // member functions
       
    51 		/**
       
    52 		* C++ constructor.
       
    53 		*/
       
    54 		CShwSettingsModel();
       
    55 
       
    56 		/**
       
    57 		* 2nd stage constructor
       
    58 		*/
       
    59 		void ConstructL();	    
       
    60 
       
    61 	public: // member funtions
       
    62 
       
    63    		
       
    64    		/**
       
    65         * Retrieve the persisted play order setting value.
       
    66         * @retrun the play order
       
    67         */
       
    68 		IMPORT_C TInt PlayOrderL();
       
    69 		
       
    70 		/**
       
    71         * Persist the play order setting value.
       
    72         * @param [in] the play order to be persisted
       
    73         */
       
    74 		IMPORT_C void SavePlayOrderL(TInt aOrder);
       
    75 		
       
    76 		/**
       
    77         * Persist the music on/off setting value.
       
    78         * @param [in] the music state to be persisted
       
    79         */
       
    80 		IMPORT_C void SaveMusicStateL(TInt aMusicState);
       
    81    		
       
    82    		/**
       
    83         * Retrieve the persisted music on/off setting value.
       
    84         * @retrun the music on/off state
       
    85         */		
       
    86 		IMPORT_C TInt MusicOnL() const;
       
    87 		
       
    88 		/**
       
    89         * Persist the music name and path value.
       
    90         * @param [in] the music name and path to be persisted
       
    91         */
       
    92 		IMPORT_C void SaveMusicNamePathL(const TDesC& aMusicNamePath);
       
    93 		
       
    94 		/**
       
    95         * Retrieve the persisted music name and path.
       
    96         * @param [out] the music name and path
       
    97         */		
       
    98 		IMPORT_C void MusicNamePathL(TDes& aMusicNamePath) const;
       
    99 
       
   100 		/**
       
   101         * Persist the transition delay between images.
       
   102         * @param [in] the transition delay value to be persisted
       
   103         */
       
   104 		IMPORT_C void SaveTransDelayL(TInt aTransDelay);
       
   105 
       
   106 		/**
       
   107         * Retrieve the persisted transition delay between images.
       
   108         * @return the transition delay value
       
   109         */
       
   110 		IMPORT_C TInt TransDelayL() const;
       
   111 		
       
   112 		/**
       
   113         * Persist the transition effect type between images.
       
   114         * @param [in] aEffectUid the transition effect type ECom Uid to be persisted
       
   115         * @param [in] aEffectIndex the transition effect index to be persisted
       
   116         * @ref TTransEffectType
       
   117         */
       
   118         
       
   119 		IMPORT_C void SaveTransitionTypeL(const TUid aEffectUid, const TUint aEffectIndex);
       
   120 		/**
       
   121         * Retrieve the persisted the transition effect type between images.
       
   122         * @param [out] aEffectUid the transition effect type ECom Uid to be persisted
       
   123         * @param [out] aEffectIndex the transition effect index to be persisted
       
   124         * @ref TTransEffectType
       
   125         */
       
   126 		IMPORT_C void TransitionTypeL(TUid& aEffectUid, TUint& aEffectIndex) const;
       
   127 
       
   128     private: // member variables
       
   129 
       
   130 		/// The implementation of the class, hidden from the clients
       
   131 		class CShwCenRepWatcher ;
       
   132 		/// Owns: watcher for persisted play backward in time/forward in time value
       
   133 		CShwCenRepWatcher* iPlayOrder;
       
   134 		/// Owns: watcher for persisted music on/off value
       
   135 		CShwCenRepWatcher* iMusicOnOffWatcher; 
       
   136 		/// Owns: watcher for persisted music location & name value
       
   137         CShwCenRepWatcher* iMusicNamePathWatcher;
       
   138         /// Owns: watcher for persisted transition (between images) delay value
       
   139         CShwCenRepWatcher* iTransDelayWatcher; 
       
   140 		/// Owns: watcher for persisted transition type value        
       
   141         CShwCenRepWatcher* iTransTypeWatcher;
       
   142         /// Owns: watcher for persisted transition index value        
       
   143         CShwCenRepWatcher* iTransIndexWatcher;
       
   144 	}; 
       
   145 
       
   146 #endif // __CSHWSETTINGSMDL_H__
       
   147 
       
   148 // End of File