profilesapplication/Profiles/ProfilesGSTonesPlugin/src/CProfilesGSTonesPluginFileListSettingItem.h
branchRCL_3
changeset 19 cd54903d48da
parent 0 ca436256272f
equal deleted inserted replaced
18:b7fa36b488f8 19:cd54903d48da
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Setting item class for tone selection.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPROFILESGSTONESPLUGINFILELISTSETTINGITEM_H
       
    21 #define CPROFILESGSTONESPLUGINFILELISTSETTINGITEM_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <aknsettingitemlist.h>
       
    25 #include <cenrepnotifyhandler.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CCoeEnv;
       
    29 class CFLDFileListContainer;
       
    30 class CRepository;
       
    31 class MProfilesGSTonesPluginItemDataInterface;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 *  Setting item class for tone selection.
       
    36 *  CProfilesGSTonesPluginFileListSettingItem launches File List Dialog common component
       
    37 *  from which user can select a file for ringing tone.
       
    38 *
       
    39 *  @lib ProfileSettingsView.lib
       
    40 *  @since 1.2
       
    41 */
       
    42 NONSHARABLE_CLASS( CProfilesGSTonesPluginFileListSettingItem ) : public CAknSettingItem,
       
    43     public MCenRepNotifyHandlerCallback
       
    44 	{
       
    45 
       
    46 	public:		// Constructors and destructor
       
    47 
       
    48 		/**
       
    49 		* C++ constructor.
       
    50 		* @param aIdentifier Resource identifier.
       
    51 		*        Tells which setting item is currently edited.
       
    52 		* @param aRingingType Describes how the tone is played.
       
    53 		* @param aRingingVolume The volume how loud the tone is played.
       
    54 		* @param aVibratingAlert Setting of the vibrating alert.
       
    55 		* @param aCoeEnv Pointer to Control Environment.
       
    56 		* @param aDataInterface reference to the interface to the data
       
    57         *        storage.
       
    58 		*/
       
    59 		CProfilesGSTonesPluginFileListSettingItem(
       
    60 			TInt aIdentifier,
       
    61             const TDesC& aDefaultToneFileName,
       
    62 			CCoeEnv* aCoeEnv,
       
    63             MProfilesGSTonesPluginItemDataInterface& aDataInterface );
       
    64 
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68 		~CProfilesGSTonesPluginFileListSettingItem();
       
    69 
       
    70 	private:	// Functions from base classes
       
    71 
       
    72         /**
       
    73         * From CAknSettingItem
       
    74         */
       
    75 		void CompleteConstructionL();
       
    76 
       
    77         /**
       
    78         * From CAknSettingItem
       
    79         */
       
    80 		void StoreL();
       
    81 
       
    82         /**
       
    83         * From CAknSettingItem
       
    84         */
       
    85 		void LoadL();
       
    86 
       
    87         /**
       
    88         * From CAknSettingItem
       
    89         */
       
    90 		void EditItemL( TBool aCalledFromMenu );
       
    91 
       
    92         /**
       
    93         * From CAknSettingItem
       
    94         */
       
    95 		const TDesC& SettingTextL();
       
    96 
       
    97         /**
       
    98         * From MCenRepNotifyHandlerCallback
       
    99         */
       
   100         void HandleNotifyInt( TUint32 aId, TInt aNewValue );
       
   101         
       
   102 	private: // New functions
       
   103 	     /**
       
   104          * Read the size limitation key from Profiles Central Repository.
       
   105 		 *
       
   106 		 * @param aRepository reference to an open Profiles Cenrep session.
       
   107          */
       
   108         void ReadMaxToneFileSizeL( CRepository& aRepository );
       
   109 
       
   110 	private:	// Data
       
   111 
       
   112 		// Internal buffer for filename of selected tone
       
   113 		TFileName iInternalToneFileName;
       
   114 
       
   115 		// Ringing type for tone playback
       
   116 		TInt iRingingType;
       
   117 
       
   118 		// Ringing volume for tone playback
       
   119 		TInt iRingingVolume;
       
   120 
       
   121 		// Vibrating alert setting for tone playback
       
   122 		TBool iVibratingAlert;
       
   123 
       
   124 		// Own: Localised text qtn_tc_none
       
   125 		HBufC* iNoSoundText;
       
   126 
       
   127 		// Own: "No_Sound.wav" file name
       
   128 		HBufC* iNoSoundFileName;
       
   129 
       
   130 		// Own: Localised text qtn_no_personal_tone
       
   131 		HBufC* iDefaultToneText;
       
   132 
       
   133         // Default tone file name
       
   134         TFileName iDefaultToneFileName;
       
   135 
       
   136 		// Own: Localised text for title for tone selection
       
   137 		HBufC* iTitle; /// Title for tone selection
       
   138 
       
   139 		// Text that is returned by SettingTextL
       
   140 		TPtrC iSettingText;
       
   141 
       
   142 		// Ref: Pointer to Control Environment
       
   143 		CCoeEnv* iCoeEnv;
       
   144 
       
   145         // Own: File list container
       
   146         CFLDFileListContainer* iFileListContainer;
       
   147 
       
   148         // Own: Notification handler for active profile vibra setting
       
   149         CCenRepNotifyHandler* iVibraNotifyHandler;
       
   150 
       
   151         // Own: Notification handler for active profile ringing type setting
       
   152         CCenRepNotifyHandler* iTypeNotifyHandler;
       
   153 
       
   154         // Own: Notification handler for active profile ringing volume setting
       
   155         CCenRepNotifyHandler* iVolumeNotifyHandler;
       
   156 
       
   157         // Own: Profiles Central Repository session
       
   158         CRepository* iSession;
       
   159 
       
   160         // Own: Vibra control Central Repository session
       
   161         CRepository* iVibraSession;
       
   162 
       
   163         // The interface to the external data storage
       
   164         MProfilesGSTonesPluginItemDataInterface& iDataInterface; 
       
   165 
       
   166         // Holds the size limitation value for ringing tone file size
       
   167         TInt iSizeLimit;
       
   168 	};
       
   169 
       
   170 #endif // CPROFILESGSTONESPLUGINFILELISTSETTINGITEM_H
       
   171 
       
   172 // End of File