|
1 /* |
|
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Name : siprouteheader.h |
|
16 * Part of : SIP Codec |
|
17 * Interface : SDK API, SIP Codec API |
|
18 * Version : SIP/4.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef CSIPROUTEHEADER_H |
|
26 #define CSIPROUTEHEADER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "siprouteheaderbase.h" |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * @publishedAll |
|
34 * @released |
|
35 * |
|
36 * Class for SIP "Route"-header manipulation. |
|
37 * |
|
38 * @lib sipcodec.lib |
|
39 */ |
|
40 class CSIPRouteHeader : public CSIPRouteHeaderBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
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 |
|
49 */ |
|
50 IMPORT_C static RPointerArray<CSIPRouteHeader> |
|
51 DecodeL(const TDesC8& aValue); |
|
52 |
|
53 /** |
|
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 |
|
58 */ |
|
59 IMPORT_C static CSIPRouteHeader* NewL(CSIPAddress* aSIPAddress); |
|
60 |
|
61 /** |
|
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 |
|
67 */ |
|
68 IMPORT_C static CSIPRouteHeader* NewLC(CSIPAddress* aSIPAddress); |
|
69 |
|
70 /** |
|
71 * Destructor, deletes the resources of CSIPRouteHeader. |
|
72 */ |
|
73 IMPORT_C ~CSIPRouteHeader(); |
|
74 |
|
75 |
|
76 public: // New functions |
|
77 |
|
78 /** |
|
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 |
|
83 */ |
|
84 IMPORT_C static CSIPHeaderBase* |
|
85 InternalizeValueL(RReadStream& aReadStream); |
|
86 |
|
87 |
|
88 public: // From CSIPHeaderBase |
|
89 |
|
90 /** |
|
91 * From CSIPHeaderBase CloneL |
|
92 */ |
|
93 IMPORT_C CSIPHeaderBase* CloneL() const; |
|
94 |
|
95 /** |
|
96 * From CSIPHeaderBase Name |
|
97 */ |
|
98 IMPORT_C RStringF Name() const; |
|
99 |
|
100 |
|
101 public: // New functions, for internal use |
|
102 |
|
103 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); |
|
104 static CSIPRouteHeader* NewL(const CSIPRouteHeaderBase& aHeader); |
|
105 |
|
106 private: // From CSIPHeaderbase |
|
107 |
|
108 void ExternalizeValueL(RWriteStream& aWriteStream) const; |
|
109 |
|
110 private: // Constructors |
|
111 |
|
112 CSIPRouteHeader(); |
|
113 |
|
114 private: // New functions |
|
115 |
|
116 void DoInternalizeValueL(RReadStream& aReadStream); |
|
117 }; |
|
118 |
|
119 #endif // CSIPROUTEHEADER_H |
|
120 |
|
121 // End of File |