mmserv/sts/sts/inc/stssettingsmanager.h
changeset 47 c2e43643db4c
equal deleted inserted replaced
42:1fa3fb47b1e3 47:c2e43643db4c
       
     1 /*
       
     2  * Copyright (c) 2010 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:
       
    15  * This file defines the interface for creating, playing,
       
    16  * stopping, and deleting an MMF player for a tone type.
       
    17  */
       
    18 #ifndef STSSETTINGSMANAGER_H_
       
    19 #define STSSETTINGSMANAGER_H_
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <MProEngActiveProfileObserver.h>
       
    23 #include <MProEngProfileActivationObserver.h>
       
    24 #include <systemtoneservice.h>
       
    25 
       
    26 class CStsPlayerSettings;
       
    27 class MProEngEngine;
       
    28 class MProEngNotifyHandler;
       
    29 
       
    30 class CStsSettingsManager : private MProEngActiveProfileObserver,
       
    31         MProEngProfileActivationObserver
       
    32     {
       
    33 public:
       
    34     static CStsSettingsManager* Create();
       
    35     static void Delete(CStsSettingsManager* aStsSettingsManager);
       
    36 
       
    37 public:
       
    38     // Data types
       
    39     class MPlayerSettings
       
    40         {
       
    41     public:
       
    42         virtual TPtrC GetFileName() = 0;
       
    43         virtual int GetNumberOfRepeats() = 0;
       
    44         virtual TTimeIntervalMicroSeconds& GetRepeatDelay() = 0;
       
    45         virtual int GetVolumePercentage() = 0;
       
    46         virtual TTimeIntervalMicroSeconds& GetVolumeRamp() = 0;
       
    47         };
       
    48 
       
    49     MPlayerSettings& GetPlayerSettings(CSystemToneService::TAlarmType aAlarm);
       
    50     MPlayerSettings& GetPlayerSettings(CSystemToneService::TToneType aTone);
       
    51     void GetAudioPriorityPref(CSystemToneService::TAlarmType aAlarm,
       
    52             TUint& aPriority, TUint& aPreference);
       
    53     void GetAudioPriorityPref(CSystemToneService::TToneType aTone,
       
    54             TUint& aPriority, TUint& aPreference);
       
    55 
       
    56 protected:
       
    57     CStsSettingsManager();
       
    58     virtual ~CStsSettingsManager();
       
    59     bool Init();
       
    60 
       
    61 private:
       
    62     bool LoadActiveProfileSettings();
       
    63     // inherited from MProEngActiveProfileObserver
       
    64     virtual void HandleActiveProfileModifiedL();
       
    65     //inherited from MProEngProfileActivationObserver
       
    66     virtual void HandleProfileActivatedL(TInt aProfileId);
       
    67 
       
    68     MProEngEngine* iEngine;
       
    69     MProEngNotifyHandler* iNotifyHandler;
       
    70     CStsPlayerSettings* iPlayerSettings;
       
    71     };
       
    72 
       
    73 #endif //STSSETTINGSMANAGER_H_