diff -r 73a1feb507fb -r bc78a40cd63c tsrc/musenginestub/inc/musengtelephoneutils.h --- a/tsrc/musenginestub/inc/musengtelephoneutils.h Tue Aug 31 15:12:07 2010 +0300 +++ b/tsrc/musenginestub/inc/musengtelephoneutils.h Wed Sep 01 12:31:01 2010 +0100 @@ -20,183 +20,111 @@ #define MUSENGTELEPHONEUTILS_H -#include "musunittesting.h" +//#include "musunittesting.h" // SYSTEM #include -#include -#include -#include +//#include +//#include // FORWARD DECLARATIONS -class CRepository; -class CTelephonyAudioRouting; -class CPhCltCommandHandler; -class MMusEngAudioRoutingObserver; +//class CRepository; +//class CTelephonyAudioRouting; /** -* Utility class to handle all phone related requests: -* Audio routing, volume control and microphone muting. +* +* @lib musengine.lib +* @since S60 v3.2 */ -class CMusEngTelephoneUtils : public CActive, - public MTelephonyAudioRoutingObserver +class CMusEngTelephoneUtils : public CBase + //public MTelephonyAudioRoutingObserver { - MUS_UNITTEST( UT_CMusEngTelephoneUtils ) - MUS_UNITTEST( UT_CMusEngSession ) - - public: - - /** - * + public: + + /** + * + * @since S60 v3.2 */ - static CMusEngTelephoneUtils* NewL(); + static CMusEngTelephoneUtils* NewL(); - /** - * + /** + * + * @since S60 v3.2 */ - ~CMusEngTelephoneUtils(); + ~CMusEngTelephoneUtils(); - public: // API - - /** - * Checks if audio routing can be changed using LoudspeakerL - * - * @return ETrue if audio routing can be changed using LoudspeakerL - */ - TBool AudioRoutingCanBeChanged(); + public: // API - /** - * Changes the audio routing between loudspeaker and handset. - * - * @param aShowDialog if ETrue, user is notified about new audio routing + /** + * + * @since S60 v3.2 */ void LoudspeakerL( TBool aEnable, TBool aShowDialog ); - /** - * + /** + * + * @since S60 v3.2 */ - TBool IsLoudSpeakerEnabled() const; - - /** - * - */ - TInt GetVolumeL() const; + TBool IsLoudSpeakerEnabled() const; - /** - * - */ - void SetVolumeL( TInt aVolume ); - - /** - * Mutes CS call microphone. - */ - void MuteMicL( TBool aMute ); - /** - * Returns current CS call mic mute state. + * + * @since S60 v3.2 */ - TBool IsMicMutedL(); - - /** - * Sets audio routing observer. Can be set to NULL in order to indicate - * ending of observing changes in audio routing. - */ - void SetAudioRoutingObserver( MMusEngAudioRoutingObserver* aObserver ); - - - private: // inherited from CActive + TInt GetVolumeL() const; - /** - * + /** + * + * @since S60 v3.2 */ - void RunL(); - - /** - * Cancels outstanding request to phone client - */ - void DoCancel(); - - - private: // MTelephonyAudioRoutingObserver functions + void SetVolumeL( TInt aVolume ); + + + + private: /** - * Available outputs have changed - */ - void AvailableOutputsChanged( - CTelephonyAudioRouting& aTelephonyAudioRouting ); - - /** - * Some other application has changed audio output routing - */ - void OutputChanged( - CTelephonyAudioRouting& aTelephonyAudioRouting ); - + * + * @since S60 v3.2 + */ + CMusEngTelephoneUtils(); + /** - * Our request to change audio output routing has completed - */ - void SetOutputComplete( - CTelephonyAudioRouting& aTelephonyAudioRouting, - TInt aError ); - - /** - * Set output if setting is currently allowed. Leaves with KErrAccessDenied - * if setting is not allowed. + * + * @since S60 v3.2 */ - void DoSetOutputL( CTelephonyAudioRouting::TAudioOutput aAudioOutput ); - - private: - - /** - * Default C++ constructor - */ - CMusEngTelephoneUtils(); - - /** - * 2nd phase constructor - */ - void ConstructL(); + void ConstructL(); - private: // HELPER - - /** - * Checks that volume value is between 1 and 10. - * - * @return validated volume value - */ - TInt ValidateVolume( const TInt aVolume ) const; - - - private: // DATA + private: // HELPER /** - * Stores the audio routing state at startup. + * + * @since S60 v3.2 */ - CTelephonyAudioRouting::TAudioOutput iAudioOutputAtStartup; - + TInt ValidateVolume( const TInt aVolume ) const; + + + public: // DATA + + /** + * Stores the audio routing state at startup. + */ + //CTelephonyAudioRouting::TAudioOutput iAudioOutputAtStartup; + /** * Telephony audio routing instance. Owned. */ - CTelephonyAudioRouting* iTelephonyAudioRouting; + //CTelephonyAudioRouting* iTelephonyAudioRouting; /** * Central repository. Owned. + * + * @since S60 v3.2 */ - CRepository* iRepository; + //CRepository* iRepository; - /** - * Command handler for muting the microphone - */ - CPhCltCommandHandler* iPhoneCommandHandler; - - /** - * Not owned. - */ - MMusEngAudioRoutingObserver* iAudioRoutingObserver; - - TBool iShowDialog; - };