multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/src/TMCETestUIEngineFloorControlSession.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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:    Implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDES
       
    22 
       
    23 #include "TMCETestUIEngineCmdFloorControlSession.h"
       
    24 #include "CMCETestUIQuestionSingleSelection.h"
       
    25 #include "CMCETestUIQuestionDataQuery.h"
       
    26 #include "CMCETestUIEngineSession.h"
       
    27 #include <MCESession.h>
       
    28 #include <MCEFCMsgExchange.h>
       
    29 
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // TMCETestUIEngineCmdFCSendSession::TMCETestUIEngineCmdFCSendSession
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TMCETestUIEngineCmdFCSendSession::TMCETestUIEngineCmdFCSendSession( 
       
    36 		            CMCETestUIEngine& aEngine,
       
    37 		            CMCETestUIEngineSession& aSession )
       
    38     : TMCETestUIEngineCmdBase( aEngine ),
       
    39       iSession( aSession )
       
    40     {
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // TMCETestUIEngineCmdFCSendSession::ExecuteL
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C void TMCETestUIEngineCmdFCSendSession::ExecuteL()
       
    48 	{
       
    49 	HBufC8* buf = HBufC8::NewLC(100);
       
    50 	TPtr8 itemPtr = buf->Des();
       
    51         itemPtr.Append( KFCMessage );
       
    52    	CleanupStack::Pop(buf); 
       
    53    	TInt err = KErrNone;    
       
    54    	TRAP(err, iEngine.FloorControl().SendL(iSession.Session(),buf));
       
    55 	if( err != KErrNone )
       
    56 		{
       
    57 		delete buf;
       
    58 		}
       
    59 	iEngine.EngineStateChangedL();    
       
    60 	}
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // TMCETestUIEngineCmdFCSendSession::Caption
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C const TDesC& TMCETestUIEngineCmdFCSendSession::Caption() const
       
    67 	{
       
    68 	return KCommandCaptionSendFCSession;
       
    69 	}
       
    70 
       
    71 
       
    72 
       
    73 
       
    74 // End of File