00001 /* 00002 * ============================================================================= 00003 * Name : sipcontentdispositionheader.h 00004 * Part of : SIP Codec 00005 * Interface : SDK API, SIP Codec API 00006 * Description : 00007 * Version : SIP/4.0 00008 * 00009 * Copyright (c) 2004 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. All rights are reserved. Copying, 00013 * including reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia Corporation. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia Corporation. 00018 * ============================================================================= 00019 */ 00020 00021 00022 #ifndef CSIPCONTENTDISPOSITIONHEADER_H 00023 #define CSIPCONTENTDISPOSITIONHEADER_H 00024 00025 // INCLUDES 00026 #include "SipParameterHeaderBase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPHeaderGenericParams; 00031 00032 // CLASS DECLARATION 00042 class CSIPContentDispositionHeader : public CSIPParameterHeaderBase 00043 { 00044 public: // Constructors and destructor 00045 00052 IMPORT_C static CSIPContentDispositionHeader* 00053 DecodeL (const TDesC8& aValue); 00054 00060 IMPORT_C static CSIPContentDispositionHeader* 00061 NewL(const TDesC8& aDispType); 00062 00069 IMPORT_C static CSIPContentDispositionHeader* 00070 NewLC(const TDesC8& aDispType); 00071 00075 IMPORT_C ~CSIPContentDispositionHeader(); 00076 00077 00078 public: // New functions 00079 00084 IMPORT_C const TDesC8& DispType() const; 00085 00090 IMPORT_C void SetDispTypeL(const TDesC8& aDispType); 00091 00099 IMPORT_C static CSIPHeaderBase* 00100 InternalizeValueL(RReadStream& aReadStream); 00101 00102 00103 public: // From CSIPHeaderBase 00104 00108 IMPORT_C CSIPHeaderBase* CloneL() const; 00109 00113 IMPORT_C RStringF Name() const; 00114 00115 00116 public: // From CSIPHeaderBase, for internal use 00117 00118 TPreferredPlace PreferredPlaceInMessage() const; 00119 00120 public: // New functions, for internal use 00121 00122 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); 00123 00124 private: // From CSIPHeaderBase 00125 00126 void ExternalizeValueL(RWriteStream& aWriteStream) const; 00127 00128 private: // From CSIPParameterHeaderBase 00129 00130 HBufC8* ToTextMandatoryPartLC() const; 00131 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); 00132 const CSIPParamContainerBase& Params() const; 00133 CSIPParamContainerBase& Params(); 00134 00135 private: // Constructors 00136 00137 CSIPContentDispositionHeader(); 00138 void ConstructL(); 00139 void ConstructL(const TDesC8& aDispType); 00140 void ConstructL(const TDesC8& aDispType, const TDesC8& aHandlingParam); 00141 void ConstructL(const CSIPContentDispositionHeader& aHeader); 00142 00143 private: // New functions 00144 00145 void DoInternalizeValueL(RReadStream& aReadStream); 00146 00147 private: // Data 00148 00149 HBufC8* iDispType; 00150 CSIPHeaderGenericParams* iParams; 00151 00152 private: // For testing purposes 00153 00154 UNIT_TEST(CSIPContentDispositionHeaderTest) 00155 }; 00156 00157 // CSIPCONTENTDISPOSITIONHEADER_H 00158 #endif 00159 00160 // End of File