epoc32/include/sipcontentdispositionheader.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 * Name        : sipcontentdispositionheader.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 CSIPCONTENTDISPOSITIONHEADER_H
    26 #define CSIPCONTENTDISPOSITIONHEADER_H
    27 
    28 //  INCLUDES
    29 #include "sipparameterheaderbase.h"
    30 #include "_sipcodecdefs.h"
    31 
    32 // FORWARD DECLARATIONS
    33 class CSIPHeaderGenericParams;
    34 
    35 // CLASS DECLARATION
    36 /**
    37 * @publishedAll
    38 * @released
    39 *
    40 * Class provides functions for setting and getting parameters in 
    41 * SIP "Content-Disposition" header.
    42 *
    43 *  @lib sipcodec.lib
    44 */
    45 class CSIPContentDispositionHeader : public CSIPParameterHeaderBase
    46 	{
    47 	public:	// Constructors and destructor
    48 	
    49 		/**
    50 		* Constructs a CSIPContentDispositionHeader from textual representation 
    51 		* of the header's value part.
    52 		* @param aValue a value part of a "Content-Disposition"-header
    53 		* @return a new instance of CSIPContentDispositionHeader
    54 		*/
    55 		IMPORT_C static CSIPContentDispositionHeader* 
    56 			DecodeL (const TDesC8& aValue);
    57 
    58 		/**
    59 		* Creates a new instance of CSIPContentDispositionHeader
    60 		* @param aDispType a Disp-Type value
    61 		* @return a new instance of CSIPContentDispositionHeader
    62 		*/
    63 		IMPORT_C static CSIPContentDispositionHeader* 
    64 			NewL(const TDesC8& aDispType);
    65 
    66 		/**
    67 		* Creates a new instance of CSIPContentDispositionHeader 
    68 		* and puts it to CleanupStack
    69 		* @param aDispType a Disp-Type value
    70 		* @return a new instance of CSIPContentDispositionHeader
    71 		*/
    72 		IMPORT_C static CSIPContentDispositionHeader* 
    73 			NewLC(const TDesC8& aDispType);
    74 
    75 		/**
    76 		* Destructor. deletes the resources of CSIPContentDispositionHeader.
    77 		*/
    78 		IMPORT_C ~CSIPContentDispositionHeader();
    79 
    80 
    81 	public: // New functions
    82 
    83 		/**
    84 		* Gets the disp-type parameter from the "Content-Disposition" header
    85 		* @return the disp-type parameter
    86 		*/
    87 		IMPORT_C const TDesC8& DispType() const;
    88 
    89 		/**
    90 		* Sets the disp-type parameter in the "Content-Disposition" header; 
    91 		* @param aTag a disp-type parameter to set
    92 		*/
    93 		IMPORT_C void SetDispTypeL(const TDesC8& aDispType);
    94 	
    95 		/**
    96 		* Constructs an instance of a CSIPContentDispositionHeader 
    97 		* from a RReadStream
    98 		* @param aReadStream a stream containing the value of the
    99 		*        externalized object (header name not included). 
   100 		* @return an instance of a CSIPContentDispositionHeader
   101 		*/
   102 		IMPORT_C static CSIPHeaderBase* 
   103 			InternalizeValueL(RReadStream& aReadStream);
   104 
   105 
   106 	public: // From CSIPHeaderBase
   107 
   108 		/**
   109 		* From CSIPHeaderBase CloneL
   110 		*/
   111 		IMPORT_C CSIPHeaderBase* CloneL() const;
   112 
   113 		/**
   114 		* From CSIPHeaderBase Name
   115 		*/
   116 		IMPORT_C RStringF Name() const;
   117 
   118 
   119 	public: // From CSIPHeaderBase, for internal use
   120 
   121         /**
   122         * @internalComponent
   123         */	
   124 		TPreferredPlace PreferredPlaceInMessage() const;
   125 
   126 	public: // New functions, for internal use
   127 
   128 		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
   129 
   130 	private: // From CSIPHeaderBase
   131 
   132 		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   133 
   134 	private: // From CSIPParameterHeaderBase
   135 	
   136 		HBufC8* ToTextMandatoryPartLC() const;
   137 		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   138 		const CSIPParamContainerBase& Params() const;
   139 		CSIPParamContainerBase& Params();
   140 
   141 	private: // Constructors
   142 
   143 		CSIPContentDispositionHeader();
   144 		void ConstructL();
   145 		void ConstructL(const TDesC8& aDispType);
   146 		void ConstructL(const TDesC8& aDispType, const TDesC8& aHandlingParam);
   147 		void ConstructL(const CSIPContentDispositionHeader& aHeader);
   148 
   149 	private: // New functions
   150 
   151 		void DoInternalizeValueL(RReadStream& aReadStream);
   152 
   153 	private: // Data
   154 
   155 		HBufC8* iDispType;
   156 		CSIPHeaderGenericParams* iParams;
   157 
   158 	private: // For testing purposes
   159 	
   160 		UNIT_TEST(CSIPContentDispositionHeaderTest)
   161 	};
   162 
   163 #endif // CSIPCONTENTDISPOSITIONHEADER_H
   164 
   165 // End of File