musichomescreen_multiview/mcpmusicplayer/inc/aiplayerpluginengineobserver.h
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2009 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 /**
       
    26  *  Player state.
       
    27  */
       
    28 enum TMPlayerState
       
    29     {
       
    30     EMPlayerStatePlaying,
       
    31     EMPlayerStatePaused,
       
    32     EMPlayerStateSeeking,
       
    33     EMPlayerStateOther,
       
    34     EMPlayerStateStarting,
       
    35     EMPlayerStateStopped
       
    36     };
       
    37 
       
    38 class CFbsBitmap;
       
    39 
       
    40 /**
       
    41  *  Observer interface to be implemented by a client of AiPlayerPluginEngine.
       
    42  *
       
    43  *  @lib aiplayerplugin2.lib
       
    44  *  @since S60 5.0
       
    45  */
       
    46 class MAiPlayerPluginEngineObserver
       
    47     {
       
    48 public:
       
    49 
       
    50     /**
       
    51      * Called when active player instance's state changes
       
    52      *
       
    53      * @since S60 5.0
       
    54      * @param aState Active player state
       
    55      * @see TMPlayerState
       
    56      */
       
    57     virtual void PlayerStateChanged( TMPlayerState aState ) = 0;
       
    58 
       
    59     /**
       
    60      * Called when track info changes (i.e. track changes or current track's
       
    61      * info is updated) in the active player instance.
       
    62      *
       
    63      * @since S60 5.0
       
    64      * @param aTitle Current track's title.
       
    65      * @param aArtist Current track's artist.
       
    66      */
       
    67     virtual void TrackInfoChanged( const TDesC& aTitle, 
       
    68             const TDesC& aArtist ) = 0;
       
    69 
       
    70     /**
       
    71      * Called each second during playback.
       
    72      *
       
    73      * @since S60 5.0
       
    74      * @param aPosition Current playback position in seconds.
       
    75      */
       
    76     virtual void PlaybackPositionChanged( TInt aPosition ) = 0;
       
    77 
       
    78     /**
       
    79      * Called when album art is ready or when there is no album art.
       
    80      *
       
    81      * @since S60 5.0
       
    82      * @param aBitmap the new album art.
       
    83      */
       
    84     virtual void AlbumArtChanged( CFbsBitmap* aBitmap ) = 0;
       
    85     
       
    86     /**
       
    87      * Called When there is an ongoing operation.
       
    88      *
       
    89      * @since S60 5.0
       
    90      */
       
    91     virtual void Opening() = 0;
       
    92     
       
    93     /**
       
    94      * Called when to indicate that the playlist changed and it is empty.
       
    95      *
       
    96      * @since S60 5.0
       
    97      * @param aBitmap the new album art.
       
    98      */
       
    99     virtual void PlaylisIsEmpty() = 0;
       
   100 
       
   101     };
       
   102 
       
   103 
       
   104 #endif // ?M_AIPLAYERPLUGINENGINEOBSERVER_H