os/mm/devsoundextensions/globalaudiosettings/inc/GlobalAudioSettingsImpl.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:   This file contains definitions of GlobalAudioSettings.
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
sl@0
    21
#ifndef GLOBALAUDIOSETTINGSIMPL_H
sl@0
    22
#define GLOBALAUDIOSETTINGSIMPL_H
sl@0
    23
sl@0
    24
#include <e32property.h>
sl@0
    25
#include <e32base.h>
sl@0
    26
#include <e32debug.h>
sl@0
    27
#include "GlobalAudioSettingsData.h"
sl@0
    28
#include <GlobalAudioSettings.h>
sl@0
    29
#include <MAudioClientsListObserver.h>
sl@0
    30
sl@0
    31
class MAudioSettingsObserver;
sl@0
    32
class CGlobalAudioSettings;
sl@0
    33
class CWarningTonesObserverAO;
sl@0
    34
class CMessagingTonesObserverAO;
sl@0
    35
class CSilentProfileObserverAO;
sl@0
    36
class CVibraObserverAO;
sl@0
    37
class CAudioClientsListManagerAO;
sl@0
    38
class CMessageToneObserverAO;
sl@0
    39
class CEmailToneObserverAO;
sl@0
    40
class CRingingTypeObserverAO;
sl@0
    41
class CVideoCallToneObserverAO;
sl@0
    42
class CRingingTone1ObserverAO;
sl@0
    43
class CRingingTone2ObserverAO;
sl@0
    44
class CKeypadToneObserverAO;
sl@0
    45
class CSilenceModeObserverAO;
sl@0
    46
/**
sl@0
    47
*  Defines functions that client uses to set phone profile settings.
sl@0
    48
*
sl@0
    49
*  @lib GlobalAudioSettings.lib
sl@0
    50
*  @since Series 60 3.2
sl@0
    51
*/
sl@0
    52
NONSHARABLE_CLASS(CGlobalAudioSettingsImpl): public CBase
sl@0
    53
    {
sl@0
    54
    public:
sl@0
    55
        /**
sl@0
    56
        * function for creating the GlobalAudioSettingsImpl
sl@0
    57
        *
sl@0
    58
        */
sl@0
    59
       static CGlobalAudioSettingsImpl* NewL(
sl@0
    60
                        CGlobalAudioSettings& aGlobalAudioSettings,
sl@0
    61
                        MAudioSettingsObserver& aAudioSettingsObserver);
sl@0
    62
        /**
sl@0
    63
        * Destructor.
sl@0
    64
        *
sl@0
    65
        */
sl@0
    66
        ~CGlobalAudioSettingsImpl();
sl@0
    67
        /**
sl@0
    68
        * Returns warning tones status.
sl@0
    69
        *
sl@0
    70
        * @since Series 60 3.2
sl@0
    71
        * @return TBool aEnable. ETrue if warning tones are enabled else EFalse.
sl@0
    72
        */
sl@0
    73
         TBool IsWarningTonesEnabled();
sl@0
    74
        /**
sl@0
    75
        * Returns message tones status.
sl@0
    76
        *
sl@0
    77
        * @since Series 60 3.2
sl@0
    78
        * @return TBool aEnable. ETrue if message tones are enabled else EFalse.
sl@0
    79
        */
sl@0
    80
        TBool IsMessageTonesEnabled();
sl@0
    81
        /**
sl@0
    82
        * Returns silent profile status.
sl@0
    83
        *
sl@0
    84
        * @since Series 60 3.2
sl@0
    85
        * @return TBool aEnable. ETrue if current profile is silent profile else EFalse.
sl@0
    86
        */
sl@0
    87
         TBool IsSilentProfileEnabled();
sl@0
    88
        /**
sl@0
    89
        * Returns vibra is enabled or not in the current profile status.
sl@0
    90
        *
sl@0
    91
        * @since Series 60 3.2
sl@0
    92
        * @return TBool aEnable. ETrue if current profile vibra active else EFalse.
sl@0
    93
        */
sl@0
    94
         TBool IsVibraEnabled();
sl@0
    95
        /**
sl@0
    96
        * Returns PublicSilence is enabled or not status.
sl@0
    97
        *
sl@0
    98
        * @since Series 60 3.2
sl@0
    99
        * @return TBool aEnable. ETrue if PublicSilence active else EFalse.
sl@0
   100
        */
sl@0
   101
         TBool IsPublicSilenceEnabled();
sl@0
   102
        /**
sl@0
   103
        * Returns Message Alert Tone 
sl@0
   104
        *
sl@0
   105
        * 
sl@0
   106
        * The filename selected as the message alert tone in the
sl@0
   107
        * current profile.
sl@0
   108
        * 
sl@0
   109
        *
sl@0
   110
        * 
sl@0
   111
        * @return TDesC& aMessageAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename 
sl@0
   112
        * is returned
sl@0
   113
        */
sl@0
   114
        
sl@0
   115
        
sl@0
   116
         TDesC& MessageAlertTone();
sl@0
   117
         /**
sl@0
   118
         * Returns Email Alert Tone status
sl@0
   119
         *
sl@0
   120
         * 
sl@0
   121
         * The filename selected as the email alert tone in the
sl@0
   122
         * current profile 
sl@0
   123
         * 
sl@0
   124
         *
sl@0
   125
         * 
sl@0
   126
         *  @return TBool aEnable. ETrue if current profile message tone is on else EFalse.
sl@0
   127
         */
sl@0
   128
         TBool IsMessageAlertToneEnabled();
sl@0
   129
         /**
sl@0
   130
        * Returns Email Alert Tone 
sl@0
   131
        *
sl@0
   132
        * 
sl@0
   133
        * The filename selected as the email alert tone in the
sl@0
   134
        * current profile 
sl@0
   135
        * 
sl@0
   136
        *
sl@0
   137
        * 
sl@0
   138
        * @return TDesC& aEmailAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename 
sl@0
   139
        * is returned
sl@0
   140
        */
sl@0
   141
         TDesC& EmailAlertTone();
sl@0
   142
          /**
sl@0
   143
         * Returns Email Alert Tone status
sl@0
   144
         *
sl@0
   145
         * 
sl@0
   146
         * The filename selected as the email alert tone in the
sl@0
   147
         * current profile 
sl@0
   148
         * 
sl@0
   149
         *
sl@0
   150
         * 
sl@0
   151
         *  @return TBool aEnable. ETrue if current profile email alert tone is on else EFalse.
sl@0
   152
         */
sl@0
   153
         TBool IsEmailAlertToneEnabled();
sl@0
   154
         /**
sl@0
   155
         * Returns the RingingType
sl@0
   156
         *
sl@0
   157
         * 
sl@0
   158
         * Ringing type set in the current profile
sl@0
   159
         * 
sl@0
   160
         * 
sl@0
   161
         *
sl@0
   162
         * 
sl@0
   163
         * @return TGASRingingType aRingingType. 
sl@0
   164
         */
sl@0
   165
         CGlobalAudioSettings::TGASRingingType RingingType();
sl@0
   166
         /**
sl@0
   167
         * Returns Videocall Alert Tone 
sl@0
   168
         *
sl@0
   169
         * 
sl@0
   170
         * The filename selected as the video call alert tone in the
sl@0
   171
         * current profile 
sl@0
   172
         * 
sl@0
   173
         *
sl@0
   174
         * 
sl@0
   175
         * @return TDesC& aVideoCallAlertToneName. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename 
sl@0
   176
         * is returned
sl@0
   177
         */
sl@0
   178
         TDesC& VideoCallAlertTone();
sl@0
   179
         /**
sl@0
   180
        * Returns Videocall Alert Tone status
sl@0
   181
        *
sl@0
   182
        * 
sl@0
   183
        * The filename selected as the video call alert tone in the
sl@0
   184
        * current profile 
sl@0
   185
        * 
sl@0
   186
        *
sl@0
   187
        * 
sl@0
   188
        * @return TBool aEnable. ETrue if current profile videocall alert tone is on else EFalse.
sl@0
   189
        */
sl@0
   190
         TBool IsVideoCallAlertToneEnabled();
sl@0
   191
         /**
sl@0
   192
        * Returns Ringing Alert Tone 
sl@0
   193
        *
sl@0
   194
        * 
sl@0
   195
        * The filename selected as the ringing alert tone in the
sl@0
   196
        * current profile 
sl@0
   197
        * 
sl@0
   198
        *
sl@0
   199
        * @return TDesC& aRingingAlertTone1Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename 
sl@0
   200
        * is returned
sl@0
   201
        * 
sl@0
   202
        */
sl@0
   203
         TDesC& RingingAlertTone1();
sl@0
   204
         /**
sl@0
   205
        * Returns Ringing Alert Tone1 status
sl@0
   206
        *
sl@0
   207
        * 
sl@0
   208
        * The filename selected as the ringing alert tone in the
sl@0
   209
        * current profile 
sl@0
   210
        * 
sl@0
   211
        *
sl@0
   212
        * 
sl@0
   213
        * @return TBool aEnable. ETrue if current profile ringing alert tone is on else EFalse.
sl@0
   214
        */
sl@0
   215
         TBool IsRingingAlertTone1Enabled();
sl@0
   216
         /**
sl@0
   217
        * Returns Ringing Alert Tone 2
sl@0
   218
        *
sl@0
   219
        * 
sl@0
   220
        * The filename selected as the ringing alert tone in the
sl@0
   221
        * current profile for the alternate line
sl@0
   222
        * 
sl@0
   223
        *
sl@0
   224
        * 
sl@0
   225
        * @return TDesC& aRingingAlertTone2Name. z:\\resource\\No_Sound.wav is returned if sound is off,else selected filename 
sl@0
   226
        * is returned
sl@0
   227
        */
sl@0
   228
         TDesC& RingingAlertTone2();
sl@0
   229
         /**
sl@0
   230
        * Returns Ringing Alert Tone 2
sl@0
   231
        *
sl@0
   232
        * 
sl@0
   233
        * The filename selected as the ringing alert tone in the
sl@0
   234
        * current profile for the alternate line
sl@0
   235
        * 
sl@0
   236
        *
sl@0
   237
        * 
sl@0
   238
        * @return TBool aEnable. ETrue if current profile ringing alert tone of alternate line is on else EFalse.
sl@0
   239
        */
sl@0
   240
         TBool IsRingingAlertTone2Enabled();
sl@0
   241
         /**
sl@0
   242
        * Returns Ringing Keypad Volume
sl@0
   243
        *
sl@0
   244
        * 
sl@0
   245
        * The key tone volume selected  in the
sl@0
   246
        * current profile 
sl@0
   247
        * 
sl@0
   248
        *
sl@0
   249
        * 
sl@0
   250
        * @return TGASKeypadVolume aKeypadToneVolume.returns EGASKeypadVolumeOff sound is off,else selected volume level 
sl@0
   251
        * is returned
sl@0
   252
        */
sl@0
   253
         CGlobalAudioSettings::TGASKeypadVolume KeyPadToneVolume();
sl@0
   254
         /**
sl@0
   255
         * Returns silent mode status.
sl@0
   256
         *
sl@0
   257
         * 
sl@0
   258
         * @return TBool aEnable. ETrue if the silent mode is enabled else EFalse.
sl@0
   259
         */
sl@0
   260
         TBool IsSilenceModeEnabled();
sl@0
   261
        /**
sl@0
   262
        * Registers audio clients list observer.
sl@0
   263
        *
sl@0
   264
        * When registered successfully, the observer will start receiveing
sl@0
   265
        * callback defined in MAudioClientsListObserver when audio clients list
sl@0
   266
        * changes.
sl@0
   267
        *
sl@0
   268
        * @since S60 3.2
sl@0
   269
        * @param MAudioClientsListObserver& aObserver. A reference to class
sl@0
   270
        *           implementing MAudioClientsListObserver interface.
sl@0
   271
        * @return TInt. KErrNone if successful. KErrAlreadyExists if the observer
sl@0
   272
        *           is already registered.
sl@0
   273
        */
sl@0
   274
        TInt RegisterAudioClientsListObserver(
sl@0
   275
                                    MAudioClientsListObserver& aObserver );
sl@0
   276
                
sl@0
   277
        /**
sl@0
   278
        * Unregisters audio clients list observer.
sl@0
   279
        *
sl@0
   280
        * When unregistered, the observer will no longer receive callback when
sl@0
   281
        * audio clients list changes.
sl@0
   282
        *
sl@0
   283
        * @since S60 3.2
sl@0
   284
        * @param MAudioClientsListObserver& aObserver. A reference to class
sl@0
   285
        *           implementing MAudioClientsListObserver interface.
sl@0
   286
        * @return TInt. KErrNone if successful. KErrNotFound if the observer
sl@0
   287
        *           is not registered.
sl@0
   288
        */
sl@0
   289
        TInt UnregisterAudioClientsListObserver(
sl@0
   290
                                    MAudioClientsListObserver& aObserver);
sl@0
   291
sl@0
   292
        /**
sl@0
   293
        * Gets audio clients list.
sl@0
   294
        *
sl@0
   295
        * On return of this function, the parameter aList will contain active
sl@0
   296
        * audio client application process ids.
sl@0
   297
        *
sl@0
   298
        * The parameter aList will be reset in the case
sl@0
   299
        *
sl@0
   300
        * @since S60 3.2
sl@0
   301
        * @param TAudioClientListType aFilter. Type of client list.
sl@0
   302
        * @param RArray<TProcessId>& aList. A reference to RArray.
sl@0
   303
        * @return TInt. KErrNone if successful. KErrBadName if
sl@0
   304
        *           aType is not one of the TAudioClientListType enumeration.
sl@0
   305
        *           Otherwise a systemwide error code.
sl@0
   306
        *           In case of error, the array aList will be reset.
sl@0
   307
        */
sl@0
   308
        TInt GetAudioClientsList(
sl@0
   309
                                CGlobalAudioSettings::TAudioClientListType aType,
sl@0
   310
                                RArray<TProcessId>& aList );
sl@0
   311
sl@0
   312
    
sl@0
   313
    private:
sl@0
   314
        CGlobalAudioSettingsImpl(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   315
                                 MAudioSettingsObserver& aAudioSettingsObserver);
sl@0
   316
        /**
sl@0
   317
        * Second Phase Costructor for GlobalAudioSettingsImpl Instance
sl@0
   318
        * @since 3.2
sl@0
   319
        * @param void
sl@0
   320
        */
sl@0
   321
        void ConstructL();
sl@0
   322
            
sl@0
   323
    private:
sl@0
   324
        TGlobalAudioSettings iGlobalAudioSettingsData;
sl@0
   325
        CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   326
        MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   327
        CWarningTonesObserverAO* iWarningTonesObserverAO;
sl@0
   328
        CMessagingTonesObserverAO* iMessagingTonesObserverAO;
sl@0
   329
        CSilentProfileObserverAO* iSilentProfileObserverAO;
sl@0
   330
        CVibraObserverAO* iVibraObserverAO;
sl@0
   331
        // Object managing Audio Clients List implementation
sl@0
   332
        CAudioClientsListManagerAO* iCAudioClientsListManagerAO;
sl@0
   333
        // Object managing Paused Clients List implementation
sl@0
   334
        CAudioClientsListManagerAO* iPausedClientsListManagerAO;              
sl@0
   335
        // List of Audio Clients List Observer objects
sl@0
   336
        RPointerArray<MAudioClientsListObserver> iAudioClientsListObserverArray;
sl@0
   337
        
sl@0
   338
        
sl@0
   339
        CMessageToneObserverAO* iMessageToneObserverAO;
sl@0
   340
        CEmailToneObserverAO* iEmailToneObserverAO;
sl@0
   341
        CRingingTypeObserverAO* iRingingTypeObserverAO;
sl@0
   342
        CVideoCallToneObserverAO* iVideoCallObserverAO;
sl@0
   343
        CRingingTone1ObserverAO* iRingingTone1ObserverAO;
sl@0
   344
        CRingingTone2ObserverAO* iRingingTone2ObserverAO;
sl@0
   345
        CKeypadToneObserverAO* iKeypadToneObserverAO;
sl@0
   346
        CSilenceModeObserverAO* iSilenceModeObserverAO;
sl@0
   347
    };
sl@0
   348
sl@0
   349
sl@0
   350
NONSHARABLE_CLASS(CWarningTonesObserverAO) : public CActive
sl@0
   351
	{
sl@0
   352
public:
sl@0
   353
    // Ist Phase constr and Destr
sl@0
   354
	static CWarningTonesObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   355
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   356
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   357
	~CWarningTonesObserverAO();
sl@0
   358
	void Subscribe();
sl@0
   359
sl@0
   360
protected:
sl@0
   361
	// From CActive
sl@0
   362
	void RunL();
sl@0
   363
	void DoCancel();
sl@0
   364
	TInt RunError(TInt aError);
sl@0
   365
sl@0
   366
private:
sl@0
   367
	// Constr and IInd phase constr
sl@0
   368
	CWarningTonesObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   369
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   370
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   371
	void ConstructL();
sl@0
   372
	CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   373
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   374
    RProperty iWarningTonesProperty;
sl@0
   375
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   376
	};
sl@0
   377
sl@0
   378
NONSHARABLE_CLASS(CMessagingTonesObserverAO) : public CActive
sl@0
   379
	{
sl@0
   380
public:
sl@0
   381
    // Ist Phase constr and Destr
sl@0
   382
	static CMessagingTonesObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   383
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   384
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   385
	~CMessagingTonesObserverAO();
sl@0
   386
	void Subscribe();
sl@0
   387
sl@0
   388
protected:
sl@0
   389
	// From CActive
sl@0
   390
	void RunL();
sl@0
   391
	void DoCancel();
sl@0
   392
	TInt RunError(TInt aError);
sl@0
   393
sl@0
   394
private:
sl@0
   395
	// Constr and IInd phase constr
sl@0
   396
	CMessagingTonesObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   397
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   398
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   399
	void ConstructL();
sl@0
   400
	CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   401
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   402
    RProperty iMessagingTonesProperty;
sl@0
   403
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   404
	};
sl@0
   405
	
sl@0
   406
NONSHARABLE_CLASS( CSilentProfileObserverAO) : public CActive
sl@0
   407
	{
sl@0
   408
public:
sl@0
   409
    // Ist Phase constr and Destr
sl@0
   410
	static CSilentProfileObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   411
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   412
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   413
	~CSilentProfileObserverAO();
sl@0
   414
	void Subscribe();
sl@0
   415
sl@0
   416
protected:
sl@0
   417
	// From CActive
sl@0
   418
	void RunL();
sl@0
   419
	void DoCancel();
sl@0
   420
	TInt RunError(TInt aError);
sl@0
   421
sl@0
   422
private:
sl@0
   423
	// Constr and IInd phase constr
sl@0
   424
	CSilentProfileObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   425
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   426
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   427
	void ConstructL();
sl@0
   428
	CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   429
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   430
    RProperty iSilentProfileProperty;
sl@0
   431
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   432
	};
sl@0
   433
sl@0
   434
NONSHARABLE_CLASS(CVibraObserverAO) : public CActive
sl@0
   435
	{
sl@0
   436
public:
sl@0
   437
    // Ist Phase constr and Destr
sl@0
   438
	static CVibraObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   439
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   440
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   441
	~CVibraObserverAO();
sl@0
   442
	void Subscribe();
sl@0
   443
sl@0
   444
protected:
sl@0
   445
	// From CActive
sl@0
   446
	void RunL();
sl@0
   447
	void DoCancel();
sl@0
   448
	TInt RunError(TInt aError);
sl@0
   449
sl@0
   450
private:
sl@0
   451
	// Constr and IInd phase constr
sl@0
   452
	CVibraObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   453
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   454
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   455
	void ConstructL();
sl@0
   456
	CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   457
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   458
    RProperty iVibraProperty;
sl@0
   459
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   460
	};
sl@0
   461
sl@0
   462
sl@0
   463
NONSHARABLE_CLASS(CRingingTypeObserverAO) : public CActive
sl@0
   464
    {
sl@0
   465
public:
sl@0
   466
    // Ist Phase constr and Destr
sl@0
   467
    static CRingingTypeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   468
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   469
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   470
    ~CRingingTypeObserverAO();
sl@0
   471
    void Subscribe();
sl@0
   472
sl@0
   473
protected:
sl@0
   474
    // From CActive
sl@0
   475
    void RunL();
sl@0
   476
    void DoCancel();
sl@0
   477
    TInt RunError(TInt aError);
sl@0
   478
sl@0
   479
private:
sl@0
   480
    // Constr and IInd phase constr
sl@0
   481
    CRingingTypeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   482
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   483
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   484
    void ConstructL();
sl@0
   485
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   486
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   487
    RProperty iRingingTypeProperty;
sl@0
   488
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   489
    };
sl@0
   490
sl@0
   491
NONSHARABLE_CLASS(CMessageToneObserverAO) : public CActive
sl@0
   492
    {
sl@0
   493
public:
sl@0
   494
    // Ist Phase constr and Destr
sl@0
   495
    static CMessageToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   496
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   497
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   498
    ~CMessageToneObserverAO();
sl@0
   499
    void Subscribe();
sl@0
   500
sl@0
   501
protected:
sl@0
   502
    // From CActive
sl@0
   503
    void RunL();
sl@0
   504
    void DoCancel();
sl@0
   505
    TInt RunError(TInt aError);
sl@0
   506
sl@0
   507
private:
sl@0
   508
    // Constr and IInd phase constr
sl@0
   509
    CMessageToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   510
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   511
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   512
    void ConstructL();
sl@0
   513
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   514
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   515
    RProperty iMessageToneNameProperty;
sl@0
   516
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   517
    };
sl@0
   518
sl@0
   519
NONSHARABLE_CLASS(CEmailToneObserverAO) : public CActive
sl@0
   520
    {
sl@0
   521
public:
sl@0
   522
    // Ist Phase constr and Destr
sl@0
   523
    static CEmailToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   524
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   525
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   526
    ~CEmailToneObserverAO();
sl@0
   527
    void Subscribe();
sl@0
   528
sl@0
   529
protected:
sl@0
   530
    // From CActive
sl@0
   531
    void RunL();
sl@0
   532
    void DoCancel();
sl@0
   533
    TInt RunError(TInt aError);
sl@0
   534
sl@0
   535
private:
sl@0
   536
    // Constr and IInd phase constr
sl@0
   537
    CEmailToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   538
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   539
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   540
    void ConstructL();
sl@0
   541
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   542
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   543
    RProperty iEmailToneNameProperty;
sl@0
   544
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   545
    };
sl@0
   546
sl@0
   547
NONSHARABLE_CLASS(CVideoCallToneObserverAO) : public CActive
sl@0
   548
    {
sl@0
   549
public:
sl@0
   550
    // Ist Phase constr and Destr
sl@0
   551
    static CVideoCallToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   552
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   553
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   554
    ~CVideoCallToneObserverAO();
sl@0
   555
    void Subscribe();
sl@0
   556
sl@0
   557
protected:
sl@0
   558
    // From CActive
sl@0
   559
    void RunL();
sl@0
   560
    void DoCancel();
sl@0
   561
    TInt RunError(TInt aError);
sl@0
   562
sl@0
   563
private:
sl@0
   564
    // Constr and IInd phase constr
sl@0
   565
    CVideoCallToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   566
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   567
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   568
    void ConstructL();
sl@0
   569
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   570
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   571
    RProperty iVideoCallToneNameProperty;
sl@0
   572
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   573
    };
sl@0
   574
sl@0
   575
NONSHARABLE_CLASS(CRingingTone1ObserverAO) : public CActive
sl@0
   576
    {
sl@0
   577
public:
sl@0
   578
    // Ist Phase constr and Destr
sl@0
   579
    static CRingingTone1ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   580
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   581
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   582
    ~CRingingTone1ObserverAO();
sl@0
   583
    void Subscribe();
sl@0
   584
sl@0
   585
protected:
sl@0
   586
    // From CActive
sl@0
   587
    void RunL();
sl@0
   588
    void DoCancel();
sl@0
   589
    TInt RunError(TInt aError);
sl@0
   590
sl@0
   591
private:
sl@0
   592
    // Constr and IInd phase constr
sl@0
   593
    CRingingTone1ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   594
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   595
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   596
    void ConstructL();
sl@0
   597
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   598
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   599
    RProperty iRingingTone1NameProperty;
sl@0
   600
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   601
    };
sl@0
   602
sl@0
   603
NONSHARABLE_CLASS(CRingingTone2ObserverAO) : public CActive
sl@0
   604
    {
sl@0
   605
public:
sl@0
   606
    // Ist Phase constr and Destr
sl@0
   607
    static CRingingTone2ObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   608
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   609
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   610
    ~CRingingTone2ObserverAO();
sl@0
   611
    void Subscribe();
sl@0
   612
sl@0
   613
protected:
sl@0
   614
    // From CActive
sl@0
   615
    void RunL();
sl@0
   616
    void DoCancel();
sl@0
   617
    TInt RunError(TInt aError);
sl@0
   618
sl@0
   619
private:
sl@0
   620
    // Constr and IInd phase constr
sl@0
   621
    CRingingTone2ObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   622
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   623
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   624
    void ConstructL();
sl@0
   625
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   626
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   627
    RProperty iRingingTone2NameProperty;
sl@0
   628
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   629
    };
sl@0
   630
sl@0
   631
NONSHARABLE_CLASS(CKeypadToneObserverAO) : public CActive
sl@0
   632
    {
sl@0
   633
public:
sl@0
   634
    // Ist Phase constr and Destr
sl@0
   635
    static CKeypadToneObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   636
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   637
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   638
    ~CKeypadToneObserverAO();
sl@0
   639
    void Subscribe();
sl@0
   640
sl@0
   641
protected:
sl@0
   642
    // From CActive
sl@0
   643
    void RunL();
sl@0
   644
    void DoCancel();
sl@0
   645
    TInt RunError(TInt aError);
sl@0
   646
sl@0
   647
private:
sl@0
   648
    // Constr and IInd phase constr
sl@0
   649
    CKeypadToneObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   650
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   651
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   652
    void ConstructL();
sl@0
   653
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   654
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   655
    RProperty iKeypadToneVolumeProperty;
sl@0
   656
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   657
    };
sl@0
   658
sl@0
   659
NONSHARABLE_CLASS(CSilenceModeObserverAO) : public CActive
sl@0
   660
    {
sl@0
   661
public:
sl@0
   662
    // Ist Phase constr and Destr
sl@0
   663
    static CSilenceModeObserverAO* NewL(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   664
                                         MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   665
                                         TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   666
    ~CSilenceModeObserverAO();
sl@0
   667
    void Subscribe();
sl@0
   668
sl@0
   669
protected:
sl@0
   670
    // From CActive
sl@0
   671
    void RunL();
sl@0
   672
    void DoCancel();
sl@0
   673
    TInt RunError(TInt aError);
sl@0
   674
sl@0
   675
private:
sl@0
   676
    // Constr and IInd phase constr
sl@0
   677
    CSilenceModeObserverAO(CGlobalAudioSettings &aGlobalAudioSettings,
sl@0
   678
                                                 MAudioSettingsObserver& aAudioSettingsObserver,
sl@0
   679
                                                 TGlobalAudioSettings& aGlobalAudioSettingsData);
sl@0
   680
    void ConstructL();
sl@0
   681
    CGlobalAudioSettings& iGlobalAudioSettings;
sl@0
   682
    MAudioSettingsObserver&   iAudioSettingsObserver;
sl@0
   683
    RProperty iSilenceModeProperty;
sl@0
   684
    TGlobalAudioSettings& iGlobalAudioSettingsData;
sl@0
   685
    };
sl@0
   686
#endif // GLOBALAUDIOSETTINGSIMPL_H
sl@0
   687
sl@0
   688
// End of file