Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
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 : sipfromtoheaderbase.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPFROMTOHEADERBASE_H
26 #define CSIPFROMTOHEADERBASE_H
29 #include "sipparameterheaderbase.h"
30 #include "_sipcodecdefs.h"
32 // FORWARD DECLARATIONS
34 class CSIPFromToHeaderParams;
41 * Class provides functions for setting and getting parameters in SIP "From"
44 * This is an abstract class and cannot be instantiated.
48 class CSIPFromToHeaderBase : public CSIPParameterHeaderBase
50 public: // Constructors and destructor
53 * Destructor, deletes the resources of CSIPFromToHeaderBase.
55 IMPORT_C virtual ~CSIPFromToHeaderBase();
58 public: // New functions
61 * Compares this instance to another "From" or "To" header object
62 * @param aHeader a header to compare to
63 * @return ETrue, if the objects are equal otherwise EFalse
65 IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const;
68 * Sets the name-address
69 * @pre aSIPAddress != 0
70 * @param aSIPAddress a name-address to set, the ownership is transferred
72 IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
75 * Gets the name-address as const
76 * @return name-address object
78 IMPORT_C const CSIPAddress& SIPAddress() const;
81 * Gets the name-address
82 * @return name-address object
84 IMPORT_C CSIPAddress& SIPAddress();
87 public: // From CSIPHeaderBase, for internal use
92 TBool HasCompactName() const;
97 TPreferredPlace PreferredPlaceInMessage() const;
99 protected: // Constructors
101 CSIPFromToHeaderBase();
103 void ConstructL(CSIPAddress* aSIPAddress);
104 void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag);
105 void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase);
107 protected: // New functions
109 void DoInternalizeValueL(RReadStream& aReadStream);
111 private: // From CSIPHeaderBase
113 void ExternalizeValueL(RWriteStream& aWriteStream) const;
115 private: // From CSIPParameterHeaderBase
117 HBufC8* ToTextMandatoryPartLC() const;
118 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
119 const CSIPParamContainerBase& Params() const;
120 CSIPParamContainerBase& Params();
124 CSIPAddress* iSIPAddress;
125 CSIPFromToHeaderParams* iParams;
127 private: // For testing purposes
129 UNIT_TEST(CSIPFromToHeaderTest)
133 #endif // CSIPFROMTOHEADERBASE_H