os/mm/mmlibs/mmfw/tsrc/mmfunittest/Actrl/TestPlugins/TestMmfAudioOutput.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 "MMFAudioOutput.h"
    17 #include <mmf/server/mmfdatabuffer.h>
    18 #include <mmfaudiopolicyproxy.h>
    19 #include <ImplementationProxy.h>
    20 #include <mmffourcc.h>
    21 
    22 #include "TestMMFAudioOutput.h"
    23 
    24 // special ack event id
    25 const TUid KPrimeTestId = { 0x101F7853 };
    26 const TUid KPlayTestId = { 0x11111111 };
    27 
    28 /*
    29 
    30 */
    31 
    32 void CTestMMFAudioOutput::SinkPrimeL()
    33 	{
    34 	//[ send a prime event to the test code ]
    35 	TMMFEvent primeEvent( KPrimeTestId, KErrNone );
    36 	SendEventToClient( primeEvent );
    37 	//[ now actually do the prime ]
    38     CMMFAudioOutput::SinkPrimeL();
    39 	}
    40 
    41 /*
    42 
    43 */
    44 void CTestMMFAudioOutput::SinkPlayL()
    45 	{
    46 	//[ send an event back to the test code that we are playing]
    47 	TMMFEvent playEvent( KPlayTestId, KErrNone );
    48 	SendEventToClient( playEvent );
    49 	// [ actually do the play now]
    50     CMMFAudioOutput::SinkPlayL();
    51 	}
    52 
    53 /*
    54 
    55 
    56 */
    57 
    58 MDataSink* CTestMMFAudioOutput::NewSinkL()
    59 	{
    60 	CTestMMFAudioOutput* self = new (ELeave) CTestMMFAudioOutput ;
    61 	return STATIC_CAST( MDataSink*, self ) ;
    62 	}
    63 
    64 
    65