upnpavcontroller/upnprenderingstatemachine/inc/upnprenderingstatemachineobserver.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
       
     1 /*
       
     2 * Copyright (c) 2007,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:  Observer for the generic upnp rendering state machine
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
       
    19 #define C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include "upnprenderingstatemachineconstants.h" // for types
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 
       
    30 /**
       
    31  * Class for receiving callbacks from
       
    32  * rendering state machine
       
    33  *
       
    34  * @lib upnprenderingstatemachine.lib
       
    35  */
       
    36 class MUpnpRenderingStateMachineObserver
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Indicates state machine has been synchronised with the renderer
       
    42      * @param aError error that occurred during sync
       
    43      */
       
    44     virtual void RendererSyncReady( TInt aError,
       
    45         Upnp::TState aState ) = 0;
       
    46 
       
    47     /**
       
    48      * Indicates renderer state has changed
       
    49      * either by request or spontanelously.
       
    50      * @param aError the error code
       
    51      * @param aState the new state
       
    52      * @param aUserOriented ETrue if this responds to a request
       
    53      * @param aStateParam extra info depending on the state change
       
    54      */
       
    55     virtual void RenderingStateChanged(
       
    56         TInt aError,
       
    57         Upnp::TState aState,
       
    58         TBool aUserOriented,
       
    59         TInt aStateParam ) = 0;
       
    60 
       
    61     /**
       
    62      * Synchronises UI with media duration and current position
       
    63      * this callback can be either automatic or explicitly requested
       
    64      * @param aError error that occurred during position sync
       
    65      * @param aMode mode in which the track is progressing
       
    66      * @param aDuration media duration in milliseconds
       
    67      * @param aPosition current position in milliseconds
       
    68      */
       
    69     virtual void PositionSync( TInt aError,
       
    70         Upnp::TPositionMode aMode,
       
    71         TInt aDuration, TInt aPosition ) = 0;
       
    72 
       
    73     };
       
    74 
       
    75 
       
    76 #endif // C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
       
    77