videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/stub/inc/mpxplaybackutility.h
changeset 52 e3cecb93e76a
child 63 4707a0db12f6
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
       
     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:  3 %
       
    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         virtual void MediaL( const TArray<TMPXAttribute>& aAttrs,
       
    45                              MMPXPlaybackCallback& aCallback ) = 0;
       
    46 };
       
    47 
       
    48 class MMPXPlaybackUtility : public CBase
       
    49 {
       
    50     public:
       
    51         static MMPXPlaybackUtility* UtilityL( const TMPXCategory aCategory,
       
    52                                               const TUid& aModeId = KPbModeDefault );
       
    53 
       
    54         virtual TMPXPlaybackState StateL() const = 0;
       
    55         virtual void AddObserverL( MMPXPlaybackObserver& aObs ) = 0;
       
    56         virtual void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL ) = 0;
       
    57         virtual void CommandL( TMPXPlaybackCommand aCmd ) = 0;
       
    58         virtual MMPXSource* Source() = 0;
       
    59         virtual void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty ) = 0;
       
    60         virtual void RemoveObserverL( MMPXPlaybackObserver& aObs ) = 0;
       
    61         virtual void Close() = 0;
       
    62         virtual void SetPrimaryClientL() = 0;
       
    63         virtual void SetL( TMPXPlaybackProperty aProperty,TInt aValue ) = 0;
       
    64 
       
    65     public:
       
    66         TMPXPlaybackState iState;
       
    67         TMPXPlaybackProperty iProperty;
       
    68         TInt iPropertyValue;
       
    69         TInt iCommand;
       
    70 };
       
    71 
       
    72 class CMPXPlaybackUtility : public MMPXPlaybackUtility,
       
    73                             public MMPXSource
       
    74 {
       
    75     public:
       
    76 
       
    77         static CMPXPlaybackUtility* NewL();
       
    78 
       
    79         ~CMPXPlaybackUtility();
       
    80 
       
    81     private:
       
    82 
       
    83         CMPXPlaybackUtility();
       
    84 
       
    85         void ConstructL();
       
    86 
       
    87         void AddObserverL( MMPXPlaybackObserver& aObs );
       
    88 
       
    89         void RemoveObserverL( MMPXPlaybackObserver& aObs );
       
    90 
       
    91         void Close();
       
    92 
       
    93         void CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback );
       
    94         void CommandL( TMPXPlaybackCommand aCmd );
       
    95 
       
    96         TMPXPlaybackState StateL() const;
       
    97 
       
    98         MMPXSource* Source();
       
    99 
       
   100         void SetL( TMPXPlaybackProperty aProperty,TInt aValue );
       
   101 
       
   102         void PropertyL( MMPXPlaybackCallback& aCallback, TMPXPlaybackProperty aProperty );
       
   103 
       
   104         CMPXCollectionPlaylist* PlaylistL();
       
   105 
       
   106         void MediaL( const TArray<TMPXAttribute>& aAttrs,
       
   107                      MMPXPlaybackCallback& aCallback,
       
   108                      CMPXAttributeSpecs* aSpecs );
       
   109 
       
   110         void MediaL( const TArray<TMPXAttribute>& aAttrs,
       
   111                      MMPXPlaybackCallback& aCallback );
       
   112 
       
   113         void SetPrimaryClientL();
       
   114 };
       
   115 
       
   116 #endif // CMPXPLAYBACKUTILITY_H