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 : siprouteheader.h
17 * Interface : SDK API, SIP Codec API
25 #ifndef CSIPROUTEHEADER_H
26 #define CSIPROUTEHEADER_H
29 #include "siprouteheaderbase.h"
36 * Class for SIP "Route"-header manipulation.
40 class CSIPRouteHeader : public CSIPRouteHeaderBase
42 public: // Constructors and destructor
45 * Constructs a CSIPRouteHeader from textual representation
46 * of the header's value part.
47 * @param aValue a value part of a "Route"-header
48 * @return an array containing one to many instances of CSIPRouteHeader
50 IMPORT_C static RPointerArray<CSIPRouteHeader>
51 DecodeL(const TDesC8& aValue);
54 * Creates a new instance of CSIPRouteHeader
55 * @pre aSIPAddress != 0
56 * @param aSIPAddress a name-address, the ownership is transferred
57 * @return a new instance of CSIPRouteHeader
59 IMPORT_C static CSIPRouteHeader* NewL(CSIPAddress* aSIPAddress);
62 * Creates a new instance of CSIPRouteHeader and puts it to CleanupStack
63 * @pre aSIPAddress != 0
64 * @pre aSIPAddress->Address().HostPort().HasHost() == ETrue
65 * @param aSIPAddress a name-address, the ownership is transferred
66 * @return a new instance of CSIPRouteHeader
68 IMPORT_C static CSIPRouteHeader* NewLC(CSIPAddress* aSIPAddress);
71 * Destructor, deletes the resources of CSIPRouteHeader.
73 IMPORT_C ~CSIPRouteHeader();
76 public: // New functions
79 * Constructs an instance of a CCSIPRouteHeader from a RReadStream
80 * @param aReadStream a stream containing the value of the
81 * externalized object (header name not included).
82 * @return an instance of a CSIPRouteHeader
84 IMPORT_C static CSIPHeaderBase*
85 InternalizeValueL(RReadStream& aReadStream);
88 public: // From CSIPHeaderBase
91 * From CSIPHeaderBase CloneL
93 IMPORT_C CSIPHeaderBase* CloneL() const;
96 * From CSIPHeaderBase Name
98 IMPORT_C RStringF Name() const;
101 public: // New functions, for internal use
103 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
104 static CSIPRouteHeader* NewL(const CSIPRouteHeaderBase& aHeader);
106 private: // From CSIPHeaderbase
108 void ExternalizeValueL(RWriteStream& aWriteStream) const;
110 private: // Constructors
114 private: // New functions
116 void DoInternalizeValueL(RReadStream& aReadStream);
119 #endif // CSIPROUTEHEADER_H