natfw/natfwstunserver/src/natfwstunsrvclientsession.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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 of STUN server client session
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "natfwstunsrvclientsession.h"
       
    22 #include "natfwstunsrvimpl.h"
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // CNATFWSTUNSrvClientSession::CNATFWSTUNSrvClientSession
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 CNATFWSTUNSrvClientSession::CNATFWSTUNSrvClientSession()
       
    29     {    
       
    30     }
       
    31     
       
    32     
       
    33 // ---------------------------------------------------------------------------
       
    34 // CNATFWSTUNSrvClientSession::NewL
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 EXPORT_C CNATFWSTUNSrvClientSession* CNATFWSTUNSrvClientSession::NewL( 
       
    38         MNATFWStunSrvObserver& aObserver,
       
    39         MNcmConnectionMultiplexer& aMultiplexer )
       
    40     {
       
    41     CNATFWSTUNSrvClientSession* self = 
       
    42                             new ( ELeave ) CNATFWSTUNSrvClientSession( );
       
    43     CleanupStack::PushL( self );
       
    44     self->ConstructL( aObserver, aMultiplexer );
       
    45     CleanupStack::Pop( self );
       
    46     return self;
       
    47     }   
       
    48 
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CNATFWSTUNSrvClientSession::ConstructL 
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 void CNATFWSTUNSrvClientSession::ConstructL( MNATFWStunSrvObserver& aObserver,
       
    55                                    MNcmConnectionMultiplexer& aMultiplexer )
       
    56     {
       
    57     iImplementation = CNATFWSTUNSrvImpl::NewL( aObserver, aMultiplexer );
       
    58     }
       
    59 
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CNATFWSTUNSrvClientSession::~CNATFWSTUNSrvClientSession 
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65  CNATFWSTUNSrvClientSession::~CNATFWSTUNSrvClientSession()
       
    66     {
       
    67     delete iImplementation;
       
    68     }
       
    69     
       
    70     
       
    71 // ---------------------------------------------------------------------------
       
    72 // CNATFWSTUNSrvClientSession::AddAuthenticationParamsL 
       
    73 // ---------------------------------------------------------------------------
       
    74 //    
       
    75 EXPORT_C void CNATFWSTUNSrvClientSession::AddAuthenticationParamsL(
       
    76     const RPointerArray<CNATFWCredentials>& aIdentifications )
       
    77     {
       
    78     iImplementation->AddAuthenticationParamsL( aIdentifications );
       
    79     }
       
    80      
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // CNATFWSTUNSrvClientSession::RemoveAuthenticationParamsL 
       
    84 // ---------------------------------------------------------------------------
       
    85 //     
       
    86 EXPORT_C void CNATFWSTUNSrvClientSession::RemoveAuthenticationParamsL( 
       
    87     const RPointerArray<CNATFWCredentials>& aIdentifications )
       
    88     {
       
    89     iImplementation->RemoveAuthenticationParamsL( aIdentifications );
       
    90     }
       
    91    
       
    92     
       
    93 // ---------------------------------------------------------------------------
       
    94 // CNATFWSTUNSrvClientSession::SetRoleL
       
    95 // ---------------------------------------------------------------------------
       
    96 //     
       
    97 EXPORT_C void CNATFWSTUNSrvClientSession::SetRoleL( 
       
    98     TNATFWIceRole aRole, TUint64 aTieBreaker ) 
       
    99     {
       
   100     iImplementation->SetRoleL( aRole, aTieBreaker );
       
   101     }
       
   102     
       
   103        
       
   104