|
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 : siprefertoheader.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 CSIPREFERTOHEADER_H |
|
26 #define CSIPREFERTOHEADER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "sipaddressheaderbase.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSIPAddress; |
|
33 class CSIPHeaderGenericParams; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * @publishedAll |
|
38 * @released |
|
39 * |
|
40 * Class provides functions for setting and getting parameters in SIP |
|
41 * "Refer-To" header. |
|
42 * |
|
43 * @lib sipcodec.lib |
|
44 */ |
|
45 class CSIPReferToHeader : public CSIPAddressHeaderBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Constructs a CSIPReferToHeader from textual representation |
|
51 * of the header's value part. |
|
52 * @param aValue a value part of a "Refer-To"-header |
|
53 * (e.g. "User <user@host>") |
|
54 * @return a new instance of CSIPReferToHeader |
|
55 */ |
|
56 IMPORT_C static CSIPReferToHeader* DecodeL(const TDesC8& aValue); |
|
57 |
|
58 /** |
|
59 * Creates a new instance of CSIPReferToHeader |
|
60 * @pre aSIPAddress != 0 |
|
61 * @param aSIPAddress a name-address, the ownership is transferred. |
|
62 * @return a new instance of CSIPReferToHeader |
|
63 */ |
|
64 IMPORT_C static CSIPReferToHeader* NewL(CSIPAddress* aSIPAddress); |
|
65 |
|
66 /** |
|
67 * Creates a new instance of CSIPReferToHeader and puts it to CleanupStack |
|
68 * @pre aSIPAddress != 0 |
|
69 * @param aSIPAddress a name-address, the ownership is transferred, |
|
70 * @return a new instance of CSIPReferToHeader |
|
71 */ |
|
72 IMPORT_C static CSIPReferToHeader* NewLC(CSIPAddress* aSIPAddress); |
|
73 |
|
74 /** |
|
75 * Destructor, deletes the resources of CSIPReferToHeader. |
|
76 */ |
|
77 IMPORT_C virtual ~CSIPReferToHeader(); |
|
78 |
|
79 |
|
80 public: // New functions |
|
81 |
|
82 /** |
|
83 * Constructs an instance of a CSIPReferToHeader from a RReadStream |
|
84 * @param aReadStream a stream containing the value of the |
|
85 * externalized object (header name not included). |
|
86 * @return an instance of a CSIPReferToHeader |
|
87 */ |
|
88 IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); |
|
89 |
|
90 |
|
91 public: // From CSIPHeaderBase |
|
92 |
|
93 /** |
|
94 * From CSIPHeaderBase CloneL |
|
95 */ |
|
96 IMPORT_C CSIPHeaderBase* CloneL() const; |
|
97 |
|
98 /** |
|
99 * From CSIPHeaderBase Name |
|
100 */ |
|
101 IMPORT_C RStringF Name() const; |
|
102 |
|
103 |
|
104 public: // From CSIPHeaderBase, for internal use |
|
105 |
|
106 /** |
|
107 * @internalComponent |
|
108 */ |
|
109 TBool HasCompactName() const; |
|
110 |
|
111 /** |
|
112 * @internalComponent |
|
113 */ |
|
114 RStringF CompactName() const; |
|
115 |
|
116 /** |
|
117 * @internalComponent |
|
118 */ |
|
119 TPreferredPlace PreferredPlaceInMessage() const; |
|
120 |
|
121 public: // New functions, for internal use |
|
122 |
|
123 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); |
|
124 |
|
125 private: // Constructors |
|
126 |
|
127 CSIPReferToHeader(); |
|
128 |
|
129 private: // For testing purposes |
|
130 #ifdef CPPUNIT_TEST |
|
131 friend class CSIPReferToHeaderTest; |
|
132 #endif |
|
133 }; |
|
134 |
|
135 #endif // end of CSIPREFERTOHEADER_H |
|
136 |
|
137 // End of File |