datacommsserver/esockserver/inc/ES_SOCK.INL
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 //
       
    15 
       
    16 
       
    17 
       
    18 inline SSockAddr *TSockAddr::BasePtr() const
       
    19 /**
       
    20 This function returns the end point to a connection.
       
    21 
       
    22 @return socket address
       
    23 */
       
    24 	{ return (SSockAddr*)iBuf; }
       
    25 
       
    26 
       
    27 inline TUint8 *TSockAddr::UserPtr() const
       
    28 /** Gets an offset to place data after the base class data. This function is mainly 
       
    29 intended for use in derived classes.
       
    30 @return Pointer to derived class intended data area */
       
    31 	{ return (TUint8*)(BasePtr()+1); }
       
    32 
       
    33 inline TUint16 ByteOrder::Swap16(TUint aVal)
       
    34 /** 
       
    35 Reverses the order of the bytes in a 16-bit value.
       
    36 	
       
    37 @param aVal The value to reverse. 
       
    38 @return The reversed value. 
       
    39 */
       
    40 	{ return ByteOrder::Swap16((TUint16)aVal); }
       
    41 
       
    42 inline TNameRecord::TNameRecord()
       
    43 	:iName(),iAddr(),iFlags(0)	
       
    44 /** 
       
    45 Trivial C++ constructor. This sets the fields in the 
       
    46 class to suitable default values. 
       
    47 */
       
    48 	{}
       
    49 
       
    50 inline TNifProgress::TNifProgress()	:iStage(0), iError(KErrNone) 
       
    51 /**
       
    52 It sets the iStage data member to 0 and the iError data member to KErrNone.
       
    53 */
       
    54 	{}
       
    55 
       
    56 inline TNifProgress::TNifProgress(TInt aStage, TInt aError)	:iStage(aStage), iError(aError)
       
    57 /**
       
    58 It sets the iStage data member to aStage and the iError data member to aError.
       
    59 */
       
    60 	{}
       
    61 
       
    62 inline TBool TNifProgress::operator==(const TNifProgress& aRHS) const
       
    63     {
       
    64 	return iStage==aRHS.iStage && iError==aRHS.iError;
       
    65     }
       
    66 
       
    67 inline RSubConnection::TEventFilter::TEventFilter(TInt32 aEventGroupId, TUint32 aEventMask)
       
    68 	: iEventGroupUid(aEventGroupId), iEventMask(aEventMask)
       
    69 	{
       
    70 	}
       
    71 
       
    72 inline TUint32 CSubConParameterFamily::Id()
       
    73 /**
       
    74 Fetch the identity of the sub-connection parameter family
       
    75 */
       
    76 	{
       
    77 	return iFamilyId;
       
    78 	}
       
    79 
       
    80 inline TAccessPointInfo::TAccessPointInfo(TUint aApId)
       
    81 /** Initialises the object using the specified 32-bit long integer ID of the access point.
       
    82 
       
    83 @param aApId The 32-bit long integer ID of the access point to initialise the object with. */
       
    84 	{
       
    85 	iAccessPointId = aApId;
       
    86 	}
       
    87 
       
    88 inline TUint TAccessPointInfo::AccessPoint() const
       
    89 /** Returns the 32-bit long integer ID of the access point.
       
    90 
       
    91 @return The 32-bit long integer ID of the access point. */
       
    92 	{
       
    93 	return iAccessPointId;
       
    94 	}
       
    95 
       
    96 inline void TAccessPointInfo::SetAccessPoint(TUint aAccessPoint)
       
    97 /** Sets the 32-bit long integer ID of the access point.
       
    98 
       
    99 @param aAccessPoint The 32-bit long integer ID of the access point. */
       
   100 	{
       
   101 	iAccessPointId = aAccessPoint;
       
   102 	}
       
   103 	
       
   104 inline TBool TAccessPointInfo::operator== (const TAccessPointInfo& aRhs) const
       
   105 /** Compares the 32-bit long integer ID of the specified object with our own.
       
   106 
       
   107 @param aRhs The TAccessPointInfo to compare.
       
   108 @return A boolean value of ETrue if the TAccessPointInfo object has the same ID or false otherwise. */
       
   109 	{
       
   110 	return iAccessPointId == aRhs.iAccessPointId;
       
   111 	}