realtimenetprots/sipfw/SIP/Codec/api/sipexpiresheader.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004-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        : sipexpiresheader.h
       
    16 * Part of     : SIP Codec
       
    17 * Interface   : SDK API, SIP Codec API
       
    18 * Version     : SIP/4.0 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CSIPEXPIRESHEADER_H
       
    26 #define CSIPEXPIRESHEADER_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "sipunsignedintheaderbase.h"
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33 * @publishedAll
       
    34 * @released
       
    35 *
       
    36 * Class encapsulates a "Expires" header value.
       
    37 *
       
    38 *  @lib sipcodec.lib
       
    39 */
       
    40 class CSIPExpiresHeader : public CSIPUnsignedIntHeaderBase
       
    41 	{
       
    42 	public:	// Constructors and destructor
       
    43 
       
    44 		/**
       
    45 		* Constructs a CSIPExpiresHeader from textual representation 
       
    46 		* of the header's value part.
       
    47 		* @param aValue a value part of a "Expires"-header (e.g. "3600")
       
    48 		* @return a new instance of CSIPExpiresHeader
       
    49 		*/
       
    50 		IMPORT_C static CSIPExpiresHeader* DecodeL(const TDesC8& aValue);
       
    51 	
       
    52 		/**
       
    53 		* Constructor
       
    54 		* @param aValue the value to set
       
    55 		*/
       
    56 		IMPORT_C CSIPExpiresHeader(TUint aValue);
       
    57 	
       
    58 		/**
       
    59 		* Destructor, deletes the resources of CSIPExpiresHeader.
       
    60 		*/
       
    61 		IMPORT_C ~CSIPExpiresHeader();
       
    62 
       
    63 
       
    64 	public: // New functions
       
    65 
       
    66 		/**
       
    67 		* Constructs an instance of a CSIPExpiresHeader from a RReadStream
       
    68 		* @param aReadStream a stream containing the value of the
       
    69 		*        externalized header object (header name not included).
       
    70 		* @return an instance of a CSIPExpiresHeader
       
    71 		*/
       
    72 		IMPORT_C static CSIPHeaderBase* 
       
    73 			InternalizeValueL(RReadStream& aReadStream);
       
    74 
       
    75 
       
    76 	public: // From CSIPHeaderBase
       
    77 
       
    78 		/**
       
    79 		* From CSIPHeaderBase CloneL
       
    80 		*/
       
    81 		IMPORT_C CSIPHeaderBase* CloneL() const;
       
    82 
       
    83 		/**
       
    84 		* From CSIPHeaderBase Name
       
    85 		*/
       
    86 		IMPORT_C RStringF Name() const;
       
    87 
       
    88 
       
    89 	public: // From CSIPHeaderBase, for internal use
       
    90 
       
    91         /**
       
    92         * @internalComponent
       
    93         */
       
    94 		TPreferredPlace PreferredPlaceInMessage() const;
       
    95 
       
    96 	public: // New functions, for internal use
       
    97 
       
    98 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
       
    99 
       
   100 	private: // For testing purposes
       
   101 #ifdef CPPUNIT_TEST	
       
   102 		friend class CSIPExpiresHeaderTest;
       
   103 #endif
       
   104 	};
       
   105 
       
   106 #endif // CSIPEXPIRESHEADER_H
       
   107 
       
   108 // End of File