epoc32/include/sipcontentdispositionheader.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/sipcontentdispositionheader.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/sipcontentdispositionheader.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,165 @@
     1.4 -sipcontentdispositionheader.h
     1.5 +/*
     1.6 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:
    1.19 +* Name        : sipcontentdispositionheader.h
    1.20 +* Part of     : SIP Codec
    1.21 +* Interface   : SDK API, SIP Codec API
    1.22 +* Version     : SIP/4.0 
    1.23 +*
    1.24 +*/
    1.25 +
    1.26 +
    1.27 +
    1.28 +
    1.29 +#ifndef CSIPCONTENTDISPOSITIONHEADER_H
    1.30 +#define CSIPCONTENTDISPOSITIONHEADER_H
    1.31 +
    1.32 +//  INCLUDES
    1.33 +#include "sipparameterheaderbase.h"
    1.34 +#include "_sipcodecdefs.h"
    1.35 +
    1.36 +// FORWARD DECLARATIONS
    1.37 +class CSIPHeaderGenericParams;
    1.38 +
    1.39 +// CLASS DECLARATION
    1.40 +/**
    1.41 +* @publishedAll
    1.42 +* @released
    1.43 +*
    1.44 +* Class provides functions for setting and getting parameters in 
    1.45 +* SIP "Content-Disposition" header.
    1.46 +*
    1.47 +*  @lib sipcodec.lib
    1.48 +*/
    1.49 +class CSIPContentDispositionHeader : public CSIPParameterHeaderBase
    1.50 +	{
    1.51 +	public:	// Constructors and destructor
    1.52 +	
    1.53 +		/**
    1.54 +		* Constructs a CSIPContentDispositionHeader from textual representation 
    1.55 +		* of the header's value part.
    1.56 +		* @param aValue a value part of a "Content-Disposition"-header
    1.57 +		* @return a new instance of CSIPContentDispositionHeader
    1.58 +		*/
    1.59 +		IMPORT_C static CSIPContentDispositionHeader* 
    1.60 +			DecodeL (const TDesC8& aValue);
    1.61 +
    1.62 +		/**
    1.63 +		* Creates a new instance of CSIPContentDispositionHeader
    1.64 +		* @param aDispType a Disp-Type value
    1.65 +		* @return a new instance of CSIPContentDispositionHeader
    1.66 +		*/
    1.67 +		IMPORT_C static CSIPContentDispositionHeader* 
    1.68 +			NewL(const TDesC8& aDispType);
    1.69 +
    1.70 +		/**
    1.71 +		* Creates a new instance of CSIPContentDispositionHeader 
    1.72 +		* and puts it to CleanupStack
    1.73 +		* @param aDispType a Disp-Type value
    1.74 +		* @return a new instance of CSIPContentDispositionHeader
    1.75 +		*/
    1.76 +		IMPORT_C static CSIPContentDispositionHeader* 
    1.77 +			NewLC(const TDesC8& aDispType);
    1.78 +
    1.79 +		/**
    1.80 +		* Destructor. deletes the resources of CSIPContentDispositionHeader.
    1.81 +		*/
    1.82 +		IMPORT_C ~CSIPContentDispositionHeader();
    1.83 +
    1.84 +
    1.85 +	public: // New functions
    1.86 +
    1.87 +		/**
    1.88 +		* Gets the disp-type parameter from the "Content-Disposition" header
    1.89 +		* @return the disp-type parameter
    1.90 +		*/
    1.91 +		IMPORT_C const TDesC8& DispType() const;
    1.92 +
    1.93 +		/**
    1.94 +		* Sets the disp-type parameter in the "Content-Disposition" header; 
    1.95 +		* @param aTag a disp-type parameter to set
    1.96 +		*/
    1.97 +		IMPORT_C void SetDispTypeL(const TDesC8& aDispType);
    1.98 +	
    1.99 +		/**
   1.100 +		* Constructs an instance of a CSIPContentDispositionHeader 
   1.101 +		* from a RReadStream
   1.102 +		* @param aReadStream a stream containing the value of the
   1.103 +		*        externalized object (header name not included). 
   1.104 +		* @return an instance of a CSIPContentDispositionHeader
   1.105 +		*/
   1.106 +		IMPORT_C static CSIPHeaderBase* 
   1.107 +			InternalizeValueL(RReadStream& aReadStream);
   1.108 +
   1.109 +
   1.110 +	public: // From CSIPHeaderBase
   1.111 +
   1.112 +		/**
   1.113 +		* From CSIPHeaderBase CloneL
   1.114 +		*/
   1.115 +		IMPORT_C CSIPHeaderBase* CloneL() const;
   1.116 +
   1.117 +		/**
   1.118 +		* From CSIPHeaderBase Name
   1.119 +		*/
   1.120 +		IMPORT_C RStringF Name() const;
   1.121 +
   1.122 +
   1.123 +	public: // From CSIPHeaderBase, for internal use
   1.124 +
   1.125 +        /**
   1.126 +        * @internalComponent
   1.127 +        */	
   1.128 +		TPreferredPlace PreferredPlaceInMessage() const;
   1.129 +
   1.130 +	public: // New functions, for internal use
   1.131 +
   1.132 +		static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
   1.133 +
   1.134 +	private: // From CSIPHeaderBase
   1.135 +
   1.136 +		void ExternalizeValueL(RWriteStream& aWriteStream) const;
   1.137 +
   1.138 +	private: // From CSIPParameterHeaderBase
   1.139 +	
   1.140 +		HBufC8* ToTextMandatoryPartLC() const;
   1.141 +		void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
   1.142 +		const CSIPParamContainerBase& Params() const;
   1.143 +		CSIPParamContainerBase& Params();
   1.144 +
   1.145 +	private: // Constructors
   1.146 +
   1.147 +		CSIPContentDispositionHeader();
   1.148 +		void ConstructL();
   1.149 +		void ConstructL(const TDesC8& aDispType);
   1.150 +		void ConstructL(const TDesC8& aDispType, const TDesC8& aHandlingParam);
   1.151 +		void ConstructL(const CSIPContentDispositionHeader& aHeader);
   1.152 +
   1.153 +	private: // New functions
   1.154 +
   1.155 +		void DoInternalizeValueL(RReadStream& aReadStream);
   1.156 +
   1.157 +	private: // Data
   1.158 +
   1.159 +		HBufC8* iDispType;
   1.160 +		CSIPHeaderGenericParams* iParams;
   1.161 +
   1.162 +	private: // For testing purposes
   1.163 +	
   1.164 +		UNIT_TEST(CSIPContentDispositionHeaderTest)
   1.165 +	};
   1.166 +
   1.167 +#endif // CSIPCONTENTDISPOSITIONHEADER_H
   1.168 +
   1.169 +// End of File