mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/src/mcertpsink.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "mcertpsink.h"
       
    20 #include "mcemediastream.h"
       
    21 #include "mcesession.h"
       
    22 
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CMceRtpSink::NewL
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CMceRtpSink* CMceRtpSink::NewL()
       
    32     {
       
    33     CMceRtpSink* self = NewLC();
       
    34     CleanupStack::Pop( self );
       
    35     return self;
       
    36     }
       
    37 
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CMceRtpSink::NewLC
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 EXPORT_C CMceRtpSink* CMceRtpSink::NewLC()
       
    44     {
       
    45     CMceRtpSink* self = new (ELeave) CMceRtpSink();
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL( EFalse );
       
    48     return self;    
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CMceRtpSink::NewL
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C CMceRtpSink* CMceRtpSink::NewL( TBool aSuppressRTCP, 
       
    56 		                                 HBufC8* /*aIdentity*/ )
       
    57     {
       
    58     
       
    59     CMceRtpSink* self = new (ELeave) CMceRtpSink();
       
    60     CleanupStack::PushL( self );
       
    61     self->ConstructL( aSuppressRTCP );
       
    62     CleanupStack::Pop( self );
       
    63     return self;
       
    64     
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CMceRtpSink::~CMceRtpSink
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 EXPORT_C CMceRtpSink::~CMceRtpSink()
       
    72     {
       
    73     }
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CMceRtpSink::EnableL
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 EXPORT_C void CMceRtpSink::EnableL() 
       
    80     {
       
    81     CMceMediaSink::DoEnableL();
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CMceRtpSink::DisableL
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 EXPORT_C void CMceRtpSink::DisableL() 
       
    89     {
       
    90     CMceMediaSink::DoDisableL();
       
    91     }
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // CMceRtpSink::SendSRL
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 EXPORT_C void CMceRtpSink::SendSRL()
       
    98     {
       
    99     __ASSERT_ALWAYS( iStream &&
       
   100                      iStream->Session() &&
       
   101                      iStream->Session()->State() != CMceSession::EIdle &&
       
   102                      iStream->Session()->State() != CMceSession::EIncoming,
       
   103                      User::Leave( KErrNotReady ) );
       
   104 	// NOP
       
   105     }
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // CMceRtpSink::LastPacket
       
   109 // -----------------------------------------------------------------------------
       
   110 //
       
   111 EXPORT_C TUint32 CMceRtpSink::LastPacket() const
       
   112     {    
       
   113     return iLastPacket;    
       
   114     }
       
   115 
       
   116 // -----------------------------------------------------------------------------
       
   117 // CMceRtpSink::Ssrc
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 EXPORT_C TUint32 CMceRtpSink::Ssrc() const
       
   121     {    
       
   122     return iSSRC;    
       
   123     }
       
   124     
       
   125 // -----------------------------------------------------------------------------
       
   126 // CMceRtpSink::UpdateL
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 EXPORT_C void CMceRtpSink::UpdateL( TBool aSuppressRTCP, 
       
   130 		                            HBufC8* /*aIdentity*/ )
       
   131     {    
       
   132     iSuppressRTCP = aSuppressRTCP;
       
   133     }
       
   134 
       
   135 // -----------------------------------------------------------------------------
       
   136 // CMceRtpSink::CMceRtpSink
       
   137 // -----------------------------------------------------------------------------
       
   138 //
       
   139 CMceRtpSink::CMceRtpSink()
       
   140    : CMceMediaSink()
       
   141     {
       
   142     iType = KMceRTPSink;
       
   143     }
       
   144 
       
   145 // -----------------------------------------------------------------------------
       
   146 // CMceRtpSink::ConstructL
       
   147 // -----------------------------------------------------------------------------
       
   148 //
       
   149 void CMceRtpSink::ConstructL( TBool aSuppressRTCP )
       
   150     {
       
   151     iSuppressRTCP = aSuppressRTCP;
       
   152     }