00001 /* 00002 * ============================================================================= 00003 * Name : sipacceptcontactheader.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 CSIPACCEPTCONTACTHEADER_H 00023 #define CSIPACCEPTCONTACTHEADER_H 00024 00025 // INCLUDES 00026 #include "SipParameterHeaderBase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPAcceptContactHeaderParams; 00031 00032 // CLASS DECLARATION 00042 class CSIPAcceptContactHeader : public CSIPParameterHeaderBase 00043 { 00044 public: // Constructors and destructor 00045 00054 IMPORT_C static RPointerArray<CSIPAcceptContactHeader> 00055 DecodeL(const TDesC8& aValue); 00056 00061 IMPORT_C static CSIPAcceptContactHeader* NewL(); 00062 00068 IMPORT_C static CSIPAcceptContactHeader* NewLC(); 00069 00073 IMPORT_C virtual ~CSIPAcceptContactHeader(); 00074 00075 00076 public: // New functions 00077 00086 IMPORT_C TBool operator==(const CSIPAcceptContactHeader& aHeader) const; 00087 00094 IMPORT_C static CSIPHeaderBase* 00095 InternalizeValueL(RReadStream& aReadStream); 00096 00097 00098 public: // From CSIPHeaderBase 00099 00103 IMPORT_C CSIPHeaderBase* CloneL() const; 00104 00108 IMPORT_C RStringF Name() const; 00109 00110 00111 public: // From CSIPHeaderBase, for internal use 00112 00113 TBool HasCompactName() const; 00114 RStringF CompactName() const; 00115 TBool MoreThanOneAllowed() const; 00116 TPreferredPlace PreferredPlaceInMessage() const; 00117 00118 public: // New functions, for internal use 00119 00120 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); 00121 00122 private: // From CSIPHeaderBase 00123 00124 void ExternalizeValueL(RWriteStream& aWriteStream) const; 00125 00126 private: // From CSIPParameterHeaderBase 00127 00128 HBufC8* ToTextMandatoryPartLC() const; 00129 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); 00130 const CSIPParamContainerBase& Params() const; 00131 CSIPParamContainerBase& Params(); 00132 00133 private: // Constructors 00134 00135 CSIPAcceptContactHeader(); 00136 void ConstructL(); 00137 void ConstructL(const CSIPAcceptContactHeader& aAcceptContactHeader); 00138 00139 private: // New functions 00140 00141 void DoInternalizeValueL(RReadStream& aReadStream); 00142 00143 private: // Data 00144 00145 CSIPAcceptContactHeaderParams* iParams; 00146 00147 private: // For testing purposes 00148 00149 UNIT_TEST(CSIPAcceptContactHeaderTest) 00150 }; 00151 00152 // CSIPACCEPTCONTACTHEADER_H 00153 #endif 00154 00155 // End of File