upnpavcontroller/upnprenderingstatemachine/inc/upnprenderingstatemachineobserver.h
author Sampo Huttunen <sampo.huttunen@nokia.com>
Wed, 03 Nov 2010 11:45:09 +0200
branchIOP_Improvements
changeset 40 08b5eae9f9ff
permissions -rw-r--r--
merge from Nokia's internal development branch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     1
/*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2007,2009 Nokia Corporation and/or its subsidiary(-ies).
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     8
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    11
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    12
* Contributors:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    13
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    14
* Description:  Observer for the generic upnp rendering state machine
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    15
*
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    16
*/
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    17
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    18
#ifndef C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    19
#define C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    20
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    21
// INCLUDES
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    22
#include <e32base.h>
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    23
#include "upnprenderingstatemachineconstants.h" // for types
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    24
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    25
// FORWARD DECLARATIONS
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    26
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    27
// CONSTANTS
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    28
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    29
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    30
/**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    31
 * Class for receiving callbacks from
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    32
 * rendering state machine
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    33
 *
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    34
 * @lib upnprenderingstatemachine.lib
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    35
 */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    36
class MUpnpRenderingStateMachineObserver
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    37
    {
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    38
public:
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    39
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    40
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    41
     * Indicates state machine has been synchronised with the renderer
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    42
     * @param aError error that occurred during sync
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    43
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    44
    virtual void RendererSyncReady( TInt aError,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    45
        Upnp::TState aState ) = 0;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    46
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    47
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    48
     * Indicates renderer state has changed
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    49
     * either by request or spontanelously.
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    50
     * @param aError the error code
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    51
     * @param aState the new state
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    52
     * @param aUserOriented ETrue if this responds to a request
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    53
     * @param aStateParam extra info depending on the state change
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    54
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    55
    virtual void RenderingStateChanged(
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    56
        TInt aError,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    57
        Upnp::TState aState,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    58
        TBool aUserOriented,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    59
        TInt aStateParam ) = 0;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    60
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    61
    /**
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    62
     * Synchronises UI with media duration and current position
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    63
     * this callback can be either automatic or explicitly requested
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    64
     * @param aError error that occurred during position sync
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    65
     * @param aMode mode in which the track is progressing
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    66
     * @param aDuration media duration in milliseconds
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    67
     * @param aPosition current position in milliseconds
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    68
     */
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    69
    virtual void PositionSync( TInt aError,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    70
        Upnp::TPositionMode aMode,
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    71
        TInt aDuration, TInt aPosition ) = 0;
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    72
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    73
    };
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    74
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    75
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    76
#endif // C_UPNPRENDERINGSTATEMACHINEOBSERVER_H
08b5eae9f9ff merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff changeset
    77