phoneapp/phoneuiview/inc/mphoneaudioplayerobserver.h
changeset 21 92ab7f8d0eab
parent 4 c84cf270c54f
child 22 6bb1b21d2484
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Observer interface for audio player.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPHONEAUDIOPLAYEROBSERVER_H
       
    20 #define MPHONEAUDIOPLAYEROBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "phoneconstants.h"
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  Observer interface for audio player.
       
    29 *
       
    30 * @since 1.0
       
    31 */
       
    32 class MPhoneAudioPlayerObserver
       
    33     {
       
    34     public:  // Constructors and destructor
       
    35         
       
    36         // Enumerates different failures.
       
    37         //
       
    38         // EAudioPlayerInitializingFailure - failure in initialising
       
    39         // EAudioPlayerPlayingFailure - failure during playing
       
    40         enum TPhoneAudioPlayerErrorEvent
       
    41             {
       
    42             EAudioPlayerInitializingFailure,
       
    43             EAudioPlayerPlayingFailure
       
    44             };
       
    45         
       
    46         /**
       
    47         * Observe the error.
       
    48         * @param aEvent the error event happend in initializing or playing.
       
    49         * @param aError The error code return by audio server. Observer can 
       
    50         *               handle  these two error code for recoverable 
       
    51         *               and unrecoverable errors.
       
    52         * @param aId Indicate which audio player is outof working.
       
    53         */
       
    54         virtual void HandleAudioPlayerError( 
       
    55             TPhoneAudioPlayerErrorEvent aEvent,
       
    56             TInt aError, 
       
    57             TInt aId = KPhoneAudioPlayerNotSpecified ) = 0;
       
    58 
       
    59         /**
       
    60         * This function is called when audio player initialization complete.
       
    61         * @param aId The id of the audio player.
       
    62         */
       
    63         virtual void HandleAudioPlayerInitComplete(
       
    64             TInt aId = KPhoneAudioPlayerNotSpecified ) = 0;
       
    65 
       
    66         /**
       
    67         * This funciton is called after the playing complete successfully.
       
    68         * @param aId The id of the audio player.
       
    69         */
       
    70         virtual void HandlePlayingComplete( 
       
    71             TInt aId = KPhoneAudioPlayerNotSpecified ) = 0;
       
    72     };
       
    73 
       
    74 #endif      // MPHONEAUDIOPLAYEROBSERVER_H   
       
    75             
       
    76 // End of File