00001 /* 00002 * ============================================================================= 00003 * Name : sipsubscriptionstateheader.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 CSIPSUBSCRIPTIONSTATEHEADER_H 00023 #define CSIPSUBSCRIPTIONSTATEHEADER_H 00024 00025 // INCLUDES 00026 #include "SipParameterHeaderBase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPSubscriptionStateHeaderParams; 00031 00032 // CLASS DECLARATION 00042 class CSIPSubscriptionStateHeader : public CSIPParameterHeaderBase 00043 { 00044 public: // Constructors and destructor 00045 00052 IMPORT_C static CSIPSubscriptionStateHeader* DecodeL(const TDesC8& aValue); 00053 00059 IMPORT_C static CSIPSubscriptionStateHeader* 00060 NewL(const TDesC8& aSubStateValue); 00061 00068 IMPORT_C static CSIPSubscriptionStateHeader* 00069 NewLC(const TDesC8& aSubStateValue); 00070 00074 IMPORT_C ~CSIPSubscriptionStateHeader(); 00075 00076 00077 public: // New functions 00078 00083 IMPORT_C const TDesC8& SubStateValue() const; 00084 00089 IMPORT_C void SetSubStateValueL(const TDesC8& aSubStateValue); 00090 00095 IMPORT_C TInt ExpiresParameter() const; 00096 00102 IMPORT_C void SetExpiresParameterL(TInt aExpiresParam); 00103 00108 IMPORT_C TInt RetryAfterParameter() const; 00109 00115 IMPORT_C void SetRetryAfterParameterL(TInt aRetryAfterParam); 00116 00124 IMPORT_C static CSIPHeaderBase* 00125 InternalizeValueL(RReadStream& aReadStream); 00126 00127 00128 public: // From CSIPHeaderBase 00129 00133 IMPORT_C CSIPHeaderBase* CloneL() const; 00134 00138 IMPORT_C RStringF Name() const; 00139 00140 00141 public: // From CSIPHeaderBase, for internal use 00142 00143 TPreferredPlace PreferredPlaceInMessage() const; 00144 00145 public: // New functions, for internal use 00146 00147 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); 00148 00149 private: // From CSIPHeaderBase 00150 00151 void ExternalizeValueL(RWriteStream& aWriteStream) const; 00152 00153 private: // From CSIPParameterHeaderBase 00154 00155 HBufC8* ToTextMandatoryPartLC() const; 00156 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); 00157 const CSIPParamContainerBase& Params() const; 00158 CSIPParamContainerBase& Params(); 00159 00160 private: // Constructors 00161 00162 CSIPSubscriptionStateHeader(); 00163 void ConstructL(); 00164 void ConstructL(const TDesC8& aSubStateValue); 00165 void ConstructL (const CSIPSubscriptionStateHeader& 00166 aSubscriptionStateHeader); 00167 00168 private: // New functions 00169 00170 void DoInternalizeValueL(RReadStream& aReadStream); 00171 00172 private: // Data 00173 00174 HBufC8* iSubStateValue; 00175 CSIPSubscriptionStateHeaderParams* iParams; 00176 00177 private: // For testing purposes 00178 00179 UNIT_TEST(CSIPSubscriptionStateHeaderTest) 00180 }; 00181 00182 00183 // CSIPSUBSCRIPTIONSTATEHEADER_H 00184 #endif 00185 00186 // End of File