os/mm/mmlibs/mmfw/src/server/BaseClasses/mmfdatapathproxy.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include <e32math.h>
    17 #include <mmf/server/mmfdatapathproxy.h>
    18 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    19 #include <mmf/server/mmfdatapathproxyserver.h>
    20 #endif
    21 
    22 /**
    23 Constructs a datapath event monitor object.
    24 
    25 @param  aObserver
    26         A reference to the observer of the active object. The observer will be notified when an
    27         event occurs.
    28 @param  aMMFDataPathProxy
    29         A reference to the client datapath proxy class.
    30 
    31 @return A pointer to the new event monitor.
    32 
    33 @since 7.0s
    34 */
    35 EXPORT_C CMMFDataPathEventMonitor* CMMFDataPathEventMonitor::NewL(MMMFDataPathEventMonitorObserver& aObserver,
    36 															 RMMFDataPathProxy& aMMFDataPathProxy)
    37 	{
    38 	return (new(ELeave) CMMFDataPathEventMonitor(aObserver, aMMFDataPathProxy));
    39 	}
    40 
    41 CMMFDataPathEventMonitor::CMMFDataPathEventMonitor(MMMFDataPathEventMonitorObserver& aObserver, 
    42 													   RMMFDataPathProxy& aMMFDataPathProxy) :
    43 	CActive(EPriorityStandard),
    44 	iObserver(aObserver), 
    45 	iMMFDataPathProxy(aMMFDataPathProxy)
    46 	{
    47 	CActiveScheduler::Add(this);
    48 	}
    49 
    50 /**
    51 Destructor.
    52 
    53 Calls Cancel().
    54 */
    55 EXPORT_C CMMFDataPathEventMonitor::~CMMFDataPathEventMonitor()
    56 	{
    57 	Cancel();
    58 	}
    59 
    60 /**
    61 Tells the datapath event monitor to start listening for events.
    62 
    63 The datapath proxy must have been opened before this method is called.
    64 
    65 @since  7.0s
    66 */
    67 EXPORT_C void CMMFDataPathEventMonitor::Start()
    68 	{
    69 	iMMFDataPathProxy.ReceiveEvents(iEventPckg, iStatus);
    70 	SetActive();
    71 	}
    72 
    73 /**
    74 Internal active object function.
    75 
    76 Starts the data path event monitor and handles an event if there is no error status.
    77 
    78 Calls HandleEvent on iObserver.
    79 
    80 @since  7.0s
    81 */
    82 EXPORT_C void CMMFDataPathEventMonitor::RunL()
    83 	{
    84 	if (iStatus.Int() == KErrNone)
    85 		{
    86 		iObserver.HandleEvent(iEventPckg());
    87 		Start();
    88 		}
    89 	else
    90 		{
    91 		//something's gone wrong with trying to receive events (e.g. server died etc)
    92 		TMMFEvent event(KMMFErrorCategoryDataPathGeneralError, iStatus.Int());
    93 		iObserver.HandleEvent(event);
    94 		//we don't want to receive events again here...
    95 		}
    96 	}
    97 
    98 /**
    99 Cancels the outstanding request on iMMFDataPathProxy.
   100 
   101 @since  7.0s
   102 */
   103 void CMMFDataPathEventMonitor::DoCancel()
   104 	{
   105 	iMMFDataPathProxy.CancelReceiveEvents();
   106 	}
   107 
   108 /**
   109 Creates a subthread that will contain the datapath.
   110 
   111 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   112         another of the system-wide error codes.
   113 
   114 @since 7.0s
   115 */
   116 EXPORT_C TInt RMMFDataPathProxy::CreateSubThread()
   117 	{
   118 	//start the subthread with a unique name
   119 	TName subThreadName(_L("MMFDataPathThread"));
   120 	subThreadName.AppendNum(Math::Random(),EHex);
   121 	
   122 	TInt error = DoCreateSubThread(subThreadName, &CMMFDataPathProxyServer::StartThread);
   123 	if (error)
   124 		return error;
   125 
   126 	//now create a session with the subthread
   127 	error = CreateSession(subThreadName, KMMFDataPathProxyVersion);
   128 
   129 	return error;
   130 	}
   131 
   132 // Note: in the following, we can pass straight addresses for writing since both client and server
   133 // are in the same process.
   134 /**
   135 Load the datapath in the new thread. Use this method if the codec UID is not known
   136 and there is no datapath ambiguity, ie. only one datapath is possible.
   137 
   138 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   139         another of the system-wide error codes.
   140 
   141 @since 7.0s
   142 */
   143 EXPORT_C TInt RMMFDataPathProxy::LoadDataPath()
   144 	{
   145 	return SendReceive(EMMFDataPathProxyLoadDataPathBy);
   146 	}
   147 
   148 /**
   149 Load the datapath in the new thread. 
   150 
   151 Use this method if the codec UID is not known but the TMediaId can be used to select which codec 
   152 to use.
   153 
   154 @param  aMediaId
   155 	    The type of media to be handled by this datapath.
   156 
   157 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   158         another of the system-wide error codes.
   159 
   160 @since  7.0s
   161 */
   162 EXPORT_C TInt RMMFDataPathProxy::LoadDataPath(TMediaId aMediaId)
   163 	{
   164 	return SendReceive (EMMFDataPathProxyLoadDataPathByMediaId, TInt(&aMediaId));
   165 	}
   166 
   167 /**
   168 Load the datapath in the new thread. 
   169 
   170 Use this method if the codec UID is known and there is no datapath ambiguity, ie. only one datapath
   171 is possible.
   172 
   173 @param  aCodecUid
   174         The UID of the codec plugin to be used by the datapath.
   175 
   176 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   177         another of the system-wide error codes.
   178 
   179 @since  7.0s
   180 */
   181 EXPORT_C TInt RMMFDataPathProxy::LoadDataPath(TUid aCodecUid) 
   182 	{
   183 	return SendReceive(EMMFDataPathProxyLoadDataPathByCodecUid, TInt(&aCodecUid));
   184 	}
   185 
   186 /**
   187 Loads the datapath in the new thread. 
   188 
   189 Use this method if the codec UID is known and there is datapath ambiguity. The TMediaId will be
   190 used to choose the correct path.
   191 
   192 @param  aCodecUid
   193         The UID of the codec plugin to be used by the datapath.
   194 @param  aMediaId
   195         The type of media to be handled by this datapath.
   196 
   197 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   198         another of the system-wide error codes.
   199 
   200 @since  7.0s
   201 */
   202 EXPORT_C TInt RMMFDataPathProxy::LoadDataPath(TUid aCodecUid, TMediaId aMediaId)
   203 	{
   204 	return SendReceive(EMMFDataPathProxyLoadDataPathByMediaIdCodecUid, TInt(&aCodecUid), TInt(&aMediaId));
   205 	}
   206 	
   207 /**
   208 Specify the data source for this datapath.
   209 
   210 If the sink already exists, this function tries to establish a connection between the source and 
   211 sink. Note that only one data source can be added to the datapath.
   212 
   213 @param  aSource
   214         A pointer to the data source.
   215 
   216 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   217         another of the system-wide error codes.
   218 
   219 @since 7.0s
   220 */
   221 EXPORT_C TInt RMMFDataPathProxy::AddDataSource(MDataSource* aSource)
   222 	{
   223 	return SendReceive(EMMFDataPathProxyAddDataSource, TInt(aSource));
   224 	}
   225 	
   226 /**
   227 Specify the data sink for this datapath.  
   228 
   229 If the source already exists, this function tries to establish a connection between the source and 
   230 the sink. Note that only one data sink can be added to the datapath.
   231 
   232 @param  aSink
   233         A pointer to the data sink.
   234 
   235 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   236         another of the system-wide error codes.
   237 
   238 @since  7.0s
   239 */
   240 EXPORT_C TInt RMMFDataPathProxy::AddDataSink(MDataSink* aSink)
   241 	{
   242 	return SendReceive(EMMFDataPathProxyAddDataSink, TInt(aSink));
   243 	}
   244 	
   245 /**
   246 Transfer the datapath from the stopped into the primed state.
   247 
   248 This function allocates buffers in preparation to play and must be called before calling PlayL().
   249 
   250 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   251         another of the system-wide error codes.
   252 
   253 @since  7.0s
   254 */
   255 EXPORT_C TInt RMMFDataPathProxy::Prime()
   256 	{
   257 	return SendReceive(EMMFDataPathProxyPrime);
   258 	}
   259 
   260 /**
   261 Transfer the datapath from the primed into the playing state.
   262 
   263 This function starts an active scheduler play loop and can only play from the primed state.
   264 
   265 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   266         another of the system-wide error codes.
   267 
   268 @since 7.0s
   269 */
   270 EXPORT_C TInt RMMFDataPathProxy::Play()
   271 	{
   272 	return SendReceive(EMMFDataPathProxyPlay);
   273 	}
   274 
   275 /**
   276 Pauses playing.
   277 
   278 This function transfers the datapath from the playing into the primed state and sends 
   279 KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
   280 
   281 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   282         another of the system-wide error codes.
   283 
   284 @since  7.0s
   285 */
   286 EXPORT_C TInt RMMFDataPathProxy::Pause()
   287 	{
   288 	return SendReceive(EMMFDataPathProxyPause);
   289 	}
   290 	
   291 /**
   292 Stops playing.
   293 
   294 This function transfers the datapath from the primed into the stopped state and resets the data 
   295 path position, but does not clean up buffers. It also sends KMMFErrorCategoryDataPathGeneralError 
   296 to the client if an error occurs.
   297 
   298 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   299         another of the system-wide error codes.
   300 
   301 @since  7.0s
   302 */
   303 EXPORT_C TInt RMMFDataPathProxy::Stop()
   304 	{
   305 	return SendReceive(EMMFDataPathProxyStop);
   306 	}
   307 	
   308 /**
   309 Gets the current position of the datapath in units of time.
   310 
   311 @param  aPosition
   312         The current position in micro seconds will be copied into this variable.
   313 
   314 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   315         another of the system-wide error codes.
   316 
   317 @since  7.0s
   318 */
   319 EXPORT_C TInt RMMFDataPathProxy::GetPosition(TTimeIntervalMicroSeconds& aPosition) const
   320 	{
   321 	return SendReceive(EMMFDataPathProxyGetPosition, TInt(&aPosition));
   322 	}
   323 
   324 /**
   325 Sets the current position of the datapath in units of time.
   326 
   327 @param  aPosition
   328         The required position in micro seconds.
   329 
   330 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   331         another of the system-wide error codes.
   332 
   333 @since 7.0s
   334 **/
   335 EXPORT_C TInt RMMFDataPathProxy::SetPosition(const TTimeIntervalMicroSeconds& aPosition)
   336 	{
   337 	return SendReceive(EMMFDataPathProxySetPosition, TInt(&aPosition));
   338 	}
   339 	
   340 /**
   341 Sets the play window relative to the start of the entire clip.
   342 
   343 @param  aStart
   344         The start position in micro seconds relative to the start of the clip.
   345 @param  aEnd
   346         The end position in micro seconds relative to the start of the clip.
   347 
   348 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   349         another of the system-wide error codes.
   350 
   351 @since  7.0s
   352 */
   353 EXPORT_C TInt RMMFDataPathProxy::SetPlayWindow( const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd )
   354 	{
   355 	return SendReceive( EMMFDataPathProxySetPlayWindow, TInt(&aStart), TInt(&aEnd)) ;
   356 	}
   357 	
   358 /**
   359 Removes a previously defined play window.
   360 
   361 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   362         another of the system-wide error codes.
   363 
   364 @since  7.0s
   365 */
   366 EXPORT_C TInt RMMFDataPathProxy::ClearPlayWindow()
   367 	{
   368 	return SendReceive( EMMFDataPathProxyClearPlayWindow) ;
   369 	}
   370 	
   371 /**
   372 Gets the current datapath state.
   373 
   374 @param  aState
   375         The current state of the datapath will be copied into this variable.
   376 
   377 @return An error code indicating if the function call was successful. KErrNone on success, otherwise
   378         another of the system-wide error codes.
   379 
   380 @since  7.0s
   381 */
   382 EXPORT_C TInt RMMFDataPathProxy::State( TInt& aState )
   383 	{
   384 	return SendReceive( EMMFDataPathProxyState, TInt(&aState) ) ; // pass address, not value
   385 	}
   386 
   387 /**
   388 Deletes the datapath and shuts down the datapath proxy thread.
   389 
   390 Calls RMMFSubThreadBase::Shutdown(). This function will not return until the subthread has 
   391 exited, or a timeout has occurred.
   392 
   393 @since  7.0s
   394 */
   395 EXPORT_C void RMMFDataPathProxy::Close()
   396 	{
   397 	Shutdown();
   398 	}
   399 
   400 
   401 
   402 
   403 
   404 
   405 CMMFDataPathProxyServer* CMMFDataPathProxyServer::NewL()
   406 	{
   407 	CMMFDataPathProxyServer* s = new(ELeave) CMMFDataPathProxyServer();
   408 	CleanupStack::PushL(s);
   409 	s->ConstructL();
   410 	CleanupStack::Pop();
   411 	return s;
   412 	}
   413 
   414 CMMFDataPathProxyServer::CMMFDataPathProxyServer() :
   415 	CMMFSubThreadServer(EPriorityStandard)
   416 	{
   417 	}
   418 
   419 void CMMFDataPathProxyServer::ConstructL()
   420 	{
   421 	//just need to call baseclass's constructL here
   422 	CMMFSubThreadServer::ConstructL();
   423 	}
   424 
   425 CMMFDataPathProxyServer::~CMMFDataPathProxyServer()
   426 	{
   427 	}
   428 
   429 CMmfIpcSession* CMMFDataPathProxyServer::NewSessionL(const TVersion& aVersion) const
   430 	{
   431 	if (!User::QueryVersionSupported(KMMFDataPathProxyVersion, aVersion))
   432 		User::Leave(KErrNotSupported);
   433 
   434 	return CMMFDataPathProxySession::NewL();
   435 	}
   436 
   437 TInt CMMFDataPathProxyServer::StartThread(TAny*)
   438 	{
   439 	TInt err = KErrNone;
   440 	//create cleanupstack
   441 	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
   442 	if (!cleanup)
   443 		err = KErrNoMemory;
   444 	if (!err)
   445 		{
   446 		TRAP(err, DoStartThreadL());
   447 		}
   448 	delete cleanup;
   449 	return err;
   450 	}
   451 
   452 void CMMFDataPathProxyServer::DoStartThreadL()
   453 	{
   454 	// create and install the active scheduler we need
   455 	CActiveScheduler* s=new(ELeave) CActiveScheduler;
   456 	CleanupStack::PushL(s);
   457 	CActiveScheduler::Install(s);
   458 	// create the server (leave it on the cleanup stack)
   459 	CleanupStack::PushL(CMMFDataPathProxyServer::NewL());
   460 	// Initialisation complete, now signal the client
   461 	RThread::Rendezvous(KErrNone);
   462 	// Ready to run
   463 	CActiveScheduler::Start();
   464 	// Cleanup the server and scheduler
   465 	CleanupStack::PopAndDestroy(2);
   466 	REComSession::FinalClose(); // fix 047933
   467 	}
   468 
   469 
   470 
   471 
   472 
   473 CMMFDataPathProxySession* CMMFDataPathProxySession::NewL()
   474 	{
   475 	return new(ELeave) CMMFDataPathProxySession();
   476 	}
   477 
   478 CMMFDataPathProxySession::CMMFDataPathProxySession()
   479 	{
   480 	}
   481 
   482 
   483 CMMFDataPathProxySession::~CMMFDataPathProxySession()
   484 	{
   485 	delete iDataPath;
   486 	}
   487 
   488 void CMMFDataPathProxySession::ServiceL(const RMmfIpcMessage& aMessage)
   489 	{
   490 	TBool complete = EFalse;
   491 	switch(aMessage.Function())
   492 		{
   493 	case EMMFDataPathProxyLoadDataPathBy:
   494 		complete = LoadDataPathByL(aMessage);
   495 		break;
   496 	case EMMFDataPathProxyLoadDataPathByMediaId:
   497 		complete = LoadDataPathByMediaIdL(aMessage);
   498 		break;
   499 	case EMMFDataPathProxyLoadDataPathByCodecUid:
   500 		complete = LoadDataPathByCodecUidL(aMessage);
   501 		break;
   502 	case EMMFDataPathProxyLoadDataPathByMediaIdCodecUid:
   503 		complete = LoadDataPathByMediaIdCodecUidL(aMessage);
   504 		break;
   505 	case EMMFDataPathProxyAddDataSource:
   506 		complete = AddDataSourceL(aMessage);
   507 		break;
   508 	case EMMFDataPathProxyAddDataSink:
   509 		complete = AddDataSinkL(aMessage);
   510 		break;
   511 	case EMMFDataPathProxyPrime:
   512 		complete = PrimeL(aMessage);
   513 		break;
   514 	case EMMFDataPathProxyPlay:
   515 		complete = PlayL(aMessage);
   516 		break;
   517 	case EMMFDataPathProxyPause:
   518 		complete = PauseL(aMessage);
   519 		break;
   520 	case EMMFDataPathProxyStop:
   521 		complete = StopL(aMessage);
   522 		break;
   523 	case EMMFDataPathProxyGetPosition:
   524 		complete = GetPositionL(aMessage);
   525 		break;
   526 	case EMMFDataPathProxySetPosition:
   527 		complete = SetPositionL(aMessage);
   528 		break;
   529 	case EMMFDataPathProxySetPlayWindow :
   530 		complete = SetPlayWindowL(aMessage) ;
   531 		break;
   532 	case EMMFDataPathProxyClearPlayWindow:
   533 		complete = ClearPlayWindowL(aMessage);
   534 		break;
   535 	case EMMFDataPathProxyState:
   536 		complete = StateL(aMessage);
   537 		break;
   538 	case EMMFSubThreadReceiveEvents:
   539 		complete = ReceiveEventsL(aMessage);//provided by baseclass
   540 		break;
   541 	case EMMFSubThreadCancelReceiveEvents:
   542 		complete = CancelReceiveEvents();//provided by baseclass
   543 		break;
   544 	case EMMFSubThreadShutdown:
   545 		complete = ShutDown();//provided by baseclass
   546 		break;
   547 	default:
   548 		User::Leave(KErrNotSupported);
   549 		break;
   550 		}
   551 
   552 	if (complete)
   553 		aMessage.Complete(KErrNone);
   554 	}
   555 
   556 
   557 TBool CMMFDataPathProxySession::LoadDataPathByL(const RMmfIpcMessage& /*aMessage*/)
   558 	{
   559 	if (iDataPath)
   560 		User::Leave(KErrAlreadyExists);
   561 	iDataPath = CMMFDataPath::NewL(*this);
   562 	return ETrue;
   563 	}
   564 
   565 TBool CMMFDataPathProxySession::LoadDataPathByMediaIdL(const RMmfIpcMessage& aMessage)
   566 	{
   567 	if (iDataPath)
   568 		User::Leave(KErrAlreadyExists);
   569 	TMediaId* mediaId = REINTERPRET_CAST(TMediaId*, aMessage.Int0());
   570 	iDataPath = CMMFDataPath::NewL(*mediaId, *this);
   571 	return ETrue;
   572 	}
   573 
   574 TBool CMMFDataPathProxySession::LoadDataPathByCodecUidL(const RMmfIpcMessage& aMessage)
   575 	{
   576 	if (iDataPath)
   577 		User::Leave(KErrAlreadyExists);
   578 	TUid* uid = REINTERPRET_CAST(TUid*, aMessage.Int0());
   579 	iDataPath = CMMFDataPath::NewL(*uid, *this);
   580 	return ETrue;
   581 	}
   582 
   583 TBool CMMFDataPathProxySession::LoadDataPathByMediaIdCodecUidL(const RMmfIpcMessage& aMessage)
   584 	{
   585 	if (iDataPath)
   586 		User::Leave(KErrAlreadyExists);
   587 	TUid* uid = REINTERPRET_CAST(TUid*, aMessage.Int0());
   588 	TMediaId* mediaId = REINTERPRET_CAST(TMediaId*, aMessage.Int1());
   589 	iDataPath = CMMFDataPath::NewL(*uid, *mediaId, *this);
   590 	return ETrue;
   591 	}
   592 
   593 TBool CMMFDataPathProxySession::AddDataSourceL(const RMmfIpcMessage& aMessage)
   594 	{
   595 	CheckDataPathExistsL();
   596 	MDataSource* source = REINTERPRET_CAST(MDataSource*, aMessage.Int0());
   597 	iDataPath->AddDataSourceL(source);
   598 	return ETrue;
   599 	}
   600 
   601 TBool CMMFDataPathProxySession::AddDataSinkL(const RMmfIpcMessage& aMessage)
   602 	{
   603 	CheckDataPathExistsL();
   604 	MDataSink* sink = REINTERPRET_CAST(MDataSink*, aMessage.Int0());
   605 	iDataPath->AddDataSinkL(sink);
   606 	return ETrue;
   607 	}
   608 
   609 TBool CMMFDataPathProxySession::PrimeL(const RMmfIpcMessage& /*aMessage*/)
   610 	{
   611 	CheckDataPathExistsL();
   612 	iDataPath->PrimeL();
   613 	return ETrue;
   614 	}
   615 
   616 TBool CMMFDataPathProxySession::PlayL(const RMmfIpcMessage& /*aMessage*/)
   617 	{
   618 	CheckDataPathExistsL();
   619 	iDataPath->PlayL();
   620 	return ETrue;
   621 	}
   622 
   623 TBool CMMFDataPathProxySession::PauseL(const RMmfIpcMessage& /*aMessage*/)
   624 	{
   625 	CheckDataPathExistsL();
   626 	iDataPath->Pause();
   627 	return ETrue;
   628 	}
   629 
   630 TBool CMMFDataPathProxySession::StopL(const RMmfIpcMessage& /*aMessage*/)
   631 	{
   632 	CheckDataPathExistsL();
   633 	iDataPath->Stop();
   634 	return ETrue;
   635 	}
   636 
   637 TBool CMMFDataPathProxySession::GetPositionL(const RMmfIpcMessage& aMessage) const
   638 	{
   639 	CheckDataPathExistsL();
   640 	TTimeIntervalMicroSeconds* t = REINTERPRET_CAST(TTimeIntervalMicroSeconds*, aMessage.Int0());
   641 	*t = iDataPath->Position();
   642 	return ETrue;
   643 	}
   644 
   645 TBool CMMFDataPathProxySession::SetPositionL(const RMmfIpcMessage& aMessage)
   646 	{
   647 	CheckDataPathExistsL();
   648 	TTimeIntervalMicroSeconds* t = REINTERPRET_CAST(TTimeIntervalMicroSeconds*, aMessage.Int0());
   649 	iDataPath->SetPositionL(*t);
   650 	return ETrue;
   651 	}
   652 
   653 TBool CMMFDataPathProxySession::SetPlayWindowL(const RMmfIpcMessage& aMessage) 
   654 	{
   655 	CheckDataPathExistsL() ;
   656 	TTimeIntervalMicroSeconds* start = REINTERPRET_CAST( TTimeIntervalMicroSeconds*, aMessage.Int0() ) ;
   657 	TTimeIntervalMicroSeconds* end = REINTERPRET_CAST( TTimeIntervalMicroSeconds*, aMessage.Int1() ) ;
   658 	iDataPath->SetPlayWindowL( *start, *end ) ;
   659 	return ETrue;
   660 	}
   661 
   662 TBool CMMFDataPathProxySession::ClearPlayWindowL(const RMmfIpcMessage& /*aMessage*/)
   663 	{
   664 	CheckDataPathExistsL() ;
   665 	iDataPath->ClearPlayWindowL() ;
   666 	return ETrue ;
   667 	}
   668 
   669 TBool CMMFDataPathProxySession::StateL(const RMmfIpcMessage& aMessage)
   670 	{
   671 	CheckDataPathExistsL() ;
   672 	TInt* state = REINTERPRET_CAST( TInt*, aMessage.Int0() ) ;
   673 	*state = iDataPath->State();
   674 	return ETrue ;
   675 	}
   676