mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackengineobserver.h
changeset 0 a2952bb97e68
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:  playback engine observer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MMPXPLAYBACKENGINEOBSERVER_H
       
    21 #define MMPXPLAYBACKENGINEOBSERVER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <mpxplaybackframeworkdefs.h>
       
    26 #include <mpxmessage2.h>
       
    27 #include <mpxcommand.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CMPXMedia;
       
    31 
       
    32 /**
       
    33 *  Interface for handling active engine.
       
    34 *
       
    35 *  @lib mpxcommon.lib
       
    36 */
       
    37 NONSHARABLE_CLASS(MMPXPlaybackEngineObserver)
       
    38     {
       
    39 public:
       
    40     /**
       
    41     *  Handle playback property.
       
    42     *
       
    43     *  @since S60 3.2.3
       
    44     *  @param aProperty the property
       
    45     *  @param aValue the value of the property
       
    46     *  @param aError error code
       
    47     */
       
    48     virtual void HandleProperty(TMPXPlaybackProperty aProperty,
       
    49                                 TInt aValue, 
       
    50                                 TInt aError) = 0;
       
    51     
       
    52     /**
       
    53     *  Method is called continously until aComplete=ETrue, signifying that 
       
    54     *  it is done and there will be no more callbacks.
       
    55     *  Only new items are passed each time.
       
    56     *
       
    57     *  @since S60 3.2.3
       
    58     *  @param aPlayer UID of the subplayer
       
    59     *  @param aSubPlayers a list of sub players
       
    60     *  @param aComplete ETrue no more sub players. EFalse more subplayer
       
    61     *                   expected
       
    62     *  @param aError error code
       
    63     */
       
    64     virtual void HandleSubPlayerNames(TUid aPlayer, 
       
    65                                       const MDesCArray* aSubPlayers,
       
    66                                       TBool aComplete,
       
    67                                       TInt aError) = 0;
       
    68     
       
    69     /** 
       
    70     * 
       
    71     *  Call back of media request.
       
    72     * 
       
    73     *  @since S60 3.2.3
       
    74     *  @param aMedia media 
       
    75     *  @param aError error code  
       
    76     *  
       
    77     *  @deprecated Use method MMPXPlaybackEngineObserver::HandleMedia(
       
    78     *         CMPXMedia* aMedia, TInt aError) instead.
       
    79     *
       
    80     */
       
    81     virtual void HandleMedia(const CMPXMedia& aMedia,
       
    82                              TInt aError)
       
    83         {
       
    84         HandleMedia(const_cast<CMPXMedia*>(&aMedia), aError);
       
    85         }
       
    86 
       
    87     /**  
       
    88     *  Call back of media request.
       
    89     *
       
    90     *  @since S60 3.2.3
       
    91     *  @param aMedia media object. Ownership not transferred.
       
    92     *  @param aError error code
       
    93     */
       
    94      virtual void HandleMedia(CMPXMedia* /*aMedia*/,
       
    95                               TInt /*aError*/)
       
    96          {
       
    97          // Note: change it into pure virtual after plugins update
       
    98          }
       
    99     
       
   100     /**
       
   101     *  Handle completion of a asynchronous command.
       
   102     *
       
   103     *  @since S60 3.2.3
       
   104     *  @param aCommandResult result of the command, NULL if error
       
   105     *  @param aError error code    
       
   106     */
       
   107     virtual void HandlePlaybackCommandComplete(CMPXCommand* /*aCommandResult*/, 
       
   108                                                TInt /*aError*/) {} 
       
   109     };
       
   110           
       
   111 #endif // MMPXPLAYBACKENGINEOBSERVER_H
       
   112             
       
   113 // End of File