epoc32/include/es_wsms.inl
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // WS_ADDR.INL
       
    15 // Publich access to the WapPorts and the WapAddresses - this file is exported
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  
       
    25  Gets the WAP port number.
       
    26  
       
    27  @return WAP port number
       
    28  @publishedAll
       
    29  @released
       
    30  
       
    31 */
       
    32 inline TWapPortNumber TWapAddr::WapPort() const
       
    33     {
       
    34     return TWapPortNumber(Port());
       
    35     }
       
    36 
       
    37 
       
    38 /**
       
    39  *  Sets the wap port number.
       
    40  *  
       
    41  *  @param aPort WAP port number
       
    42  *  @publishedAll
       
    43  *  @released
       
    44  */
       
    45 inline void TWapAddr::SetWapPort(TWapPortNumber aPort)
       
    46     {
       
    47     SetPort(TUint(aPort));
       
    48     }
       
    49 
       
    50 
       
    51 /**
       
    52  *  Sets the WAP port address.
       
    53  *  
       
    54  *  @param aTel WAP address.
       
    55  *  @publishedAll
       
    56  *  @released
       
    57  */
       
    58 inline void TWapAddr::SetWapAddress(const TDesC8& aTel)
       
    59     {
       
    60     Mem::Copy(UserPtr(),aTel.Ptr(),aTel.Length()<EMaxWapAddressLength ? aTel.Length() : EMaxWapAddressLength);
       
    61     SetUserLen(aTel.Length());
       
    62     }
       
    63 
       
    64 
       
    65 /**
       
    66  *  Gets the WAP address.
       
    67  *  
       
    68  *  @return WAP address
       
    69  *  @publishedAll
       
    70  *  @released
       
    71  */
       
    72 inline TPtrC8 TWapAddr::WapAddress() const
       
    73     {
       
    74     return TPtrC8(UserPtr(),CONST_CAST(TWapAddr*,this)->GetUserLen());
       
    75     }
       
    76 
       
    77 
       
    78 /**
       
    79  *  Comparison operator.
       
    80  *  
       
    81  *  @param aAddr Object to compare.
       
    82  *  @return True if the object value's are equal.
       
    83  *  @publishedAll
       
    84  *  @released
       
    85  */
       
    86 inline TBool TWapAddr::operator==(const TWapAddr& aAddr) const
       
    87     {
       
    88     if (WapPort()==aAddr.WapPort())
       
    89         return ETrue;
       
    90     return EFalse;
       
    91     }