realtimenetprots/sipfw/SIP/Refreshes/inc/CSipAnyRefresh.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name          : CSipAnyRefresh.h
       
    16 * Part of       : SIPRefreshes
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 
       
    29 #ifndef CSIPANYREFRESH_H
       
    30 #define CSIPANYREFRESH_H
       
    31 
       
    32 #include "CSipRefreshBase.h"
       
    33 
       
    34 class CSipAnyRefresh : public CSipRefreshBase
       
    35 	{
       
    36 public:
       
    37 
       
    38 	static CSipAnyRefresh* NewLC (MTransactionUser& aTU,
       
    39                                   MTimerManager& aTimerMgr,
       
    40                                   CSIPSec& aSIPSec,
       
    41 							      CSipRefreshMgr& aRefreshMgr,
       
    42 							      TRegistrationId aRegistrationId,
       
    43 							      CSIPRequest* aRequest,
       
    44                                   MRefreshOwner* aOwner,
       
    45                                   MSIPSecUser& aSIPSecUser,
       
    46 							      CURIContainer& aRemoteTarget,
       
    47 								  TBool aPassAllResponsesToOwner);
       
    48 
       
    49 
       
    50     ~CSipAnyRefresh ();
       
    51 
       
    52 private:
       
    53 
       
    54 	CSipAnyRefresh (MTransactionUser& aTU,
       
    55                     MTimerManager& aTimerMgr,
       
    56                     CSIPSec& aSIPSec,
       
    57 				    CSipRefreshMgr& aRefreshMgr,
       
    58 				    TRegistrationId aRegistrationId,
       
    59                     MRefreshOwner* aOwner,
       
    60                     MSIPSecUser& aSIPSecUser,
       
    61 					TBool aPassAllResponsesToOwner);
       
    62 
       
    63 
       
    64 	void ConstructL(CSIPRequest* aRequest, CURIContainer& aRemoteTarget);
       
    65 
       
    66 	void Forward2xxResponseToCallerL(CSIPResponse* aResponse);
       
    67 
       
    68     void SetExpirationTimeToRequestL(CSIPRequest& aRequest,
       
    69                                      TUint aExpirationTimeInSeconds);
       
    70 
       
    71 	void SetExpirationTimeToResponseL(CSIPResponse& aResponse, 
       
    72 		                              TUint         aExpirationTimeInSeconds);
       
    73 
       
    74 	TInt ExpirationTimeFromRequestL(CSIPRequest& aRequest);
       
    75 
       
    76 	TInt ExpirationTimeFromResponse(CSIPResponse& aResponse);
       
    77 
       
    78 private:
       
    79 
       
    80 	void CheckUpdateRequestExpiresValueL(CSIPRequest& aRequest);
       
    81 
       
    82     void CheckTerminateRequestExpiresValueL(CSIPRequest& aRequest);
       
    83 
       
    84 private: // Data
       
    85 
       
    86 	TBool iPassAllResponsesToOwner;
       
    87 
       
    88 private: // For testing purposes
       
    89 
       
    90 	UNIT_TEST(CSipAnyRefreshTest)
       
    91 };
       
    92 
       
    93 #endif // CSIPANYREFRESH_H
       
    94 
       
    95 // End of File
       
    96 
       
    97