javauis/amms_qt/mmacontrol/inc.emc/cammsemcbasemmfdevsound.h
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Utility to get the preset and data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSEMCBASEMMFDEVSOUND_H
       
    20 #define CAMMSEMCBASEMMFDEVSOUND_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <badesca.h>
       
    25 #include <mmf/server/sounddevice.h>
       
    26 #include <mmf/common/mmfbase.h>
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  *  Group for effect controls
       
    33  *
       
    34  *  @since 5.1
       
    35  */
       
    36 NONSHARABLE_CLASS(CAMMSEMCBaseMMFDevSound)
       
    37         :public CBase, public MDevSoundObserver
       
    38 {
       
    39 public:  // destructor
       
    40     /**
       
    41     * Destructor.
       
    42     */
       
    43     virtual ~CAMMSEMCBaseMMFDevSound();
       
    44 
       
    45 public:  // From MDevSoundObserver
       
    46 
       
    47     // empty implementation for callback methods from MDevSoundObserver
       
    48     virtual void InitializeComplete(TInt aError);
       
    49     virtual void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}
       
    50     virtual void PlayError(TInt /*aError*/) {}
       
    51 
       
    52     virtual void ToneFinished(TInt /*aError*/) {}
       
    53     virtual void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}
       
    54     virtual void RecordError(TInt /*aError*/) {}
       
    55     virtual void ConvertError(TInt /*aError*/) {}
       
    56     virtual void DeviceMessage(TUid /*aMessageType*/,
       
    57                                const TDesC8& /*aMsg*/) {}
       
    58     virtual void SendEventToClient(const TMMFEvent& /*aEvent*/) {}
       
    59 
       
    60 
       
    61 protected:
       
    62     virtual TInt CreateAndInitializeDevSoundL();
       
    63 
       
    64     /**
       
    65      * Deletes utilities
       
    66      * Does nothing if the utilities have already been deleted.
       
    67      */
       
    68     virtual void DeleteDevSound();
       
    69 
       
    70 public:
       
    71     /**
       
    72      * c++ constructor.
       
    73      */
       
    74     CAMMSEMCBaseMMFDevSound();
       
    75     /**
       
    76      * 2nd phase constructor.
       
    77      */
       
    78 
       
    79     void ConstructL();
       
    80 
       
    81 protected:
       
    82 
       
    83     CMMFDevSound* iMMFDevSound;
       
    84 
       
    85 
       
    86 private:
       
    87     // Used to wait for Initializing the iMMFDevSound.
       
    88     CActiveSchedulerWait* iActiveSchedulerWait; // Owned.
       
    89 
       
    90 };
       
    91 
       
    92 #endif // CAMMSEMCBASEMMFDEVSOUND_H
       
    93 
       
    94