realtimenetprots/sipfw/ProfileAgent/Profile/Src/extensionintparam.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2007-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        : extensionintparam.h
       
    16 * Part of     : SIP Profile
       
    17 * Interface   : private
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  @internalComponent
       
    27 */
       
    28 
       
    29 #ifndef TEXTENSIONINTPARAM_H
       
    30 #define TEXTENSIONINTPARAM_H
       
    31 
       
    32 //  INCLUDES
       
    33 #include <e32base.h>
       
    34 #include <s32strm.h>
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40 * This class represents an extension parameter whose value is integer.
       
    41 */
       
    42 NONSHARABLE_CLASS(TExtensionIntParam)
       
    43 	{
       
    44 	public: // Constructors
       
    45 
       
    46 		/**
       
    47 		* Default constructor
       
    48 		*/
       
    49 		TExtensionIntParam();
       
    50 	
       
    51 		/**
       
    52 		* Copy constructor
       
    53 		*/
       
    54 		TExtensionIntParam(const TExtensionIntParam& aParam);
       
    55 
       
    56 		/**
       
    57 		* Constructor
       
    58 		*/
       
    59 		TExtensionIntParam(TUint32 aID, TUint32 aValue);
       
    60 
       
    61     public: // New functions
       
    62 
       
    63 		/**
       
    64 		* De-serialize parameter from stream
       
    65 		* @param aReadStream stream where data is read from
       
    66 		*/
       
    67 		static TExtensionIntParam InternalizeL(RReadStream& aReadStream);
       
    68 
       
    69 		/**
       
    70 		* Serialize parameter to stream
       
    71 		* @param aWriteStream stream where parameter is to be serialized		
       
    72 		*/
       
    73 		void ExternalizeL(RWriteStream& aWriteStream) const;
       
    74 		
       
    75 		TUint ExternalizedSizeL() const;
       
    76 		
       
    77 		/** 
       
    78 		* Compare two parameters
       
    79 		* @param aParameter parameter to compare to
       
    80 		* @return ETrue if parameters are equal
       
    81 		*/
       
    82 		TBool operator==(const TExtensionIntParam& aParam) const;
       
    83 
       
    84 		TUint32 ID() const;
       
    85 		
       
    86 		TUint32 Value() const;
       
    87 
       
    88 	private: // Data
       
    89 
       
    90 		TUint32 iID;
       
    91 		TUint32 iValue;
       
    92 
       
    93     private: // For testing purposes
       
    94 
       
    95         #ifdef CPPUNIT_TEST
       
    96 		    friend class CExtensionIntParamTest;    
       
    97         #endif
       
    98 	};
       
    99 
       
   100 #endif // TEXTENSIONINTPARAM_H