00001 /* 00002 * ============================================================================= 00003 * Name : sipfromtoheaderbase.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 CSIPFROMTOHEADERBASE_H 00023 #define CSIPFROMTOHEADERBASE_H 00024 00025 // INCLUDES 00026 #include "SipParameterHeaderBase.h" 00027 #include "_sipcodecdefs.h" 00028 00029 // FORWARD DECLARATIONS 00030 class CSIPAddress; 00031 class CSIPFromToHeaderParams; 00032 00033 // CLASS DECLARATION 00045 class CSIPFromToHeaderBase : public CSIPParameterHeaderBase 00046 { 00047 public: // Constructors and destructor 00048 00052 IMPORT_C virtual ~CSIPFromToHeaderBase(); 00053 00054 00055 public: // New functions 00056 00062 IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const; 00063 00069 IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); 00070 00075 IMPORT_C const CSIPAddress& SIPAddress() const; 00076 00081 IMPORT_C CSIPAddress& SIPAddress(); 00082 00083 00084 public: // From CSIPHeaderBase, for internal use 00085 00086 TBool HasCompactName() const; 00087 TPreferredPlace PreferredPlaceInMessage() const; 00088 00089 protected: // Constructors 00090 00091 CSIPFromToHeaderBase(); 00092 void ConstructL(); 00093 void ConstructL(CSIPAddress* aSIPAddress); 00094 void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag); 00095 void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase); 00096 00097 protected: // New functions 00098 00099 void DoInternalizeValueL(RReadStream& aReadStream); 00100 00101 private: // From CSIPHeaderBase 00102 00103 void ExternalizeValueL(RWriteStream& aWriteStream) const; 00104 00105 private: // From CSIPParameterHeaderBase 00106 00107 HBufC8* ToTextMandatoryPartLC() const; 00108 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); 00109 const CSIPParamContainerBase& Params() const; 00110 CSIPParamContainerBase& Params(); 00111 00112 private: // Data 00113 00114 CSIPAddress* iSIPAddress; 00115 CSIPFromToHeaderParams* iParams; 00116 00117 private: // For testing purposes 00118 00119 UNIT_TEST(CSIPFromToHeaderTest) 00120 }; 00121 00122 00123 // CSIPFROMTOHEADERBASE_H 00124 #endif 00125 00126 // End of File