applayerprotocols/httptransportfw/inc/http/thttpevent.inl
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2001-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 inline THTTPEvent::THTTPEvent(TInt aStatus, TUint aUID)
       
    18 : iStatus(aStatus), iUID(aUID), iIsSessionEventFlag(EFalse)
       
    19 	{
       
    20 	}
       
    21 
       
    22 inline THTTPEvent::THTTPEvent(TStandardEvent aStatus)
       
    23 : iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse)
       
    24 	{
       
    25 	}
       
    26 
       
    27 inline THTTPEvent::THTTPEvent(TTransactionEvent aStatus)
       
    28 : iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse)
       
    29 	{
       
    30 	}
       
    31 
       
    32 inline THTTPEvent& THTTPEvent::operator=(TStandardEvent aStatus)
       
    33 	{
       
    34 	iUID = KHTTPUid;
       
    35 	iStatus = aStatus;
       
    36 	return *this;
       
    37 	}
       
    38 
       
    39 inline THTTPEvent& THTTPEvent::operator=(TTransactionEvent aStatus)
       
    40 	{
       
    41 	iUID = KHTTPUid;
       
    42 	iStatus = aStatus;
       
    43 	return *this;
       
    44 	}
       
    45 
       
    46 inline TBool THTTPEvent::operator==(THTTPEvent aThat) const
       
    47 	{
       
    48 	return (iStatus == aThat.iStatus && iUID == aThat.iUID);
       
    49 	}
       
    50 
       
    51 inline TBool THTTPEvent::operator!=(THTTPEvent aThat) const
       
    52 	{
       
    53 	return !(*this == aThat);
       
    54 	}
       
    55 
       
    56 inline TBool THTTPEvent::operator==(TStandardEvent aStatus) const
       
    57 	{
       
    58 	return (iStatus == aStatus && iUID == KHTTPUid);
       
    59 	}
       
    60 
       
    61 inline TBool THTTPEvent::operator!=(TStandardEvent aStatus) const
       
    62 	{
       
    63 	return !(*this == aStatus);
       
    64 	}
       
    65 
       
    66 inline TBool THTTPEvent::operator==(TTransactionEvent aStatus) const
       
    67 	{
       
    68 	return (iStatus == aStatus && iUID == KHTTPUid);
       
    69 	}
       
    70 
       
    71 inline TBool THTTPEvent::operator!=(TTransactionEvent aStatus) const
       
    72 	{
       
    73 	return !(*this == aStatus);
       
    74 	}
       
    75 
       
    76 inline TBool THTTPEvent::IsSessionEvent() const
       
    77 	{
       
    78 	return iIsSessionEventFlag;
       
    79 	}
       
    80 
       
    81 inline THTTPSessionEvent::THTTPSessionEvent(TInt aStatus, TUint aUID)
       
    82 : THTTPEvent(aStatus, aUID)
       
    83 	{
       
    84 	iIsSessionEventFlag = ETrue;
       
    85 	}
       
    86 
       
    87 inline THTTPSessionEvent::THTTPSessionEvent(TStandardEvent aStatus)
       
    88 : THTTPEvent(aStatus)
       
    89 	{
       
    90 	iIsSessionEventFlag = ETrue;
       
    91 	}
       
    92 
       
    93 inline THTTPSessionEvent::THTTPSessionEvent(TSessionEvent aStatus)
       
    94 : THTTPEvent(aStatus)
       
    95 	{
       
    96 	iIsSessionEventFlag = ETrue;
       
    97 	}
       
    98 
       
    99 inline THTTPSessionEvent& THTTPSessionEvent::operator=(TSessionEvent aStatus)
       
   100 	{
       
   101 	iUID = KHTTPUid;
       
   102 	iStatus = aStatus;
       
   103 	return *this;
       
   104 	}
       
   105 
       
   106 inline TBool THTTPSessionEvent::operator==(TSessionEvent aStatus) const
       
   107 	{
       
   108 	return (iStatus == aStatus && iUID == KHTTPUid);
       
   109 	}
       
   110 
       
   111 inline TBool THTTPSessionEvent::operator!=(TSessionEvent aStatus) const
       
   112 	{
       
   113 	return !(*this == aStatus);
       
   114 	}