mpviewplugins/mpdetailsviewplugin/tsrc/unittest_mpmpxdetailsframeworkwrapper/stub/src/mpxplaybackutility.cpp
branchGCC_SURGE
changeset 44 eff9df3d9c98
parent 30 b95ddb5a0d10
parent 42 79c49924ae23
equal deleted inserted replaced
30:b95ddb5a0d10 44:eff9df3d9c98
     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 #include "stub/inc/mpxplaybackutility.h"
       
    19 #include "stub/inc/mpxplayermanager.h"
       
    20 #include "stub/inc/mpxsource.h"
       
    21 #include "mptrace.h"
       
    22 
       
    23 MMPXPlaybackUtility* MMPXPlaybackUtility::singleton = NULL;
       
    24 
       
    25 MMPXPlaybackUtility* MMPXPlaybackUtility::NewL(const TUid& /*aModeId*/,
       
    26                                             MMPXPlaybackObserver* /*aObs*/)
       
    27 {
       
    28     MMPXPlaybackUtility* obj = new(ELeave) MMPXPlaybackUtility();
       
    29     CleanupStack::PushL(obj);
       
    30     obj->ConstructL();
       
    31     CleanupStack::Pop(obj);
       
    32     return obj;
       
    33 }
       
    34 
       
    35 void MMPXPlaybackUtility::ConstructL()
       
    36 {
       
    37     TX_ENTRY_ARGS("STUB")
       
    38     iMpxPlayerManager = new(ELeave) MMPXPlayerManager(); 
       
    39     iMpxSource = new(ELeave) MMPXSource();
       
    40     TX_EXIT_ARGS("STUB")
       
    41 }
       
    42 
       
    43 MMPXPlaybackUtility::~MMPXPlaybackUtility()
       
    44 {
       
    45     TX_ENTRY_ARGS("STUB")    
       
    46 }
       
    47 
       
    48 MMPXPlaybackUtility::MMPXPlaybackUtility()
       
    49     : iMpxSource(0),
       
    50       iMpxPlayerManager(0),
       
    51       iPlaybackObserver(0),
       
    52       iPlaybackCallback(0),
       
    53       iState(EPbStateNotInitialised),
       
    54       iOneShot(0)
       
    55 {
       
    56     TX_ENTRY_ARGS("STUB")
       
    57 }
       
    58 
       
    59   
       
    60 void MMPXPlaybackUtility::AddObserverL(MMPXPlaybackObserver& aPlaybackObserver)
       
    61 {
       
    62     TX_ENTRY_ARGS("STUB")
       
    63     iPlaybackObserver = &aPlaybackObserver;
       
    64 }
       
    65 
       
    66 void MMPXPlaybackUtility::RemoveObserverL(MMPXPlaybackObserver& aPlaybackObserver)
       
    67 {
       
    68     TX_ENTRY_ARGS("STUB")
       
    69     if(iPlaybackObserver == &aPlaybackObserver)
       
    70     {
       
    71         iPlaybackObserver = NULL;
       
    72     }
       
    73 }
       
    74 
       
    75 void MMPXPlaybackUtility::GetClientsL(RArray<TProcessId>& /*aClients*/)
       
    76 {
       
    77     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
    78 }
       
    79 
       
    80 void MMPXPlaybackUtility::InitL(const CMPXCollectionPlaylist& /*aPlaylist*/, TBool /*aPlay*/)
       
    81 {
       
    82     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
    83 }
       
    84     
       
    85 void MMPXPlaybackUtility::InitL(const TDesC& /*aUri*/, const TDesC8* /*aType*/)
       
    86 {
       
    87     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
    88 }
       
    89     
       
    90 void MMPXPlaybackUtility::InitL(RFile& /*aShareableFile*/)
       
    91 {
       
    92     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
    93 }
       
    94 
       
    95 void MMPXPlaybackUtility::Close()
       
    96 {
       
    97     TX_ENTRY_ARGS("STUB")
       
    98     delete singleton;
       
    99     singleton = NULL;
       
   100     TX_EXIT_ARGS("STUB")
       
   101 }
       
   102 
       
   103 void MMPXPlaybackUtility::CancelRequest()
       
   104 {
       
   105     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   106 }
       
   107 
       
   108 void MMPXPlaybackUtility::CommandL(TMPXPlaybackCommand /*aCmd*/, TInt /*aData*/)
       
   109 {
       
   110     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
   111 }
       
   112 
       
   113 void MMPXPlaybackUtility::CommandL(CMPXCommand& /*aCmd*/, MMPXPlaybackCallback* /*aCallback*/)
       
   114 {
       
   115     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
   116 }
       
   117 
       
   118 TMPXPlaybackState MMPXPlaybackUtility::StateL() const
       
   119 {
       
   120     TX_ENTRY_ARGS("STUB")
       
   121     return iState;
       
   122 }
       
   123     
       
   124 MMPXSource* MMPXPlaybackUtility::Source()
       
   125 {
       
   126     TX_ENTRY_ARGS("STUB")
       
   127     return iMpxSource;
       
   128 }
       
   129 
       
   130 MMPXPlayerManager& MMPXPlaybackUtility::PlayerManager()
       
   131 {
       
   132     TX_ENTRY_ARGS("STUB")
       
   133     return *iMpxPlayerManager;
       
   134 }
       
   135 
       
   136 void MMPXPlaybackUtility::SetL(TMPXPlaybackProperty /*aProperty*/, TInt /*aValue*/)
       
   137 {
       
   138     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   139 }
       
   140 
       
   141 void MMPXPlaybackUtility::ValueL(MMPXPlaybackCallback& /*aCallback*/, TMPXPlaybackProperty /*aProperty*/)
       
   142 {
       
   143     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
   144 }
       
   145 
       
   146 void MMPXPlaybackUtility::PropertyL(MMPXPlaybackCallback& /*aCallback*/, TMPXPlaybackProperty /*aProperty*/)
       
   147 {
       
   148     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")    
       
   149 }
       
   150 
       
   151 CDesCArray* MMPXPlaybackUtility::SupportedMimeTypes()
       
   152 {
       
   153     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   154     return 0;    
       
   155 }
       
   156 
       
   157 CDesCArray* MMPXPlaybackUtility::SupportedExtensions()
       
   158 {
       
   159     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   160     return 0;
       
   161 }
       
   162 
       
   163 CDesCArray* MMPXPlaybackUtility::SupportedSchemas()
       
   164 {
       
   165     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   166     return 0;
       
   167 }
       
   168 
       
   169 void MMPXPlaybackUtility::SetPriority( TInt /*aPriority*/ )
       
   170 {
       
   171     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   172 }
       
   173 
       
   174 void MMPXPlaybackUtility::AddSubscriptionL(const CMPXSubscription& /*aSubscription*/)
       
   175 {
       
   176     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   177 }
       
   178 
       
   179 void MMPXPlaybackUtility::RemoveSubscriptionL(const CMPXSubscription& /*aSubscription*/)
       
   180 {
       
   181     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   182 }
       
   183 
       
   184 void MMPXPlaybackUtility::ClearSubscriptionsL()
       
   185 {
       
   186     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   187 }
       
   188     
       
   189 void MMPXPlaybackUtility::InitStreamingL(const TDesC& /*aUri*/, const TDesC8* /*aType*/, const TInt /*aAccessPoint*/)
       
   190 {
       
   191     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   192 }
       
   193 
       
   194 void MMPXPlaybackUtility::InitStreamingL(RFile& /*aShareableFile*/, const TInt /*aAccessPoint*/)
       
   195 {
       
   196     TX_ENTRY_ARGS("STUB WARNING! The unit test required to implement this. Currently empty imp")
       
   197 }
       
   198 
       
   199 MMPXPlaybackUtility* MMPXPlaybackUtility::NewL(const TMPXCategory /*aCategory*/,
       
   200                                                const TUid& /*aModeId*/,
       
   201                                                MMPXPlaybackObserver* /*aObs*/)
       
   202 {
       
   203     return 0;    
       
   204 }
       
   205 
       
   206 MMPXPlaybackUtility* MMPXPlaybackUtility::UtilityL(const TMPXCategory /*aCategory*/,
       
   207                                                    const TUid& /*aModeId*/ )
       
   208 {
       
   209     return 0;    
       
   210 }
       
   211 
       
   212 MMPXPlaybackUtility* MMPXPlaybackUtility::UtilityL(const TUid& /*aModeId*/ )
       
   213 {
       
   214     if(!singleton) {
       
   215         singleton = MMPXPlaybackUtility::NewL();
       
   216     }
       
   217     return singleton;
       
   218 }
       
   219 
       
   220 //end of file