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