2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Name : sipaddressheaderbase.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPADDRESSHEADERBASE_H
26 #define CSIPADDRESSHEADERBASE_H
29 #include "sipparameterheaderbase.h"
30 #include "_sipcodecdefs.h"
32 // FORWARD DECLARATIONS
34 class CSIPHeaderGenericParams;
41 * A base class for SIP headers having syntax
42 * ( name-addr/ addr-spec ) *(generic-param)
46 class CSIPAddressHeaderBase : public CSIPParameterHeaderBase
48 public: // Constructors and destructor
51 * Destructor, deletes the resources of CSIPAddressHeaderBase.
53 IMPORT_C virtual ~CSIPAddressHeaderBase();
56 public: // New functions
59 * Sets the name-address
60 * @pre aSIPAddress != 0
61 * @param aSIPAddress a name-address to set, the ownership is transferred
63 IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
66 * Gets the name-address as const
67 * @return name-address object
69 IMPORT_C const CSIPAddress& SIPAddress() const;
72 * Gets the name-address
73 * @return name-address object
75 IMPORT_C CSIPAddress& SIPAddress();
78 protected: // Constructors
80 CSIPAddressHeaderBase();
82 void ConstructL(CSIPAddress* aSIPAddress);
83 void ConstructL(const CSIPAddressHeaderBase& aHeader);
90 CSIPAddress* iSIPAddress;
95 CSIPHeaderGenericParams* iParams;
97 protected: // New functions
99 void DoInternalizeValueL(RReadStream& aReadStream);
101 protected: // From CSIPHeaderBase
106 void ExternalizeValueL(RWriteStream& aWriteStream) const;
108 private: // From CSIPParameterHeaderBase
110 HBufC8* ToTextMandatoryPartLC() const;
111 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
112 const CSIPParamContainerBase& Params() const;
113 CSIPParamContainerBase& Params();
116 #endif // end of CSIPADDRESSHEADERBASE_H