realtimenetprots/sipfw/SIP/Codec/api/sipsupportedheader.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        : sipsupportedheader.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 CSIPSUPPORTEDHEADER_H
       
    26 #define CSIPSUPPORTEDHEADER_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "siptokenheaderbase.h"
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33 * @publishedAll
       
    34 * @released
       
    35 *
       
    36 * Class provides functions for setting and getting SIP "Supported" header.
       
    37 *
       
    38 * @lib sipcodec.lib
       
    39 */
       
    40 class CSIPSupportedHeader : public CSIPTokenHeaderBase
       
    41 	{
       
    42 	public:	// Constructors and destructor
       
    43 
       
    44 		/**
       
    45 		* Constructs a CSIPSupportedHeader from textual representation 
       
    46 		* of the header's value part.
       
    47 		* @param aValue a value part of a "Supported"-header
       
    48 		* @return an array containing 1..n instances of CSIPSupportedHeader  
       
    49 		*/
       
    50 		IMPORT_C static RPointerArray<CSIPSupportedHeader> 
       
    51 			DecodeL(const TDesC8& aValue);
       
    52 
       
    53 		/**
       
    54 		* Creates a new instance of CSIPSupportedHeader
       
    55 		* @param aValue a tag value 
       
    56 		* @return a new instance of CSIPSupportedHeader
       
    57 		*/
       
    58 		IMPORT_C static CSIPSupportedHeader* NewL(RStringF aValue);
       
    59 
       
    60 		/**
       
    61 		* Creates a new instance of CSIPSupportedHeader 
       
    62 		* and puts it to CleanupStack
       
    63 		* @param aValue a tag value   
       
    64 		* @return a new instance of CSIPSupportedHeader
       
    65 		*/
       
    66 		IMPORT_C static CSIPSupportedHeader* NewLC(RStringF aValue);
       
    67 
       
    68 		/**
       
    69 		* Destructor, deletes the resources of CSIPSupportedHeader.
       
    70 		*/
       
    71 		IMPORT_C ~CSIPSupportedHeader();
       
    72 
       
    73 
       
    74 	public: // New functions
       
    75 
       
    76 		/**
       
    77 		* Constructs an instance of a CSIPSupportedHeader from a RReadStream
       
    78 		* @param aReadStream a stream containing the value of the
       
    79 		*        externalized object (header name not included). 
       
    80 		* @return an instance of a CSIPSupportedHeader
       
    81 		*/
       
    82 		IMPORT_C static CSIPHeaderBase* 
       
    83 			InternalizeValueL(RReadStream& aReadStream);
       
    84 
       
    85 
       
    86 	public: // From CSIPHeaderBase
       
    87 		
       
    88 		/**
       
    89 		* From CSIPHeaderBase CloneL
       
    90 		*/
       
    91 		IMPORT_C CSIPHeaderBase* CloneL() const;
       
    92 
       
    93 		/**
       
    94 		* From CSIPHeaderBase Name
       
    95 		*/
       
    96 		IMPORT_C RStringF Name() const;
       
    97 
       
    98 
       
    99 	public: // From CSIPHeaderBase, for internal use
       
   100 
       
   101         /**
       
   102         * @internalComponent
       
   103         */
       
   104 		TBool HasCompactName() const;
       
   105 		
       
   106         /**
       
   107         * @internalComponent
       
   108         */		
       
   109 		RStringF CompactName() const;
       
   110 		
       
   111         /**
       
   112         * @internalComponent
       
   113         */		
       
   114 		TPreferredPlace PreferredPlaceInMessage() const;
       
   115 
       
   116 	public: // New functions, for internal use
       
   117 
       
   118 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
       
   119 
       
   120 	private: // New functions
       
   121 
       
   122 		CSIPSupportedHeader();
       
   123 		CSIPSupportedHeader(const CSIPSupportedHeader& aHeader);
       
   124 
       
   125 	private: // For testing purposes
       
   126 #ifdef CPPUNIT_TEST	
       
   127 		friend class CSIPSupportedHeaderTest;
       
   128 #endif
       
   129 	};
       
   130 
       
   131 #endif // CSIPSUPPORTEDHEADER_H
       
   132 
       
   133 // End of File