videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxplaybackutility.h
author hgs
Fri, 23 Jul 2010 11:10:06 +0300
changeset 49 824471cb468a
parent 44 518105d52e45
child 63 4707a0db12f6
permissions -rw-r--r--
201029
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  Implementation of interface for playbackutility
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
// Version : %version:  3 %
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#ifndef CMPXPLAYBACKUTILITY_H
hgs
parents:
diff changeset
    21
#define CMPXPLAYBACKUTILITY_H
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
#include <e32base.h>
hgs
parents:
diff changeset
    24
#include <mpxcommand.h>
hgs
parents:
diff changeset
    25
#include <mpxattributespecs.h>
hgs
parents:
diff changeset
    26
#include <mpxplaybackcommanddefs.h>
hgs
parents:
diff changeset
    27
#include <mpxplaybackframeworkdefs.h>
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
class TMPXAttribute;
hgs
parents:
diff changeset
    30
class MMPXPlaybackObserver;
hgs
parents:
diff changeset
    31
class CMPXCollectionPlaylist;
hgs
parents:
diff changeset
    32
class MMPXPlaybackCallback;
hgs
parents:
diff changeset
    33
class CMPXPlaybackUtility;
hgs
parents:
diff changeset
    34
hgs
parents:
diff changeset
    35
class MMPXSource
hgs
parents:
diff changeset
    36
{
hgs
parents:
diff changeset
    37
    public:
hgs
parents:
diff changeset
    38
        virtual CMPXCollectionPlaylist* PlaylistL() = 0;
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
        virtual void MediaL( const TArray<TMPXAttribute>& aAttrs,
hgs
parents:
diff changeset
    41
                             MMPXPlaybackCallback& aCallback,
hgs
parents:
diff changeset
    42
                             CMPXAttributeSpecs* aSpecs ) = 0;
hgs
parents:
diff changeset
    43
hgs
parents:
diff changeset
    44
        virtual void MediaL( const TArray<TMPXAttribute>& aAttrs,
hgs
parents:
diff changeset
    45
                             MMPXPlaybackCallback& aCallback ) = 0;
hgs
parents:
diff changeset
    46
};
hgs
parents:
diff changeset
    47
hgs
parents:
diff changeset
    48
class MMPXPlaybackUtility : public CBase
hgs
parents:
diff changeset
    49
{
hgs
parents:
diff changeset
    50
    public:
hgs
parents:
diff changeset
    51
        static MMPXPlaybackUtility* UtilityL( const TMPXCategory aCategory,
hgs
parents:
diff changeset
    52
                                              const TUid& aModeId = KPbModeDefault );
hgs
parents:
diff changeset
    53
hgs
parents:
diff changeset
    54
        virtual TMPXPlaybackState StateL() const = 0;
hgs
parents:
diff changeset
    55
        virtual void AddObserverL( MMPXPlaybackObserver& aObs ) = 0;
hgs
parents:
diff changeset
    56
        virtual void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL ) = 0;
hgs
parents:
diff changeset
    57
        virtual void CommandL( TMPXPlaybackCommand aCmd ) = 0;
hgs
parents:
diff changeset
    58
        virtual MMPXSource* Source() = 0;
hgs
parents:
diff changeset
    59
        virtual void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty ) = 0;
hgs
parents:
diff changeset
    60
        virtual void RemoveObserverL( MMPXPlaybackObserver& aObs ) = 0;
hgs
parents:
diff changeset
    61
        virtual void Close() = 0;
hgs
parents:
diff changeset
    62
        virtual void SetPrimaryClientL() = 0;
hgs
parents:
diff changeset
    63
        virtual void SetL( TMPXPlaybackProperty aProperty,TInt aValue ) = 0;
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
    public:
hgs
parents:
diff changeset
    66
        TMPXPlaybackState iState;
hgs
parents:
diff changeset
    67
        TMPXPlaybackProperty iProperty;
hgs
parents:
diff changeset
    68
        TInt iPropertyValue;
hgs
parents:
diff changeset
    69
        TInt iCommand;
hgs
parents:
diff changeset
    70
};
hgs
parents:
diff changeset
    71
hgs
parents:
diff changeset
    72
class CMPXPlaybackUtility : public MMPXPlaybackUtility,
hgs
parents:
diff changeset
    73
                            public MMPXSource
hgs
parents:
diff changeset
    74
{
hgs
parents:
diff changeset
    75
    public:
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
        static CMPXPlaybackUtility* NewL();
hgs
parents:
diff changeset
    78
hgs
parents:
diff changeset
    79
        ~CMPXPlaybackUtility();
hgs
parents:
diff changeset
    80
hgs
parents:
diff changeset
    81
    private:
hgs
parents:
diff changeset
    82
hgs
parents:
diff changeset
    83
        CMPXPlaybackUtility();
hgs
parents:
diff changeset
    84
hgs
parents:
diff changeset
    85
        void ConstructL();
hgs
parents:
diff changeset
    86
hgs
parents:
diff changeset
    87
        void AddObserverL( MMPXPlaybackObserver& aObs );
hgs
parents:
diff changeset
    88
hgs
parents:
diff changeset
    89
        void RemoveObserverL( MMPXPlaybackObserver& aObs );
hgs
parents:
diff changeset
    90
hgs
parents:
diff changeset
    91
        void Close();
hgs
parents:
diff changeset
    92
hgs
parents:
diff changeset
    93
        void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback );
hgs
parents:
diff changeset
    94
        void CommandL( TMPXPlaybackCommand aCmd );
hgs
parents:
diff changeset
    95
hgs
parents:
diff changeset
    96
        TMPXPlaybackState StateL() const;
hgs
parents:
diff changeset
    97
hgs
parents:
diff changeset
    98
        MMPXSource* Source();
hgs
parents:
diff changeset
    99
hgs
parents:
diff changeset
   100
        void SetL( TMPXPlaybackProperty aProperty,TInt aValue );
hgs
parents:
diff changeset
   101
hgs
parents:
diff changeset
   102
        void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty );
hgs
parents:
diff changeset
   103
hgs
parents:
diff changeset
   104
        CMPXCollectionPlaylist* PlaylistL();
hgs
parents:
diff changeset
   105
hgs
parents:
diff changeset
   106
        void MediaL( const TArray<TMPXAttribute>& aAttrs,
hgs
parents:
diff changeset
   107
                     MMPXPlaybackCallback& aCallback,
hgs
parents:
diff changeset
   108
                     CMPXAttributeSpecs* aSpecs );
hgs
parents:
diff changeset
   109
hgs
parents:
diff changeset
   110
        void MediaL( const TArray<TMPXAttribute>& aAttrs,
hgs
parents:
diff changeset
   111
                     MMPXPlaybackCallback& aCallback );
hgs
parents:
diff changeset
   112
hgs
parents:
diff changeset
   113
        void SetPrimaryClientL();
hgs
parents:
diff changeset
   114
};
hgs
parents:
diff changeset
   115
hgs
parents:
diff changeset
   116
#endif // CMPXPLAYBACKUTILITY_H