epoc32/include/es_wsms.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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     }