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