mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackpluginobserver.h
changeset 0 a2952bb97e68
child 9 bee149131e4b
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Player plugin observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMPXMPLAYBACKPLUGINOBSERVER_H
       
    20 #define MMPXMPLAYBACKPLUGINOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <mpxplaybackengineobserver.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 
       
    32 /**
       
    33 *  Observer interface for playback plugin.
       
    34 *
       
    35 *  @lib mpxcommon.lib
       
    36 */
       
    37 NONSHARABLE_CLASS(MMPXPlaybackPluginObserver) : public MMPXPlaybackEngineObserver
       
    38     {
       
    39 public:
       
    40     /** 
       
    41     *  Event for observer.
       
    42     *
       
    43     *  @deprecated Use CMPXMessage definition instead.
       
    44     */ 
       
    45     enum TEvent 
       
    46         { 
       
    47         EPInitialised,   // 0 async response for Initialise, aData=duration
       
    48         EPPlaying,       // 1 async response for Play
       
    49         EPPlayComplete,  // 2
       
    50         EPPaused,        // 3 async response for Pause
       
    51         EPStopped,       // 4 async response for Stop
       
    52         EPClosed,        // 5 async response for Close, or Close when stop. aData=command id
       
    53         EPSetComplete,   // 6 async response for SetL aData=propoerty
       
    54         EPActive,        // 7 aData=ETrue/EFalse
       
    55         EPSupportedFeaturesChanged,  // 8 aData=supported featured
       
    56         EPDurationChanged,           // 9 aData=duration in ms.
       
    57         EPDownloadPositionChanged,   // 10
       
    58         EPDownloadStateChanged,      // 11
       
    59         EPDownloadCmdPauseDownload,  // 12
       
    60         EPDownloadCmdResumeDownload, // 13
       
    61         EPDownloadCmdCancelDownload, // 14
       
    62         EPDownloadStarted,     // 15 aData=total expected bytes
       
    63         EPDownloadingUpdated,  // 16 aData=total bytes so far
       
    64         EPDownloadingCanceled, // 17 aData=total bytes so far
       
    65         EPDownloadingComplete, // 18 aData=total bytes downloaded
       
    66         EPSubPlayersChanged,   // 19
       
    67         EPPlayerUnavailable,   // 20
       
    68         EPVolumeChanged,       // 21 aData=volume level
       
    69         EPMuteChanged,         // 22 aData=mute value
       
    70         EPPluginSeeking,       // 23 Plugin transition to seeking state
       
    71         EPPositionChanged,     // 24 aData=new position
       
    72         EPBufferingStarted,     // 25 
       
    73         EPDownloadFileMoved
       
    74         };
       
    75 public:
       
    76 
       
    77     /** 
       
    78     * Handle plugin event.
       
    79     *
       
    80     * @since S60 3.2.3
       
    81     * @param aEvent the event type
       
    82     * @param aData optional data
       
    83     * @param aError error code of the event
       
    84     * @deprecated Use method MMPXPlaybackPluginObserver::HandlePlaybackMessage
       
    85     *    (CMPXMessage* aMsg, TInt aErr) instead.
       
    86     */
       
    87     virtual void HandlePluginEvent(TEvent aEvent,TInt aData,TInt aError)=0;
       
    88 
       
    89     /** 
       
    90      * Handle message from plug-in.
       
    91      *
       
    92      * @since S60 3.2.3
       
    93      * @param aMsg message from the plug-in
       
    94      * @deprecated Use method MMPXPlaybackPluginObserver::HandlePlaybackMessage
       
    95     *    (CMPXMessage* aMsg, TInt aErr) instead.
       
    96     */
       
    97     virtual void HandlePlaybackMessage(const CMPXMessage& aMsg) 
       
    98         {
       
    99         HandlePlaybackMessage(const_cast<CMPXMessage*>(&aMsg), KErrNone);
       
   100         }
       
   101     
       
   102     /**
       
   103      * Handle message from plug-in.
       
   104      * TO DO: make it as pure virtual when previous callback removed.
       
   105      *
       
   106      * @since S60 3.2.3
       
   107      * @param aMsg message from the plug-in. Ownership not transferred.
       
   108      * @param aErr system error code. if aErr is not KErrNone, aMsg will not be 
       
   109      *             used
       
   110      */
       
   111     virtual void HandlePlaybackMessage(CMPXMessage* /*aMsg*/, 
       
   112                                        TInt /*aErr*/) {}
       
   113     };
       
   114 
       
   115 #endif      // MMPXMPLAYBACKPLUGINOBSERVER_H
       
   116 
       
   117 // End of file