videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxplaybackutility.h
changeset 39 f6d44a0cd476
equal deleted inserted replaced
38:ff53afa8ad05 39:f6d44a0cd476
       
     1 /*
       
     2 * Copyright (c) 2010 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:  Implementation of interface for playbackutility
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  2 %
       
    19 
       
    20 #ifndef CMPXPLAYBACKUTILITY_H
       
    21 #define CMPXPLAYBACKUTILITY_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <mpxcommand.h>
       
    25 #include <mpxattributespecs.h>
       
    26 #include <mpxplaybackcommanddefs.h>
       
    27 #include <mpxplaybackframeworkdefs.h>
       
    28 
       
    29 class TMPXAttribute;
       
    30 class MMPXPlaybackObserver;
       
    31 class CMPXCollectionPlaylist;
       
    32 class MMPXPlaybackCallback;
       
    33 class CMPXPlaybackUtility;
       
    34 
       
    35 class MMPXSource
       
    36 {
       
    37     public:
       
    38         virtual CMPXCollectionPlaylist* PlaylistL() = 0;
       
    39 
       
    40         virtual void MediaL( const TArray<TMPXAttribute>& aAttrs,
       
    41                              MMPXPlaybackCallback& aCallback,
       
    42                              CMPXAttributeSpecs* aSpecs ) = 0;
       
    43 
       
    44 };
       
    45 
       
    46 class MMPXPlaybackUtility : public CBase
       
    47 {
       
    48     public:
       
    49         static MMPXPlaybackUtility* UtilityL( const TMPXCategory aCategory,
       
    50                                               const TUid& aModeId = KPbModeDefault );
       
    51 
       
    52         virtual TMPXPlaybackState StateL() const = 0;
       
    53         virtual void AddObserverL( MMPXPlaybackObserver& aObs ) = 0;
       
    54         virtual void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL ) = 0;
       
    55         virtual void CommandL( TMPXPlaybackCommand aCmd ) = 0;
       
    56         virtual MMPXSource* Source() = 0;
       
    57         virtual void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty ) = 0;
       
    58         virtual void RemoveObserverL( MMPXPlaybackObserver& aObs ) = 0;
       
    59         virtual void Close() = 0;
       
    60         virtual void SetPrimaryClientL() = 0;
       
    61         virtual void SetL( TMPXPlaybackProperty aProperty,TInt aValue ) = 0;
       
    62 
       
    63     public:
       
    64         TMPXPlaybackState iState;
       
    65         TMPXPlaybackProperty iProperty;
       
    66         TInt iPropertyValue;
       
    67         TInt iCommand;
       
    68 };
       
    69 
       
    70 class CMPXPlaybackUtility : public MMPXPlaybackUtility,
       
    71                             public MMPXSource
       
    72 {
       
    73     public:
       
    74 
       
    75         static CMPXPlaybackUtility* NewL();							
       
    76 
       
    77         ~CMPXPlaybackUtility();
       
    78 
       
    79     private:
       
    80 
       
    81         CMPXPlaybackUtility();
       
    82 
       
    83         void ConstructL();
       
    84 
       
    85         void AddObserverL( MMPXPlaybackObserver& aObs );
       
    86 
       
    87         void RemoveObserverL( MMPXPlaybackObserver& aObs );
       
    88 
       
    89         void Close();
       
    90 
       
    91         void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback );
       
    92         void CommandL( TMPXPlaybackCommand aCmd );
       
    93 
       
    94         TMPXPlaybackState StateL() const;
       
    95 
       
    96         MMPXSource* Source();
       
    97 
       
    98         void SetL( TMPXPlaybackProperty aProperty,TInt aValue );
       
    99 
       
   100         void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty );
       
   101 
       
   102         CMPXCollectionPlaylist* PlaylistL();
       
   103 
       
   104         void MediaL( const TArray<TMPXAttribute>& aAttrs,
       
   105                      MMPXPlaybackCallback& aCallback,
       
   106                      CMPXAttributeSpecs* aSpecs );
       
   107 
       
   108         void SetPrimaryClientL();
       
   109 };
       
   110 
       
   111 #endif // CMPXPLAYBACKUTILITY_H