mpxmusicplayer/activeidle/aiplayerplugin/inc/aiplayerpluginengineobserver.h
branchRCL_3
changeset 9 13afc0e517bd
parent 5 2a40e88564c8
child 11 943ff5625028
equal deleted inserted replaced
5:2a40e88564c8 9:13afc0e517bd
     1 /*
       
     2 * Copyright (c)  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:  Music Player stautus observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_AIPLAYERPLUGINENGINEOBSERVER_H
       
    20 #define M_AIPLAYERPLUGINENGINEOBSERVER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 /**
       
    25  *  Player state.
       
    26  */
       
    27 enum TMPlayerState
       
    28     {
       
    29     EMPlayerStatePlaying,
       
    30     EMPlayerStatePaused,
       
    31     EMPlayerStateSeeking,
       
    32     EMPlayerStateOther
       
    33     };
       
    34 
       
    35 /**
       
    36  *  Observer interface to be implemented by a client of AiPlayerPluginEngine.
       
    37  *
       
    38  *  @lib aiplayerplugin2.lib
       
    39  *  @since S60 5.0
       
    40  */
       
    41 class MAiPlayerPluginEngineObserver
       
    42     {
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Called when active player instance's state changes
       
    47      *
       
    48      * @since S60 5.0
       
    49      * @param aState Active player state
       
    50      * @see TMPlayerState
       
    51      */
       
    52     virtual void PlayerStateChanged( TMPlayerState aState ) = 0;
       
    53 
       
    54     /**
       
    55      * Called when track info changes (i.e. track changes or current track's
       
    56      * info is updated) in the active player instance.
       
    57      *
       
    58      * @since S60 5.0
       
    59      * @param aTitle Current track's title.
       
    60      * @param aArtist Current track's artist.
       
    61      */
       
    62     virtual void TrackInfoChanged( const TDesC& aTitle, const TDesC& aArtist ) = 0;
       
    63 
       
    64     /**
       
    65      * Called each second during playback.
       
    66      *
       
    67      * @since S60 5.0
       
    68      * @param aPosition Current playback position in seconds.
       
    69      */
       
    70     virtual void PlaybackPositionChanged( TInt aPosition ) = 0;
       
    71 
       
    72     /**
       
    73      * Called when the player volume is changed.
       
    74      *
       
    75      * @since S60 5.0
       
    76      * @param aVolume volume level.
       
    77      */
       
    78     virtual void VolumeChanged( TInt aVolume ) = 0;
       
    79     };
       
    80 
       
    81 
       
    82 #endif // ?M_AIPLAYERPLUGINENGINEOBSERVER_H