diff -r 45e72b57a2fd -r e3cecb93e76a videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxplaybackutility.cpp --- a/videoplayback/hbvideoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/mpxplaybackutility.cpp Tue Jul 06 14:17:50 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Factory method to create playback utility object -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include"mpxplaybackutility.h" - - -// ============================== MEMBER FUNCTIONS ================================================= - -// ------------------------------------------------------------------------------------------------- -// Creates the playback utility object if not already created -// ------------------------------------------------------------------------------------------------- -// -MMPXPlaybackUtility* MMPXPlaybackUtility::UtilityL( const TMPXCategory /*aCategory*/, - const TUid& /*aModeId*/ ) -{ - return CMPXPlaybackUtility::NewL(); -} - -// ------------------------------------------------------------------------------------------------- -// Two phases constructor -// ------------------------------------------------------------------------------------------------- -// -CMPXPlaybackUtility* CMPXPlaybackUtility::NewL() -{ - CMPXPlaybackUtility* p = new(ELeave)CMPXPlaybackUtility(); - CleanupStack::PushL(p); - p->ConstructL(); - CleanupStack::Pop(p); - return p; -} - -// ------------------------------------------------------------------------------------------------- -// Destructor -// ------------------------------------------------------------------------------------------------- -// -CMPXPlaybackUtility::~CMPXPlaybackUtility() -{ -} - -// ------------------------------------------------------------------------------------------------- -// C++ constructor -// Create a unique name out of thread ID and this pointer: no other instance of -// this object will have the same name; used to identify this object for -// recieving messages -// ------------------------------------------------------------------------------------------------- -// -CMPXPlaybackUtility::CMPXPlaybackUtility() -{ -} - -// ------------------------------------------------------------------------------------------------- -// 2nd construtor -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::ConstructL() -{ - iState = EPbStateInitialised; -} - -// ------------------------------------------------------------------------------------------------- -// Add a observer -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::AddObserverL( MMPXPlaybackObserver& /*aObs*/ ) -{ -} - -// ------------------------------------------------------------------------------------------------- -// Remove a observer -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::RemoveObserverL( MMPXPlaybackObserver& /* aObs */ ) -{ -} - -// ------------------------------------------------------------------------------------------------- -// Delete this -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::Close() -{ - delete this; -} - -// ------------------------------------------------------------------------------------------------- -// Issue player commands -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::CommandL( TMPXPlaybackCommand aCmd ) -{ - iCommand = aCmd; -} - -// ------------------------------------------------------------------------------------------------- -// Issue player commands -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::CommandL( CMPXCommand& aCmd, MMPXPlaybackCallback* /* aCallback */ ) -{ - TInt cmdType = aCmd.ValueTObjectL( KMPXCommandGeneralId ); - - if ( cmdType == KMPXCommandIdPlaybackGeneral ) - { - iCommand = aCmd.ValueTObjectL( KMPXCommandPlaybackGeneralType ); - } - else - { - iCommand = aCmd.ValueTObjectL( KMPXMediaVideoPlaybackCommand ); - } -} - -// ------------------------------------------------------------------------------------------------- -// Current state of player -// ------------------------------------------------------------------------------------------------- -// -TMPXPlaybackState CMPXPlaybackUtility::StateL() const -{ - return iState; -} - -// ------------------------------------------------------------------------------------------------- -// Determine whether there is a song by the state of the engine: if there is, -// its OK to return MMPXMedia, else NULL is returned -// ------------------------------------------------------------------------------------------------- -// -MMPXSource* CMPXPlaybackUtility::Source() -{ - return NULL; -} - -// ------------------------------------------------------------------------------------------------- -// Set playback property, EPropertyChanged event when complete -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::SetL( TMPXPlaybackProperty aProperty, TInt aValue ) -{ - iProperty = aProperty; - iPropertyValue = aValue; -} - -// ------------------------------------------------------------------------------------------------- -// Send property request -// Result will be called back in HandleProperty -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::PropertyL( - MMPXPlaybackCallback& /* aCallback */, - TMPXPlaybackProperty /* aProperty */) -{ -} - -// ------------------------------------------------------------------------------------------------- -// Path to the collection -// ------------------------------------------------------------------------------------------------- -// -CMPXCollectionPlaylist* CMPXPlaybackUtility::PlaylistL() -{ - CMPXCollectionPlaylist *p = NULL; - - return p; -} - -// ------------------------------------------------------------------------------------------------- -// Request for media properties. -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::MediaL( - const TArray& /* aAttrs */, - MMPXPlaybackCallback& /* aCallback */, - CMPXAttributeSpecs* /* aSpecs */) -{ -} - -// ------------------------------------------------------------------------------------------------- -// set primary client -// ------------------------------------------------------------------------------------------------- -// -void CMPXPlaybackUtility::SetPrimaryClientL() -{ -} - -// End of file -