emailservices/emailserver/cmailhandlerplugin/inc/memailsoundstatecontext.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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: This file defines email sound state classes.
       
    15 *
       
    16 */
       
    17  
       
    18 #ifndef MEMAILSOUNDSTATECONTEXT_H
       
    19 #define MEMAILSOUNDSTATECONTEXT_H
       
    20 
       
    21 #include <e32std.h>
       
    22 
       
    23 class CMdaAudioPlayerUtility;
       
    24 class CEmailSoundState;
       
    25 
       
    26 /**
       
    27  * Interface for sound states
       
    28  * @since S60 v5.1
       
    29  */
       
    30 class MEmailSoundStateContext 
       
    31 {
       
    32 public:
       
    33     
       
    34     /**
       
    35     * Sets active state
       
    36     * @param aNewState active state
       
    37     */
       
    38     virtual void SetState( CEmailSoundState* aNewState ) = 0;
       
    39     
       
    40     /**
       
    41     * Returns audio player utility pointer, ownership is not transferred.  
       
    42     * @return audio player utility or NULL.
       
    43     */
       
    44     virtual CMdaAudioPlayerUtility* AudioPlayer() = 0;
       
    45     
       
    46     /** Creates audio player utility. Old player instance is deleted if 
       
    47      * it exists. AudioPlayer() can be called to access initialized player
       
    48      * after state receives AudioInitCompleted() event.
       
    49      */
       
    50     virtual void RecreateAudioPlayerL() = 0;
       
    51     
       
    52     /**
       
    53     * Releases audio player. After calling this method AudioPlayer() will return 
       
    54     * NULL until RecreateAudioPlayerL is succesfully called.
       
    55     */
       
    56     virtual void ReleaseAudioPlayer() = 0;
       
    57 
       
    58     /**
       
    59      * Returns profile engine reference
       
    60      * @return profile engine
       
    61      */
       
    62     virtual MProfileEngine& ProfileEngine() const = 0;
       
    63 };
       
    64 
       
    65 
       
    66 #endif // MEMAILSOUNDSTATECONTEXT_H