natfw/natfwclient/src/natfwcandidate.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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 
       
    20 
       
    21 
       
    22 #include <es_sock.h>
       
    23 #include <utf.h>
       
    24 #include "natfwcandidate.h"
       
    25 #include "natfwclientlogs.h"
       
    26 
       
    27 // CONSTANTS
       
    28 const TInt KMaxLengthOfFQDN = 255;
       
    29 _LIT8(KValidFQDNChars,
       
    30       "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-");
       
    31 
       
    32 // ======== MEMBER FUNCTIONS ========
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // CNATFWCandidate::CNATFWCandidate
       
    36 // ---------------------------------------------------------------------------
       
    37 //
       
    38 CNATFWCandidate::CNATFWCandidate( )
       
    39     :
       
    40     iTransportAddr( KInetAddrNone, 0 ),
       
    41     iBase( KInetAddrNone, 0 )
       
    42     {
       
    43 
       
    44     }
       
    45 
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 //  CNATFWCandidate::ConstructL
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 void CNATFWCandidate::ConstructL()
       
    52     {
       
    53     iFoundation.Assign( KNullDesC8().AllocL() );
       
    54     iTransportDomainAddr.Assign( KNullDesC8().AllocL() );
       
    55     iTransportAddr = TInetAddr();
       
    56     }
       
    57 
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // CNATFWCandidate::ConstructL
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 void CNATFWCandidate::ConstructL( const CNATFWCandidate& aCandidate )
       
    64     {
       
    65     __NATFWCLIENT( "CNATFWCandidate::ConstructL" )
       
    66 
       
    67     iPriority = aCandidate.Priority();
       
    68     iTransportAddr = aCandidate.TransportAddr();
       
    69     iTransportProtocol = aCandidate.TransportProtocol();
       
    70     iTransportDomainAddr.Assign( aCandidate.TransportDomainAddr().AllocL() );
       
    71     iTransportDomainPort = aCandidate.TransportDomainPort();
       
    72     iBase = aCandidate.Base();
       
    73     iFoundation.Assign( aCandidate.Foundation().AllocL() );
       
    74     iType = aCandidate.Type();
       
    75     iComponentId = aCandidate.ComponentId();
       
    76     iSessionId = aCandidate.SessionId();
       
    77     iStreamId = aCandidate.StreamId();
       
    78     iStreamCollectionId = aCandidate.StreamCollectionId();
       
    79     }
       
    80 
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // CNATFWCandidate::NewL
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C CNATFWCandidate* CNATFWCandidate::NewL()
       
    87     {
       
    88     __NATFWCLIENT("CNATFWCandidate::NewL")
       
    89 
       
    90     CNATFWCandidate* self = CNATFWCandidate::NewLC();
       
    91     CleanupStack::Pop( self );
       
    92     return self;
       
    93     }
       
    94 
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 // CNATFWCandidate::NewLC
       
    98 // ---------------------------------------------------------------------------
       
    99 //
       
   100 EXPORT_C CNATFWCandidate* CNATFWCandidate::NewLC()
       
   101     {
       
   102     __NATFWCLIENT("CNATFWCandidate::NewLC")
       
   103 
       
   104     CNATFWCandidate* self = new( ELeave ) CNATFWCandidate();
       
   105     CleanupStack::PushL( self );
       
   106     self->ConstructL();
       
   107     return self;
       
   108     }
       
   109 
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // CNATFWCandidate::NewL
       
   113 // ---------------------------------------------------------------------------
       
   114 //
       
   115 EXPORT_C CNATFWCandidate* CNATFWCandidate::NewL(
       
   116         const CNATFWCandidate& aCandidate )
       
   117     {
       
   118     __NATFWCLIENT("CNATFWCandidate::NewL (copy)")
       
   119 
       
   120     CNATFWCandidate* self = CNATFWCandidate::NewLC( aCandidate );
       
   121     CleanupStack::Pop( self );
       
   122     return self;
       
   123     }
       
   124 
       
   125 
       
   126 // ---------------------------------------------------------------------------
       
   127 // CNATFWCandidate::NewLC
       
   128 // ---------------------------------------------------------------------------
       
   129 //
       
   130 EXPORT_C CNATFWCandidate* CNATFWCandidate::NewLC(
       
   131         const CNATFWCandidate& aCandidate )
       
   132     {
       
   133     __NATFWCLIENT("CNATFWCandidate::NewLC(copy)")
       
   134 
       
   135     CNATFWCandidate* self = new ( ELeave ) CNATFWCandidate( );
       
   136     CleanupStack::PushL( self );
       
   137     self->ConstructL( aCandidate );
       
   138     return self;
       
   139     }
       
   140 
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CNATFWCandidate::~CNATFWCandidate
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 CNATFWCandidate::~CNATFWCandidate()
       
   147     {
       
   148     __NATFWCLIENT("CNATFWCandidate::~CNATFWCandidate")
       
   149 
       
   150     iTransportDomainAddr.Close();
       
   151     iFoundation.Close();
       
   152     }
       
   153 
       
   154 
       
   155 // ---------------------------------------------------------------------------
       
   156 // CNATFWCandidate::SessionId
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 EXPORT_C TUint CNATFWCandidate::SessionId() const
       
   160     {
       
   161     __NATFWCLIENT_INT1( "CNATFWCandidate::SessionId", iSessionId )
       
   162 
       
   163     return iSessionId;
       
   164     }
       
   165 
       
   166 
       
   167 // ---------------------------------------------------------------------------
       
   168 // CNATFWCandidate::SetSessionId
       
   169 // ---------------------------------------------------------------------------
       
   170 //
       
   171 EXPORT_C void CNATFWCandidate::SetSessionId( TUint aId )
       
   172     {
       
   173     __NATFWCLIENT_INT1( "CNATFWCandidate::SetSessionId", aId )
       
   174 
       
   175     iSessionId = aId;
       
   176     }
       
   177 
       
   178 
       
   179 // ---------------------------------------------------------------------------
       
   180 // CNATFWCandidate::StreamCollectionId
       
   181 // ---------------------------------------------------------------------------
       
   182 //
       
   183 EXPORT_C TUint CNATFWCandidate::StreamCollectionId() const
       
   184     {
       
   185     __NATFWCLIENT_INT1( "CNATFWCandidate::StreamCollectionId",
       
   186         iStreamCollectionId )
       
   187 
       
   188     return iStreamCollectionId;
       
   189     }
       
   190 
       
   191 
       
   192 // ---------------------------------------------------------------------------
       
   193 // SetStreamCollectionId
       
   194 // ---------------------------------------------------------------------------
       
   195 //
       
   196 EXPORT_C void CNATFWCandidate::SetStreamCollectionId( TUint aId )
       
   197     {
       
   198     __NATFWCLIENT_INT1( "CNATFWCandidate::SetStreamCollectionId", aId )
       
   199 
       
   200     iStreamCollectionId = aId;
       
   201     }
       
   202 
       
   203 
       
   204 // ---------------------------------------------------------------------------
       
   205 // CNATFWCandidate::StreamId
       
   206 // ---------------------------------------------------------------------------
       
   207 //
       
   208 EXPORT_C TUint CNATFWCandidate::StreamId() const
       
   209     {
       
   210     __NATFWCLIENT_INT1( "CNATFWCandidate::StreamId", iStreamId )
       
   211 
       
   212     return iStreamId;
       
   213     }
       
   214 
       
   215 
       
   216 // ---------------------------------------------------------------------------
       
   217 // CNATFWCandidate::SetStreamId
       
   218 // ---------------------------------------------------------------------------
       
   219 //
       
   220 EXPORT_C void CNATFWCandidate::SetStreamId( TUint aId )
       
   221     {
       
   222     __NATFWCLIENT_INT1( "CNATFWCandidate::SetStreamId", aId )
       
   223 
       
   224     iStreamId = aId;
       
   225     }
       
   226 
       
   227 
       
   228 // ---------------------------------------------------------------------------
       
   229 // CNATFWCandidate::Priority
       
   230 // ---------------------------------------------------------------------------
       
   231 //
       
   232 EXPORT_C TUint CNATFWCandidate::Priority() const
       
   233     {
       
   234     __NATFWCLIENT_INT1( "CNATFWCandidate::Priority", iPriority )
       
   235 
       
   236     return iPriority;
       
   237     }
       
   238 
       
   239 
       
   240 // ---------------------------------------------------------------------------
       
   241 // CNATFWCandidate::SetPriority
       
   242 // ---------------------------------------------------------------------------
       
   243 //
       
   244 EXPORT_C void CNATFWCandidate::SetPriority( TUint aPriority )
       
   245     {
       
   246     __NATFWCLIENT_INT1( "CNATFWCandidate::SetPriority", aPriority )
       
   247 
       
   248     iPriority = aPriority;
       
   249     }
       
   250 
       
   251 
       
   252 // ---------------------------------------------------------------------------
       
   253 //  CNATFWCandidate::TransportAddr
       
   254 // ---------------------------------------------------------------------------
       
   255 //
       
   256 EXPORT_C const TInetAddr& CNATFWCandidate::TransportAddr() const
       
   257     {
       
   258     __NATFWCLIENT_ADDR( "CNATFWCandidate::TransportAddr", iTransportAddr )
       
   259 
       
   260     return iTransportAddr;
       
   261     }
       
   262 
       
   263 
       
   264 // ---------------------------------------------------------------------------
       
   265 // CNATFWCandidate::SetTransportAddrL
       
   266 // ---------------------------------------------------------------------------
       
   267 //
       
   268 EXPORT_C void CNATFWCandidate::SetTransportAddrL( const TInetAddr& aAddr )
       
   269     {
       
   270     __NATFWCLIENT_ADDR( "CNATFWCandidate::SetTransportAddrL", aAddr )
       
   271 
       
   272     iTransportAddr = aAddr;
       
   273 
       
   274     if ( !iTransportDomainAddr.Length() )
       
   275         {
       
   276         // Update domain address as well
       
   277         THostName name;
       
   278         aAddr.Output( name );
       
   279 
       
   280         HBufC8* addrBuf = HBufC8::NewLC( name.Length() );
       
   281         TPtr8 addrBufPtr = addrBuf->Des();
       
   282         User::LeaveIfError(
       
   283             CnvUtfConverter::ConvertFromUnicodeToUtf8( addrBufPtr, name ) );
       
   284 
       
   285         iTransportDomainAddr.Close();
       
   286         iTransportDomainAddr.Assign( addrBuf ); // takes ownership
       
   287         iTransportDomainPort = aAddr.Port();
       
   288         CleanupStack::Pop( addrBuf );
       
   289         }
       
   290     }
       
   291 
       
   292 
       
   293 // ---------------------------------------------------------------------------
       
   294 // CNATFWCandidate::TransportDomainAddr
       
   295 // ---------------------------------------------------------------------------
       
   296 //
       
   297 EXPORT_C const TDesC8& CNATFWCandidate::TransportDomainAddr() const
       
   298     {
       
   299     __NATFWCLIENT_STR8( "CNATFWCandidate::TransportDomainAddr",
       
   300         iTransportDomainAddr )
       
   301 
       
   302     return iTransportDomainAddr;
       
   303     }
       
   304 
       
   305 // ---------------------------------------------------------------------------
       
   306 // CNATFWCandidate::TransportDomainPort
       
   307 // ---------------------------------------------------------------------------
       
   308 //
       
   309 EXPORT_C TUint CNATFWCandidate::TransportDomainPort() const
       
   310     {
       
   311     __NATFWCLIENT_INT1( "CNATFWCandidate::TransportDomainAddrPort",
       
   312         iTransportDomainPort)
       
   313 
       
   314     return iTransportDomainPort;
       
   315     }
       
   316 
       
   317 
       
   318 // ---------------------------------------------------------------------------
       
   319 // CNATFWCandidate::SetTransportDomainAddrL
       
   320 // ---------------------------------------------------------------------------
       
   321 //
       
   322 EXPORT_C void CNATFWCandidate::SetTransportDomainAddrL( const TDesC8& aAddr,
       
   323     TUint aPort )
       
   324     {
       
   325     __NATFWCLIENT_STR( "CNATFWCandidate::SetTransportDomainAddrL - domain",
       
   326         aAddr )
       
   327     __NATFWCLIENT_INT1( "CNATFWCandidate::SetTransportDomainAddrL - port",
       
   328         aPort )
       
   329 
       
   330     // Verify that the domain name doesn't exceed maximum length for FQDNs
       
   331     if ( KMaxLengthOfFQDN < aAddr.Length() )
       
   332         {
       
   333         User::Leave( KErrOverflow );
       
   334         }
       
   335 
       
   336     // Verify that the domain name contains only valid FQDN characters
       
   337     for ( TInt i( 0 ); i < aAddr.Length(); i++ )
       
   338         {
       
   339         if ( KErrNotFound == KValidFQDNChars().Locate( aAddr[ i ] ) )
       
   340             {
       
   341             User::Leave( KErrArgument );
       
   342             }
       
   343         }
       
   344 
       
   345     iTransportDomainAddr.Close();
       
   346     iTransportDomainAddr.Assign( aAddr.AllocL() );
       
   347     iTransportDomainPort = aPort;
       
   348 
       
   349     TInetAddr addr;
       
   350     HBufC* addrBuf = HBufC::NewLC( aAddr.Length() );
       
   351     TPtr addrPtr( addrBuf->Des() );
       
   352     User::LeaveIfError(
       
   353         CnvUtfConverter::ConvertToUnicodeFromUtf8( addrPtr, aAddr ) );
       
   354 
       
   355     if ( !addr.Input( addrPtr ) )
       
   356         {
       
   357         // This is a valid IP address so set the transport address as well
       
   358         iTransportAddr = addr;
       
   359         iTransportAddr.SetPort( aPort );
       
   360         __NATFWCLIENT_ADDR(
       
   361             "CNATFWCandidate::SetTransportDomainAddrL: IP now",
       
   362                 iTransportAddr )
       
   363         }
       
   364 
       
   365     CleanupStack::PopAndDestroy( addrBuf );
       
   366     }
       
   367 
       
   368 
       
   369 // ---------------------------------------------------------------------------
       
   370 // CNATFWCandidate::TransportProtocol
       
   371 // ---------------------------------------------------------------------------
       
   372 //
       
   373 EXPORT_C TUint CNATFWCandidate::TransportProtocol() const
       
   374     {
       
   375     __NATFWCLIENT_INT1( "CNATFWCandidate::TransportProtocol",
       
   376         iTransportProtocol )
       
   377 
       
   378     return iTransportProtocol;
       
   379     }
       
   380 
       
   381 
       
   382 // ---------------------------------------------------------------------------
       
   383 // CNATFWCandidate::SetTransportProtocol
       
   384 // ---------------------------------------------------------------------------
       
   385 //
       
   386 EXPORT_C void CNATFWCandidate::SetTransportProtocol(
       
   387         TUint aTransportProtocol )
       
   388     {
       
   389     __NATFWCLIENT_INT1( "CNATFWCandidate::SetTransportProtocol",
       
   390         aTransportProtocol )
       
   391 
       
   392     iTransportProtocol = aTransportProtocol;
       
   393     }
       
   394 
       
   395 
       
   396 // ---------------------------------------------------------------------------
       
   397 // CNATFWCandidate::Base
       
   398 // ---------------------------------------------------------------------------
       
   399 //
       
   400 EXPORT_C const TInetAddr& CNATFWCandidate::Base() const
       
   401     {
       
   402     __NATFWCLIENT_ADDR( "CNATFWCandidate::Base", iBase )
       
   403 
       
   404     return iBase;
       
   405     }
       
   406 
       
   407 
       
   408 // ---------------------------------------------------------------------------
       
   409 // CNATFWCandidate::SetBase
       
   410 // ---------------------------------------------------------------------------
       
   411 //
       
   412 EXPORT_C void CNATFWCandidate::SetBase( const TInetAddr& aBase )
       
   413     {
       
   414     __NATFWCLIENT_ADDR( "CNATFWCandidate::SetBase", aBase )
       
   415 
       
   416     iBase = aBase;
       
   417     }
       
   418 
       
   419 
       
   420 // ---------------------------------------------------------------------------
       
   421 // CNATFWCandidate::Foundation
       
   422 // ---------------------------------------------------------------------------
       
   423 //
       
   424 EXPORT_C const TDesC8& CNATFWCandidate::Foundation() const
       
   425     {
       
   426     __NATFWCLIENT_STR8( "CNATFWCandidate::Foundation", iFoundation )
       
   427 
       
   428     return iFoundation;
       
   429     }
       
   430 
       
   431 
       
   432 // ---------------------------------------------------------------------------
       
   433 // CNATFWCandidate::SetFoundationL
       
   434 // ---------------------------------------------------------------------------
       
   435 //
       
   436 EXPORT_C void CNATFWCandidate::SetFoundationL( const TDesC8& aFoundation )
       
   437     {
       
   438     __NATFWCLIENT_STR8( "CNATFWCandidate::SetFoundationL", aFoundation )
       
   439 
       
   440     iFoundation.Close();
       
   441     iFoundation.Assign( aFoundation.AllocL() );
       
   442     }
       
   443 
       
   444 
       
   445 // ---------------------------------------------------------------------------
       
   446 // CNATFWCandidate::Type
       
   447 // ---------------------------------------------------------------------------
       
   448 //
       
   449 EXPORT_C CNATFWCandidate::TCandidateType CNATFWCandidate::Type() const
       
   450     {
       
   451     __NATFWCLIENT_INT1( "CNATFWCandidate::Type", iType )
       
   452 
       
   453     return iType;
       
   454     }
       
   455 
       
   456 
       
   457 // ---------------------------------------------------------------------------
       
   458 // CNATFWCandidate::SetType
       
   459 // ---------------------------------------------------------------------------
       
   460 //
       
   461 EXPORT_C void CNATFWCandidate::SetType(
       
   462         CNATFWCandidate::TCandidateType aType )
       
   463     {
       
   464     __NATFWCLIENT_INT1( "CNATFWCandidate::SetType", aType )
       
   465 
       
   466     iType = aType;
       
   467     }
       
   468 
       
   469 
       
   470 // ---------------------------------------------------------------------------
       
   471 // CNATFWCandidate::ComponentId
       
   472 // ---------------------------------------------------------------------------
       
   473 //
       
   474 EXPORT_C TUint CNATFWCandidate::ComponentId() const
       
   475     {
       
   476     __NATFWCLIENT_INT1( "CNATFWCandidate::ComponentId", iComponentId )
       
   477 
       
   478     return iComponentId;
       
   479     }
       
   480 
       
   481 
       
   482 // ---------------------------------------------------------------------------
       
   483 // CNATFWCandidate::SetComponentId
       
   484 // ---------------------------------------------------------------------------
       
   485 //
       
   486 EXPORT_C void CNATFWCandidate::SetComponentId( TUint aComponentId)
       
   487     {
       
   488     __NATFWCLIENT_INT1( "CNATFWCandidate::SetComponentId", aComponentId )
       
   489 
       
   490     iComponentId = aComponentId;
       
   491     }
       
   492 
       
   493 
       
   494 // ---------------------------------------------------------------------------
       
   495 // CNATFWCandidate::CompareFoundations
       
   496 // ---------------------------------------------------------------------------
       
   497 //
       
   498 EXPORT_C TBool CNATFWCandidate::CompareFoundations(
       
   499     const CNATFWCandidate& aSource, const CNATFWCandidate& aTarget )
       
   500     {
       
   501     __NATFWCLIENT( "CNATFWCandidate::CompareFoundations" )
       
   502 
       
   503     return ( aSource.iFoundation == aTarget.iFoundation );
       
   504     }
       
   505 
       
   506 
       
   507 // ---------------------------------------------------------------------------
       
   508 // CNATFWCandidate::PriorityOrder
       
   509 // Implements TLinearOrder.
       
   510 // ---------------------------------------------------------------------------
       
   511 //
       
   512 EXPORT_C TInt CNATFWCandidate::PriorityOrder( const CNATFWCandidate& aC1,
       
   513         const CNATFWCandidate& aC2 )
       
   514     {
       
   515     return ( aC2.iPriority - aC1.iPriority );
       
   516     }
       
   517 
       
   518 
       
   519 // ---------------------------------------------------------------------------
       
   520 // CNATFWCandidate::CopyL
       
   521 // ---------------------------------------------------------------------------
       
   522 //
       
   523 EXPORT_C void CNATFWCandidate::CopyL( const CNATFWCandidate& aCandidate )
       
   524     {
       
   525     iPriority = aCandidate.Priority();
       
   526     iTransportAddr = aCandidate.TransportAddr();
       
   527     iTransportProtocol = aCandidate.TransportProtocol();
       
   528     iTransportDomainAddr.Close();
       
   529     iTransportDomainAddr.Assign( aCandidate.TransportDomainAddr().AllocL() );
       
   530     iTransportDomainPort = aCandidate.TransportDomainPort();
       
   531     iBase = aCandidate.Base();
       
   532     iFoundation.Close();
       
   533     iFoundation.Assign( aCandidate.Foundation().AllocL() );
       
   534     iType = aCandidate.Type();
       
   535     iComponentId = aCandidate.ComponentId();
       
   536     iSessionId = aCandidate.SessionId();
       
   537     iStreamId = aCandidate.StreamId();
       
   538     iStreamCollectionId = aCandidate.StreamCollectionId();
       
   539     }
       
   540 
       
   541 
       
   542 // ---------------------------------------------------------------------------
       
   543 // CNATFWCandidate::operator==
       
   544 // ---------------------------------------------------------------------------
       
   545 //
       
   546 EXPORT_C TBool CNATFWCandidate::operator==(
       
   547         const CNATFWCandidate& aCandidate ) const
       
   548     {
       
   549     return (
       
   550         iPriority == aCandidate.Priority()
       
   551         && iTransportAddr.CmpAddr( aCandidate.TransportAddr() )
       
   552         && iTransportDomainAddr == aCandidate.TransportDomainAddr()
       
   553         && iTransportDomainPort == aCandidate.TransportDomainPort()
       
   554         && iTransportProtocol == aCandidate.TransportProtocol()
       
   555         && iBase.CmpAddr( aCandidate.Base() )
       
   556         && iFoundation == aCandidate.Foundation()
       
   557         && iType == aCandidate.Type()
       
   558         && iComponentId == aCandidate.ComponentId()
       
   559         && iSessionId == aCandidate.SessionId()
       
   560         && iStreamId == aCandidate.StreamId()
       
   561         && iStreamCollectionId == aCandidate.StreamCollectionId() );
       
   562     }
       
   563 
       
   564 
       
   565 // ---------------------------------------------------------------------------
       
   566 // CNATFWCandidate::operator!=
       
   567 // ---------------------------------------------------------------------------
       
   568 //
       
   569 EXPORT_C TBool CNATFWCandidate::operator!=(
       
   570         const CNATFWCandidate& aCandidate ) const
       
   571     {
       
   572     return (
       
   573         iPriority != aCandidate.Priority()
       
   574         || !iTransportAddr.CmpAddr( aCandidate.TransportAddr() )
       
   575         || iTransportDomainAddr != aCandidate.TransportDomainAddr()
       
   576         || iTransportDomainPort != aCandidate.TransportDomainPort()
       
   577         || iTransportProtocol != aCandidate.TransportProtocol()
       
   578         || !iBase.CmpAddr( aCandidate.Base() )
       
   579         || iFoundation != aCandidate.Foundation()
       
   580         || iType != aCandidate.Type()
       
   581         || iComponentId != aCandidate.ComponentId()
       
   582         || iSessionId != aCandidate.SessionId()
       
   583         || iStreamId != aCandidate.StreamId()
       
   584         || iStreamCollectionId != aCandidate.StreamCollectionId() );
       
   585     }