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 : siprouteheaderbase.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPROUTEHEADERBASE_H
26 #define CSIPROUTEHEADERBASE_H
29 #include "sipparameterheaderbase.h"
30 #include "_sipcodecdefs.h"
32 // FORWARD DECLARATIONS
34 class CSIPHeaderGenericParams;
41 * A base class for "Route"-, "Record-Route"- and "Service-Route"-headers.
45 class CSIPRouteHeaderBase : public CSIPParameterHeaderBase
47 public: // Constructors and destructor
50 * Destructor, deletes the resources of CSIPRouteHeaderBase.
52 IMPORT_C virtual ~CSIPRouteHeaderBase();
55 public: // New functions
58 * Sets the name-address
59 * @pre aSIPAddress != 0
60 * @param aSIPAddress a name-address, the ownership is transferred
62 IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
65 * Gets the name-address as const
66 * @return name-address
68 IMPORT_C const CSIPAddress& SIPAddress() const;
71 * Gets the name-address
72 * @return name-address
74 IMPORT_C CSIPAddress& SIPAddress();
77 public: // From CSIPHeaderBase, for internal use
82 TBool MoreThanOneAllowed() const;
87 TPreferredPlace PreferredPlaceInMessage() const;
89 protected: // Contructors
91 CSIPRouteHeaderBase();
93 void ConstructL(CSIPAddress* aSIPAddress);
94 void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase);
101 CSIPAddress* iSIPAddress;
106 CSIPHeaderGenericParams* iParams;
108 private: // From CSIPParameterHeaderBase
110 HBufC8* ToTextMandatoryPartLC() const;
111 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
112 const CSIPParamContainerBase& Params() const;
113 CSIPParamContainerBase& Params();
115 private: // For testing purposes
117 UNIT_TEST(CSIPRouteHeaderBaseTest)
120 #endif // CSIPROUTEHEADERBASE_H