multimediacommsengine/tsrc/testdriver/siptester/src/TCmdUNSAFTimers.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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:  See class definition below.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TCMDUNSAFTIMERS_H
       
    19 #define TCMDUNSAFTIMERS_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "TTcSIPCommandBase.h"
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CRepository;
       
    26 
       
    27 // CLASS DEFINITION
       
    28 /**
       
    29  * Base class for UNSAF timer related commands.
       
    30  */
       
    31 class TCmdUNSAFTimers
       
    32 	: public TTcSIPCommandBase
       
    33 	{
       
    34 	public:	// Constructors and destructor
       
    35 
       
    36 		/**
       
    37 		 * Constructor.
       
    38 		 *
       
    39 		 * @param aContext SIP Test case context
       
    40 		 */
       
    41 		TCmdUNSAFTimers( MTcTestContext& aContext ) :
       
    42 			TTcSIPCommandBase( aContext ) {};
       
    43 
       
    44 	protected: // New methods
       
    45 
       
    46 		TInt FindDomainKeyL( CRepository& aRepository,							
       
    47 							 TPtrC8 aDomain,
       
    48 							 TUint32& aKey ) const;
       
    49 
       
    50 		TUint32 CreateNewKeyL( CRepository& aRepository,
       
    51 							   TUint32 aKey,
       
    52 							   TUint32 aTable ) const;
       
    53 
       
    54 		void RemoveParameterL( CRepository& aRepository,
       
    55 							   TUint32 aKey ) const;
       
    56 
       
    57 		TInt ReadTimerValuesL( CRepository& aRepository,
       
    58 							   TUint32& aKey,
       
    59 						       TInt& aBindingRequestInterval,
       
    60 						       TInt& aUdpKeepAliveInterval,
       
    61 							   TInt& aTcpKeepAliveInterval ) const;
       
    62 
       
    63 		void WriteL( CRepository& aRepository,
       
    64 					 const TUint32& aKey,
       
    65 					 TInt aKeyValue ) const;
       
    66 
       
    67 		void WriteL( CRepository& aRepository,
       
    68 				     const TUint32& aKey,
       
    69 				     const TDesC8& aKeyValue ) const;
       
    70 				     
       
    71 	    void Read( CRepository& aRepository,
       
    72 				   const TUint32& aKey,
       
    73 			       TInt& aKeyValue ) const;
       
    74 
       
    75 	private: // New functions, for internal use
       
    76 
       
    77 		/**
       
    78 		 * Reads the binding request retransmission interval and keepalive
       
    79 		 * interval parameters of the given IAP-id, from central repository.
       
    80 		 *
       
    81 		 * @return KErrNone If successful, otherwise a system wide error code.
       
    82 		 */
       
    83 		TInt ReadIapTimersL( CRepository& aRepository,
       
    84 							 TInt aIapId,
       
    85 							 TUint32& aKey,
       
    86 							 TInt& aBindingRequestInterval,
       
    87 							 TInt& aUdpKeepAliveInterval,
       
    88 							 TInt& aTcpKeepAliveInterval ) const;
       
    89 
       
    90 		TInt FindIapKeyL( CRepository& aRepository,
       
    91 					      TInt aIapId,
       
    92 					      TUint32& aKey ) const;
       
    93 
       
    94 		TInt ReadDomainTimersL( CRepository& aRepository,
       
    95 						        TPtrC8 aDomain,
       
    96 								TUint32& aKey,
       
    97 								TInt& aUdpKeepAliveInterval,
       
    98 								TInt& aTcpKeepAliveInterval ) const;
       
    99 		
       
   100 		TInt Read( CRepository& aRepository,
       
   101 			       const TUint32& aKey,
       
   102 			       TDes8& aKeyValue ) const;	
       
   103 	};
       
   104 
       
   105 #endif // TCMDUNSAFTIMERS_H