1.1 --- a/epoc32/include/stereowideningutility.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stereowideningutility.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,368 @@
1.4 -stereowideningutility.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This is the definition of the audio StereoWidening utility class.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef STEREOWIDENINGUTILITY_H
1.25 +#define STEREOWIDENINGUTILITY_H
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32base.h>
1.29 +#include <e32svr.h>
1.30 +#include <StereoWideningBase.h>
1.31 +#include <centralrepository.h>
1.32 +#include <StereoWideningUtilityData.h>
1.33 +
1.34 +// FORWARD DECLARATIONS
1.35 +class TEfStereoWideningUtilityPreset;
1.36 +class CStereoWidening;
1.37 +class CMdaAudioConvertUtility;
1.38 +class CMdaAudioPlayerUtility;
1.39 +class CMdaAudioRecorderUtility;
1.40 +class CMdaAudioInputStream;
1.41 +class CMdaAudioOutputStream;
1.42 +class CMdaAudioToneUtility;
1.43 +class CCustomCommandUtility;
1.44 +class CCustomInterfaceUtility;
1.45 +class CMMFDevSound;
1.46 +class CRepository;
1.47 +class CMidiClientUtility;
1.48 +class CDrmPlayerUtility;
1.49 +class CVideoPlayerUtility;
1.50 +
1.51 +// CLASS DECLARATION
1.52 +
1.53 +/**
1.54 +* This is the StereoWidening Utility class for managing audio StereoWidening presets.
1.55 +*
1.56 +* @lib StereoWideningUtility.lib
1.57 +* @since 3.0
1.58 +*/
1.59 +
1.60 +class CStereoWideningUtility : public CBase
1.61 + {
1.62 + public: // Constructors and destructor
1.63 +
1.64 +
1.65 + /**
1.66 + * Factory function for creating the audio StereoWidening utility object.
1.67 + * @since 3.0
1.68 + * @param aUtility A reference to a Devsound Instance
1.69 + * @return pointer to CStereoWideningUtility object
1.70 + */
1.71 + IMPORT_C static CStereoWideningUtility* NewL(CMMFDevSound& aDevSound);
1.72 +
1.73 + /**
1.74 + * Factory function for creating the audio StereoWidening utility object.
1.75 + * @since 3.0
1.76 + * @param aUtility A reference to a convert utility
1.77 + * @return pointer to CStereoWideningUtility object
1.78 + */
1.79 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioConvertUtility& aUtility);
1.80 +
1.81 + /**
1.82 + * Factory function for creating the audio StereoWidening utility object.
1.83 + * @since 3.0
1.84 + * @param aUtility A reference to a audio input stream utility
1.85 + * @return pointer to CStereoWideningUtility object
1.86 + */
1.87 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioInputStream& aUtility);
1.88 +
1.89 + /**
1.90 + * Factory function for creating the audio StereoWidening utility object.
1.91 + * @since 3.0
1.92 + * @param aUtility A reference to a audio output stream utility
1.93 + * @return pointer to CStereoWideningUtility object
1.94 + */
1.95 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioOutputStream& aUtility);
1.96 +
1.97 + /**
1.98 + * Factory function for creating the audio StereoWidening utility object.
1.99 + * @since 3.0
1.100 + * @param aUtility A reference to a audio player utility
1.101 + * @return pointer to CStereoWideningUtility object
1.102 + */
1.103 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioPlayerUtility& aUtility);
1.104 +
1.105 + /**
1.106 + * Factory function for creating the audio StereoWidening utility object.
1.107 + * @since 3.0
1.108 + * @param aUtility A reference to a audio recorder utility
1.109 + * @return pointer to CStereoWideningUtility object
1.110 + */
1.111 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioRecorderUtility& aUtility);
1.112 +
1.113 + /**
1.114 + * Factory function for creating the audio StereoWidening utility object.
1.115 + * @since 3.0
1.116 + * @param aUtility A reference to a audio tone utility
1.117 + * @return pointer to CStereoWideningUtility object
1.118 + */
1.119 + IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioToneUtility& aUtility);
1.120 +
1.121 + /**
1.122 + * Factory function for creating the audio StereoWidening utility object.
1.123 + * @since 3.0
1.124 + * @param aUtility A reference to custom command utility
1.125 + * @return pointer to CStereoWideningUtility object
1.126 + */
1.127 + IMPORT_C static CStereoWideningUtility* NewL(CCustomCommandUtility* aUtility);
1.128 +
1.129 + /**
1.130 + * Factory function for creating the audio StereoWidening utility object.
1.131 + * @since 3.0
1.132 + * @param aUtility A reference to custom interface utility
1.133 + * @return pointer to CStereoWideningUtility object
1.134 + */
1.135 + IMPORT_C static CStereoWideningUtility* NewL(MCustomInterface& aCustomInterface);
1.136 +
1.137 + /**
1.138 + * Factory function for creating the audio StereoWidening utility object.
1.139 + * @since 3.0
1.140 + * @param aUtility A reference to CMidiClientUtility
1.141 + * @return pointer to CStereoWideningUtility object
1.142 + */
1.143 + IMPORT_C static CStereoWideningUtility* NewL(CMidiClientUtility& aUtility);
1.144 +
1.145 + /**
1.146 + * Factory function for creating the audio StereoWidening utility object.
1.147 + * @since 3.0
1.148 + * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
1.149 + * @return pointer to CStereoWideningUtility object
1.150 + */
1.151 + IMPORT_C static CStereoWideningUtility* NewL( CDrmPlayerUtility& aUtility );
1.152 +
1.153 + /**
1.154 + * Factory function for creating the audio StereoWidening utility object.
1.155 + * @since 3.2
1.156 + * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
1.157 + * @return pointer to CStereoWideningUtility object
1.158 + */
1.159 + IMPORT_C static CStereoWideningUtility* NewL( CVideoPlayerUtility& aUtility );
1.160 +
1.161 + /**
1.162 + * Destructor.
1.163 + */
1.164 + virtual ~CStereoWideningUtility();
1.165 +
1.166 + /**
1.167 + * Apply the Preset Index value
1.168 + * @since 3.0
1.169 + * @param aPreset Preset Value
1.170 + */
1.171 + IMPORT_C void ApplyPresetL(TInt aPreset);
1.172 +
1.173 + /**
1.174 + * Disable the StereoWidening
1.175 + * @since 3.0
1.176 + */
1.177 + IMPORT_C void DisableStereoWideningL();
1.178 +
1.179 + /**
1.180 + * Create a Preset with the given Name and StereoWidening Settings
1.181 + * @since 3.0
1.182 + * @param aName Name of the Preset
1.183 + * @param aStereoWidening StereoWidening Settings for the Preset
1.184 + */
1.185 + IMPORT_C void CreatePresetL(TDesC& aName, CStereoWidening& aStereoWideningUI);
1.186 +
1.187 + /**
1.188 + * Delete a Preset with the given index in the Central Repository
1.189 + * @since 3.0
1.190 + * @param aPresetIndex Index of the Preset in the Array
1.191 + */
1.192 + IMPORT_C void DeletePresetL(TInt aPresetIndex);
1.193 +
1.194 + /**
1.195 + * Retrieves a Preset with the given index from the Central Repository
1.196 + * @since 3.0
1.197 + * @param aPresetIndex Index of the Preset in the Array
1.198 + */
1.199 + IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex);
1.200 +
1.201 + /**
1.202 + * Get the reference to the StereoWidening Object
1.203 + * @since 3.0
1.204 + * @return Reference to the StereoWidening Object.
1.205 + */
1.206 + IMPORT_C CStereoWidening& StereoWidening();
1.207 +
1.208 + /**
1.209 + * Modify a Preset with the given Name and StereoWidening Settings
1.210 + * @since 3.0
1.211 + * @param aPresetIndex Array Index of the Preset
1.212 + * @param aName Name of the Preset
1.213 + * @param aStereoWidening StereoWidening Settings for the Preset
1.214 + */
1.215 + IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CStereoWidening& aStereoWideningUI);
1.216 +
1.217 + /**
1.218 + * Get the number of Pre Defined Presets
1.219 + * @since 3.0
1.220 + * @return Number of Pre Defined Presets
1.221 + */
1.222 + IMPORT_C TUint32 NumberOfPreDefinedPresets() const;
1.223 +
1.224 + /**
1.225 + * Get all the Presets defined in the Central Repository
1.226 + * @since 3.0
1.227 + * @return Array of all Presets.
1.228 + */
1.229 + IMPORT_C TArray<TEfStereoWideningUtilityPreset> Presets();
1.230 +
1.231 + /**
1.232 + * Reset a System Defined Preset with the given index in the Array returned from Presets()
1.233 + * @since 3.0
1.234 + * @param aPresetIndex Index of the Preset in the Array
1.235 + */
1.236 + IMPORT_C void ResetPresetL(TInt aPresetIndex);
1.237 +
1.238 + private:
1.239 +
1.240 + /**
1.241 + * C++ default constructor.
1.242 + */
1.243 + CStereoWideningUtility();
1.244 +
1.245 + /**
1.246 + * By default Symbian 2nd phase constructor is private.
1.247 + */
1.248 +
1.249 + /**
1.250 + * Second Phase Costructor for DevSound Instance
1.251 + * @since 3.0
1.252 + * @param aDevSound DevSound Referece
1.253 + */
1.254 + void ConstructL(CMMFDevSound& aDevSound);
1.255 +
1.256 + /**
1.257 + * Second Phase Costructor for Audio Convert Utility
1.258 + * @since 3.0
1.259 + * @param aUtility CMdaAudioConvertUtility Referece
1.260 + */
1.261 + void ConstructL(CMdaAudioConvertUtility& aUtility);
1.262 +
1.263 + /**
1.264 + * Second Phase Costructor for CMdaAudioInputStream
1.265 + * @since 3.0
1.266 + * @param aUtility CMdaAudioInputStream Referece
1.267 + */
1.268 + void ConstructL(CMdaAudioInputStream& aUtility);
1.269 +
1.270 + /**
1.271 + * Second Phase Costructor for CMdaAudioOutputStream
1.272 + * @since 3.0
1.273 + * @param aUtilityCMdaAudioOutputStream Referece
1.274 + */
1.275 + void ConstructL(CMdaAudioOutputStream& aUtility);
1.276 +
1.277 + /**
1.278 + * Second Phase Costructor for CMdaAudioPlayerUtility
1.279 + * @since 3.0
1.280 + * @param aUtility CMdaAudioPlayerUtility Referece
1.281 + */
1.282 + void ConstructL(CMdaAudioPlayerUtility& aUtility);
1.283 +
1.284 + /**
1.285 + * Second Phase Costructor for CMdaAudioRecordUtility
1.286 + * @since 3.0
1.287 + * @param aUtility CMdaAudioRecordUtility Referece
1.288 + */
1.289 + void ConstructL(CMdaAudioRecorderUtility& aUtility);
1.290 +
1.291 + /**
1.292 + * Second Phase Costructor for CMdaAudioToneUtility
1.293 + * @since 3.0
1.294 + * @param aUtility CMdaAudioToneUtility Referece
1.295 + */
1.296 + void ConstructL(CMdaAudioToneUtility& aUtility);
1.297 +
1.298 + /**
1.299 + * Second Phase Costructor for MCustomCommand
1.300 + * @since 3.0
1.301 + * @param aUtility MCustomCommand Referece
1.302 + */
1.303 + void ConstructL(CCustomCommandUtility* aUtility);
1.304 +
1.305 + /**
1.306 + * Second Phase Costructor for MCustomInterface
1.307 + * @since 3.0
1.308 + * @param aUtility MCustomInterface Referece
1.309 + */
1.310 + void ConstructL(MCustomInterface& aCustomInterface);
1.311 +
1.312 + /**
1.313 + * Second Phase Costructor for CMidiClientUtility
1.314 + * @since 3.0
1.315 + * @param aUtility CMidiClientUtility Referece
1.316 + */
1.317 + void ConstructL(CMidiClientUtility& aUtility);
1.318 +
1.319 + /**
1.320 + * Second Phase Costructor for CDrmPlayerUtility
1.321 + * @since 3.0
1.322 + * @param aUtility CDrmPlayerUtility Referece
1.323 + */
1.324 + void ConstructL(CDrmPlayerUtility& aUtility);
1.325 +
1.326 + /**
1.327 + * Second Phase Costructor for CVideoPlayerUtility
1.328 + * @since 3.2
1.329 + * @param aUtility CVideoPlayerUtility Referece
1.330 + */
1.331 + void ConstructL(CVideoPlayerUtility& aUtility);
1.332 +
1.333 + /**
1.334 + * Function for Updating the Array from the Central Repository
1.335 + * @since 3.0
1.336 + * @param aUtility MCustomInterface Referece
1.337 + */
1.338 + void UpdateFullPresetArrayFromCenRep(RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray);
1.339 +
1.340 + /**
1.341 + * Function of Updating the Preset Array for the User
1.342 + * @since 3.0
1.343 + * @param aUtility MCustomInterface Referece
1.344 + */
1.345 + void UpdatePresetArray(RArray<TEfStereoWideningUtilityPreset>& aPresetArray,const RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray);
1.346 +
1.347 +
1.348 + private: // Data
1.349 +
1.350 + // Array for Storing the Current State of the Repository
1.351 + // which has been compacted after the transaction
1.352 + // with the Central Repository
1.353 + RArray<TEfStereoWideningUtilityPreset> iPresetArray;
1.354 +
1.355 + // Array Which contains the full information from the
1.356 + // Central Repository except the Description Values
1.357 + RArray<TEfStereoWideningUtilityPreset> iFullPresetArray;
1.358 +
1.359 + // Pointer to the StereoWidening Object
1.360 + CStereoWidening* iStereoWidening;
1.361 +
1.362 + // Pointer to the StereoWidening Object
1.363 + // which is returned to the UI for Manipulation
1.364 + CStereoWidening* iTransStereoWidening;
1.365 +
1.366 + // Pointer to the Preset Repository
1.367 + CRepository* iPresetRepository;
1.368 + };
1.369 +
1.370 +#endif // CStereoWideningUTILITY_H
1.371 +
1.372 +// End of File