multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/src/TMCETestUIEngineCmdEnableAudioSink.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 #include "TMCETestUIEngineCmdEnableAudioSink.h"
       
    21 #include "CMCETestUIEngineSink.h"
       
    22 #include "CMCETestUIEngineVideoSink.h"
       
    23 #include "MCEAudioStream.h"
       
    24 #include "MCEVideoStream.h"
       
    25 #include <MCERtpSink.h>
       
    26 #include <MCEMediaSink.h>
       
    27 #include <MCESpeakerSink.h>
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // TMCETestUIEngineCmdEnableStream::TMCETestUIEngineCmdEnableStream
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 TMCETestUIEngineCmdEnableSink::TMCETestUIEngineCmdEnableSink(
       
    34             CMCETestUIEngine& aEngine,
       
    35 		    CMCETestUIEngineSink& aAudioSink )
       
    36     : TMCETestUIEngineCmdBase( aEngine ),
       
    37       iAudioSink( aAudioSink )
       
    38     {
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // TMCETestUIEngineCmdEnableSink::ExecuteL
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 EXPORT_C void TMCETestUIEngineCmdEnableSink::ExecuteL()
       
    46 	{
       
    47 	iAudioSink.Sink().EnableL();
       
    48 	iEngine.EngineStateChangedL();
       
    49 	}
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // TMCETestUIEngineCmdEnableSink::Caption
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C const TDesC& TMCETestUIEngineCmdEnableSink::Caption() const
       
    56 	{
       
    57 	return KCommandCaptionEnableSink;
       
    58 	}
       
    59 
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // TMCETestUIEngineCmdEnableVideoSink::TMCETestUIEngineCmdEnableVideoSink
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 TMCETestUIEngineCmdEnableVideoSink::TMCETestUIEngineCmdEnableVideoSink(
       
    66             CMCETestUIEngine& aEngine,
       
    67 		    CMCETestUIEngineVideoSink& aVideoSink )
       
    68     : TMCETestUIEngineCmdBase( aEngine ),
       
    69       iVideoSink( aVideoSink )
       
    70     {
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // TMCETestUIEngineCmdEnableVideoSink::ExecuteL
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 EXPORT_C void TMCETestUIEngineCmdEnableVideoSink::ExecuteL()
       
    78 	{
       
    79 	iVideoSink.Sink().EnableL();
       
    80 	iEngine.EngineStateChangedL();
       
    81 	}
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // TMCETestUIEngineCmdEnableVideoSink::Caption
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 EXPORT_C const TDesC& TMCETestUIEngineCmdEnableVideoSink::Caption() const
       
    88 	{
       
    89 	return KCommandCaptionEnableSink;
       
    90 	}
       
    91 // -----------------------------------------------------------------------------
       
    92 // TMCETestUIEngineCmdSendSR::TMCETestUIEngineCmdSendSR
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 TMCETestUIEngineCmdSendSR::TMCETestUIEngineCmdSendSR(
       
    96   							CMCETestUIEngine& aEngine,
       
    97 		    CMCETestUIEngineSink& aAudioSink )
       
    98     : TMCETestUIEngineCmdBase( aEngine ),
       
    99       iAudioSink( aAudioSink )
       
   100     {
       
   101     }
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // TMCETestUIEngineCmdSendSR::ExecuteL
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C void TMCETestUIEngineCmdSendSR::ExecuteL()
       
   108 	{
       
   109 	CMceRtpSink& rtpSink = ( CMceRtpSink& ) iAudioSink.Sink();
       
   110 	rtpSink.SendSRL();
       
   111 	iEngine.EngineStateChangedL();
       
   112 	}
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // TMCETestUIEngineCmdSendSR::Caption
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 EXPORT_C const TDesC& TMCETestUIEngineCmdSendSR::Caption() const
       
   119 	{
       
   120 	return KCommandCaptionSendSR;
       
   121 	}
       
   122 
       
   123 
       
   124 
       
   125 // End of File