00001 /* 00002 * ============================================================================= 00003 * Name : sipretryafterheader.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 CSIPRETRYAFTERHEADER_H 00023 #define CSIPRETRYAFTERHEADER_H 00024 00025 // INCLUDES 00026 #include "SipParameterHeaderBase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPRetryAfterHeaderParams; 00031 00032 // CLASS DECLARATION 00042 class CSIPRetryAfterHeader : public CSIPParameterHeaderBase 00043 { 00044 public: // Constructors and destructor 00045 00053 IMPORT_C static CSIPRetryAfterHeader* DecodeL(const TDesC8& aValue); 00054 00060 IMPORT_C static CSIPRetryAfterHeader* NewL(TUint aRetryAfter); 00061 00068 IMPORT_C static CSIPRetryAfterHeader* NewLC(TUint aRetryAfter); 00069 00073 IMPORT_C virtual ~CSIPRetryAfterHeader(); 00074 00075 00076 public: // New functions 00077 00082 IMPORT_C void SetRetryAfter(TUint aValue); 00083 00088 IMPORT_C TUint RetryAfter() const; 00089 00094 IMPORT_C const TDesC8& Comment() const; 00095 00101 IMPORT_C TInt DurationParam() const; 00102 00108 IMPORT_C void SetDurationParamL(TInt aDurationParam); 00109 00116 IMPORT_C static CSIPHeaderBase* 00117 InternalizeValueL(RReadStream& aReadStream); 00118 00119 00120 public: // From CSIPHeaderBase 00121 00125 IMPORT_C CSIPHeaderBase* CloneL() const; 00126 00130 IMPORT_C RStringF Name() const; 00131 00132 00133 public: // From CSIPHeaderBase, for internal use 00134 00135 TPreferredPlace PreferredPlaceInMessage() const; 00136 00137 public: // New functions, for internal use 00138 00139 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); 00140 00141 private: // From CSIPHeaderBase 00142 00143 void ExternalizeValueL(RWriteStream& aWriteStream) const; 00144 00145 private: // From CSIPParameterHeaderBase 00146 00147 HBufC8* ToTextMandatoryPartLC() const; 00148 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); 00149 const CSIPParamContainerBase& Params() const; 00150 CSIPParamContainerBase& Params(); 00151 00152 private: // Constructors 00153 00154 CSIPRetryAfterHeader(); 00155 CSIPRetryAfterHeader(TUint aRetryAfter); 00156 void ConstructL(); 00157 void ConstructL(const CSIPRetryAfterHeader& aRetryAfterHeader); 00158 00159 private: // New functions 00160 00161 void DoInternalizeValueL(RReadStream& aReadStream); 00162 00163 private: // Data 00164 00165 TUint iRetryAfter; 00166 HBufC8* iComment; 00167 CSIPRetryAfterHeaderParams* iParams; 00168 00169 private: // For testing purposes 00170 00171 UNIT_TEST(CSIPRetryAfterHeaderTest) 00172 }; 00173 00174 // end of CSIPRETRYAFTERHEADER_H 00175 #endif 00176 00177 // End of File