smsprotocols/smsstack/wapprot/Inc/es_wsms.inl
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.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  @file
       
    21  
       
    22  Gets the WAP port number.
       
    23  
       
    24  @return WAP port number
       
    25  @publishedAll
       
    26  @released
       
    27  
       
    28 */
       
    29 inline TWapPortNumber TWapAddr::WapPort() const
       
    30     {
       
    31     return TWapPortNumber(Port());
       
    32     }
       
    33 
       
    34 
       
    35 /**
       
    36  *  Sets the wap port number.
       
    37  *  
       
    38  *  @param aPort WAP port number
       
    39  *  @publishedAll
       
    40  *  @released
       
    41  */
       
    42 inline void TWapAddr::SetWapPort(TWapPortNumber aPort)
       
    43     {
       
    44     SetPort(TUint(aPort));
       
    45     }
       
    46 
       
    47 
       
    48 /**
       
    49  *  Sets the WAP port address.
       
    50  *  
       
    51  *  @param aTel WAP address.
       
    52  *  @publishedAll
       
    53  *  @released
       
    54  */
       
    55 inline void TWapAddr::SetWapAddress(const TDesC8& aTel)
       
    56     {
       
    57     Mem::Copy(UserPtr(),aTel.Ptr(),aTel.Length()<EMaxWapAddressLength ? aTel.Length() : EMaxWapAddressLength);
       
    58     SetUserLen(aTel.Length());
       
    59     }
       
    60 
       
    61 
       
    62 /**
       
    63  *  Gets the WAP address.
       
    64  *  
       
    65  *  @return WAP address
       
    66  *  @publishedAll
       
    67  *  @released
       
    68  */
       
    69 inline TPtrC8 TWapAddr::WapAddress() const
       
    70     {
       
    71     return TPtrC8(UserPtr(),const_cast<TWapAddr*>(this)->GetUserLen());
       
    72     }
       
    73 
       
    74 
       
    75 /**
       
    76  *  Comparison operator.
       
    77  *  
       
    78  *  @param aAddr Object to compare.
       
    79  *  @return True if the object value's are equal.
       
    80  *  @publishedAll
       
    81  *  @released
       
    82  */
       
    83 inline TBool TWapAddr::operator==(const TWapAddr& aAddr) const
       
    84     {
       
    85     if (WapPort()==aAddr.WapPort())
       
    86         return ETrue;
       
    87     return EFalse;
       
    88     }