mpengine/tsrc/unittest_mpmpxplaybackframeworkwrapper/stub/inc/mpxplaybackutility.h
changeset 32 c163ef0b758d
child 47 4cc1412daed0
equal deleted inserted replaced
29:8192e5b5c935 32:c163ef0b758d
       
     1 /*
       
     2 * Copyright (c) 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: mpxplaybackutility stub for testing mpmpxframeworkwrapper
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMPXPLAYBACKUTILITY_H
       
    20 #define MMPXPLAYBACKUTILITY_H
       
    21 
       
    22 #include <mpxplaybackframeworkdefs.h>
       
    23 #include <mpxcommonframeworkdefs.h>
       
    24 #include <badesca.h>
       
    25 #include <mpxattribute.h>
       
    26 #include <mpxattributespecs.h>
       
    27 
       
    28 //Forward declarations
       
    29 class CMPXCollectionPlaylist;
       
    30 class MMPXPlaybackObserver;  
       
    31 class MMPXPlaybackCallback;
       
    32 
       
    33 class MMPXSource
       
    34 {
       
    35 public:
       
    36     //MMPXSource interface for playback utility stub
       
    37     virtual CMPXCollectionPlaylist* PlaylistL()=0;
       
    38     virtual void MediaL(const TArray<TMPXAttribute>& aAttrs,
       
    39                     MMPXPlaybackCallback& aCallback)=0;
       
    40 
       
    41  
       
    42 };
       
    43 
       
    44 class MMPXPlaybackUtility: public MMPXSource
       
    45 {
       
    46 public:
       
    47 
       
    48     // Stub functions
       
    49     MMPXPlaybackUtility();
       
    50     ~MMPXPlaybackUtility();
       
    51     static MMPXPlaybackUtility* UtilityL(const TUid& aModeId = KPbModeDefault);
       
    52     void AddObserverL(MMPXPlaybackObserver& aObs);
       
    53     void RemoveObserverL(MMPXPlaybackObserver& aObs);
       
    54     void Close();
       
    55     void CommandL(TMPXPlaybackCommand aCmd,TInt aData=0);
       
    56     void CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL);
       
    57     MMPXSource* Source();
       
    58      void SetL(TMPXPlaybackProperty aProperty, TInt aValue);
       
    59     TMPXPlaybackState StateL() const;
       
    60     // Stub function from MMPXSource
       
    61     CMPXCollectionPlaylist* PlaylistL();
       
    62     void MediaL(const TArray<TMPXAttribute>& aAttrs,
       
    63                     MMPXPlaybackCallback& aCallback);
       
    64     void InitL(RFile& aShareableFile);
       
    65     void InitL(const TDesC& aUri,const TDesC8* aType=NULL);
       
    66     
       
    67 
       
    68 public:
       
    69 
       
    70     TInt                    iValue;
       
    71     TInt                    iComandData;
       
    72     TMPXPlaybackProperty    iProperty;
       
    73     MMPXPlaybackObserver*   iObs;
       
    74     TMPXPlaybackCommand     iCmd;
       
    75     CMPXCommand*            iCMPXCmd;
       
    76     TMPXPlaybackState       iState;
       
    77     RArray<TMPXAttribute>*  iAttrs;
       
    78     bool                    iInitialized;
       
    79     bool                    iReturnSource;
       
    80 };
       
    81 
       
    82 #endif      // MMPXPLAYBACKUTILITY_H
       
    83