1 siptoheader.h |
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 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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Name : siptoheader.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 CSIPTOHEADER_H |
|
26 #define CSIPTOHEADER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "sipfromtoheaderbase.h" |
|
30 #include "_sipcodecdefs.h" |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * @publishedAll |
|
35 * @released |
|
36 * |
|
37 * Class provides functions for setting and getting SIP "To" header fields. |
|
38 * |
|
39 * @lib sipcodec.lib |
|
40 */ |
|
41 class CSIPToHeader : public CSIPFromToHeaderBase |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Constructs a CSIPToHeader from textual representation |
|
47 * of the header's value part. |
|
48 * @param aValue a value part of a "To"-header (e.g. "User <user@host>") |
|
49 * @return a new instance of CSIPToHeader |
|
50 */ |
|
51 IMPORT_C static CSIPToHeader* DecodeL(const TDesC8& aValue); |
|
52 |
|
53 /** |
|
54 * Creates a new instance of CSIPToHeader |
|
55 * @pre aSIPAddress != 0 |
|
56 * @param aSIPAddress a name-address, the ownership is transferred, |
|
57 * @return a new instance of CSIPToHeader |
|
58 */ |
|
59 IMPORT_C static CSIPToHeader* NewL(CSIPAddress* aSIPAddress); |
|
60 |
|
61 /** |
|
62 * Creates a new instance of CSIPToHeader and puts it to CleanupStack |
|
63 * @pre aSIPAddress != 0 |
|
64 * @param aSIPAddress a name-address, the ownership is transferred, |
|
65 * @return a new instance of CSIPToHeader |
|
66 */ |
|
67 IMPORT_C static CSIPToHeader* NewLC(CSIPAddress* aSIPAddress); |
|
68 |
|
69 /** |
|
70 * Creates a deep-copy of a CSIPFromToHeaderBase |
|
71 * Note that this function can be used for creating a To-header |
|
72 * using an existing From-header. |
|
73 * @param aHeader CSIPFromToHeaderBase to be copied |
|
74 * @return a new instance of CSIPToHeader |
|
75 */ |
|
76 |
|
77 IMPORT_C static CSIPToHeader* |
|
78 NewL(const CSIPFromToHeaderBase& aHeader); |
|
79 |
|
80 /** |
|
81 * Creates a deep-copy of a CSIPFromToHeaderBase and |
|
82 * puts it to CleanupStack |
|
83 * Note that this function can be used for creating a To-header |
|
84 * using an existing From-header. |
|
85 * @param aHeader CSIPFromToHeaderBaseto to be copied |
|
86 * @return a new instance of CSIPToHeader |
|
87 */ |
|
88 IMPORT_C static CSIPToHeader* |
|
89 NewLC(const CSIPFromToHeaderBase& aHeader); |
|
90 |
|
91 /** |
|
92 * Destructor, deletes the resources of CSIPToHeader. |
|
93 */ |
|
94 IMPORT_C ~CSIPToHeader(); |
|
95 |
|
96 |
|
97 public: // New functions |
|
98 |
|
99 /** |
|
100 * Constructs an instance of a CSIPToHeader from a RReadStream |
|
101 * @param aReadStream a stream containing the value of the |
|
102 * externalized object (header name not included). |
|
103 * @return an instance of a CSIPToHeader |
|
104 */ |
|
105 IMPORT_C static CSIPHeaderBase* |
|
106 InternalizeValueL(RReadStream& aReadStream); |
|
107 |
|
108 |
|
109 public: // From CSIPHeaderBase |
|
110 |
|
111 /** |
|
112 * From CSIPHeaderBase CloneL |
|
113 */ |
|
114 IMPORT_C CSIPHeaderBase* CloneL() const; |
|
115 |
|
116 /** |
|
117 * From CSIPHeaderBase Name |
|
118 */ |
|
119 IMPORT_C RStringF Name() const; |
|
120 |
|
121 |
|
122 public: // From CSIPHeaderBase, for internal use |
|
123 |
|
124 /** |
|
125 * @internalComponent |
|
126 */ |
|
127 RStringF CompactName() const; |
|
128 |
|
129 public: // New functions, for internal use |
|
130 |
|
131 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); |
|
132 |
|
133 private: // Constructors |
|
134 |
|
135 CSIPToHeader(); |
|
136 }; |
|
137 |
|
138 #endif // CSIPTOHEADER_H |
|
139 |
|
140 // End of File |