00001 /* 00002 * ============================================================================= 00003 * Name : sipcseqheader.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 CSIPCSEQHEADER_H 00023 #define CSIPCSEQHEADER_H 00024 00025 // INCLUDES 00026 #include "sipheaderbase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // CLASS DECLARATION 00039 class CSIPCSeqHeader : public CSIPHeaderBase 00040 { 00041 public: // Constructors and destructor 00042 00049 IMPORT_C static CSIPCSeqHeader* DecodeL(const TDesC8& aValue); 00050 00057 IMPORT_C static CSIPCSeqHeader* NewL(TUint aSeq, RStringF aMethod); 00058 00065 IMPORT_C static CSIPCSeqHeader* NewLC(TUint aSeq, RStringF aMethod); 00066 00070 IMPORT_C ~CSIPCSeqHeader(); 00071 00072 00073 public: // New functions 00074 00079 IMPORT_C TUint Seq() const; 00080 00085 IMPORT_C void SetSeq(TUint aSeq); 00086 00091 IMPORT_C RStringF Method() const; 00092 00097 IMPORT_C void SetMethodL(RStringF aMethod); 00098 00105 IMPORT_C static CSIPHeaderBase* 00106 InternalizeValueL(RReadStream& aReadStream); 00107 00108 00109 public: // From CSIPHeaderBase 00110 00114 IMPORT_C CSIPHeaderBase* CloneL() const; 00115 00119 IMPORT_C RStringF Name() const; 00120 00124 IMPORT_C HBufC8* ToTextValueL() const; 00125 00126 00127 public: // From CSIPHeaderBase, for internal use 00128 00129 TPreferredPlace PreferredPlaceInMessage () const; 00130 00131 public: // New functions, for internal use 00132 00133 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); 00134 00135 private: // From CSIPHeaderBase 00136 00137 void ExternalizeValueL (RWriteStream& aWriteStream) const; 00138 00139 private: // Constructors 00140 00141 CSIPCSeqHeader(); 00142 void ConstructL(TUint aCSeq, RStringF aMethod); 00143 00144 private: // New functions 00145 00146 void DoInternalizeValueL(RReadStream& aReadStream); 00147 void ParseL(const TDesC8& aValue); 00148 void SetMethodL(const TDesC8& aMethod); 00149 00150 private: // Data 00151 00152 TUint iSeq; 00153 RStringF iMethod; 00154 00155 private: // For testing purposes 00156 00157 UNIT_TEST(CSIPCSeqHeaderTest) 00158 }; 00159 00160 // CSIPCSEQHEADER_H 00161 #endif 00162 00163 // End of File