multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/src/TMCETestUIEngineCmdSubscribeEvent.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 "TMCETestUIEngineCmdSubscribeEvent.h"
       
    24 #include "cmcetestuiengineoutevent.h"
       
    25 #include "cmcetestuiengineoutrefer.h"
       
    26 #include <MCEOutEvent.h>
       
    27 #include <mceoutrefer.h>
       
    28 
       
    29 
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // TMCETestUIEngineCmdSubscribeEvent::TMCETestUIEngineCmdSubscribeEvent
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TMCETestUIEngineCmdSubscribeEvent::TMCETestUIEngineCmdSubscribeEvent(
       
    36             CMCETestUIEngine& aEngine,
       
    37 		    CMCETestUIEngineOutEvent& aOutEvent )
       
    38     : TMCETestUIEngineCmdBase( aEngine ),
       
    39     iOutEvent( aOutEvent )
       
    40     {
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // TMCETestUIEngineCmdSubscribeEvent::ExecuteL
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C void TMCETestUIEngineCmdSubscribeEvent::ExecuteL()
       
    48 	{
       
    49 
       
    50 	// ---------------------------------------
       
    51 	// Next is to route INVITE to MCETestUI
       
    52 /*	CDesC8Array* headers = new (ELeave) CDesC8ArrayFlat( 1 );
       
    53 	CleanupStack::PushL( headers );
       
    54 	headers->AppendL( KAcceptContactMCETestUI );
       
    55 
       
    56 	// ---------------------------------------
       
    57 	// Next is to find a way around MMCE's bug
       
    58 	
       
    59 	HBufC8* contentType = KNullDesC8().AllocLC();
       
    60 	HBufC8* content = KNullDesC8().AllocLC();
       
    61 */	
       
    62 	/// --------------------------------------
       
    63 	
       
    64 	iOutEvent.OutEvent().SubscribeL();
       
    65 /*	CleanupStack::Pop( content );
       
    66 	CleanupStack::Pop( contentType );
       
    67 	CleanupStack::Pop( headers );
       
    68 */	iEngine.EngineStateChangedL();
       
    69 	}
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // TMCETestUIEngineCmdSubscribeEvent::Caption
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 EXPORT_C const TDesC& TMCETestUIEngineCmdSubscribeEvent::Caption() const
       
    76 	{
       
    77 	return KCommandCaptionSubscribeEvent;
       
    78 	}
       
    79 
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // TMCETestUIEngineCmdRefer::TMCETestUIEngineCmdRefer
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 TMCETestUIEngineCmdRefer::TMCETestUIEngineCmdRefer(
       
    86             CMCETestUIEngine& aEngine,
       
    87 		    CMCETestUIEngineOutRefer& aOutRefer )
       
    88     : TMCETestUIEngineCmdBase( aEngine ),
       
    89     iOutRefer( aOutRefer )
       
    90     {
       
    91     }
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // TMCETestUIEngineCmdRefer::ExecuteL
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 EXPORT_C void TMCETestUIEngineCmdRefer::ExecuteL()
       
    98 	{
       
    99 	iEngine.CreateOutEventL(iOutRefer.OutRefer().ReferL());
       
   100 	iEngine.EngineStateChangedL();
       
   101 	}
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // TMCETestUIEngineCmdRefer::Caption
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C const TDesC& TMCETestUIEngineCmdRefer::Caption() const
       
   108 	{
       
   109 	return KCommandCaptionRefer;
       
   110 	}
       
   111 
       
   112 
       
   113 // End of File