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 "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.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"
31 // FORWARD DECLARATIONS
33 class CSIPHeaderGenericParams;
40 * A base class for "Route"-, "Record-Route"- and "Service-Route"-headers.
44 class CSIPRouteHeaderBase : public CSIPParameterHeaderBase
46 public: // Constructors and destructor
49 * Destructor, deletes the resources of CSIPRouteHeaderBase.
51 IMPORT_C virtual ~CSIPRouteHeaderBase();
54 public: // New functions
57 * Sets the name-address
58 * @pre aSIPAddress != 0
59 * @param aSIPAddress a name-address, the ownership is transferred
61 IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
64 * Gets the name-address as const
65 * @return name-address
67 IMPORT_C const CSIPAddress& SIPAddress() const;
70 * Gets the name-address
71 * @return name-address
73 IMPORT_C CSIPAddress& SIPAddress();
76 public: // From CSIPHeaderBase, for internal use
81 TBool MoreThanOneAllowed() const;
86 TPreferredPlace PreferredPlaceInMessage() const;
88 protected: // Contructors
90 CSIPRouteHeaderBase();
92 void ConstructL(CSIPAddress* aSIPAddress);
93 void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase);
100 CSIPAddress* iSIPAddress;
105 CSIPHeaderGenericParams* iParams;
107 private: // From CSIPParameterHeaderBase
109 HBufC8* ToTextMandatoryPartLC() const;
110 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
111 const CSIPParamContainerBase& Params() const;
112 CSIPParamContainerBase& Params();
114 private: // For testing purposes
116 friend class CSIPRouteHeaderBaseTest;
120 #endif // CSIPROUTEHEADERBASE_H