|
1 /* |
|
2 * Copyright (c) 2005-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 : sippaccessnetworkinfoheader.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 /** |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 |
|
30 #ifndef CSIPPACCESSNETWORKINFOHEADER_H |
|
31 #define CSIPPACCESSNETWORKINFOHEADER_H |
|
32 |
|
33 // INCLUDES |
|
34 #include "sipparameterheaderbase.h" |
|
35 #include "_sipcodecdefs.h" |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CSIPAddress; |
|
39 class CSIPPAccessNetworkInfoHeaderParams; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 /** |
|
43 * Class provides functions for setting and getting parameters in SIP |
|
44 * "P-Access-Network-Info" header. |
|
45 * |
|
46 * @lib sipcodec.lib |
|
47 */ |
|
48 class CSIPPAccessNetworkInfoHeader : public CSIPParameterHeaderBase |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Constructs a CSIPPAccessNetworkInfoHeader from textual representation |
|
54 * of the header's value part. |
|
55 * @param aValue a value part of a "P-Access-Network-Info"-header |
|
56 * (e.g. "IEEE-802.11a;cgi-3gpp=\"qString\"") |
|
57 * @return a new instance of CSIPPAccessNetworkInfoHeader |
|
58 */ |
|
59 IMPORT_C static CSIPPAccessNetworkInfoHeader* |
|
60 DecodeL(const TDesC8& aValue); |
|
61 |
|
62 /** |
|
63 * Creates a new instance of CSIPPAccessNetworkInfoHeader |
|
64 * @pre aSIPAddress != 0 |
|
65 * @param aAccessType an access type. |
|
66 * @return a new instance of CSIPPAccessNetworkInfoHeader |
|
67 */ |
|
68 IMPORT_C static CSIPPAccessNetworkInfoHeader* |
|
69 NewL(RStringF aAccessType); |
|
70 |
|
71 /** |
|
72 * Creates a new instance of CSIPPAccessNetworkInfoHeader and |
|
73 * puts it to CleanupStack |
|
74 * @param aAccessType an access type. |
|
75 * @return a new instance of CSIPPAccessNetworkInfoHeader |
|
76 */ |
|
77 IMPORT_C static CSIPPAccessNetworkInfoHeader* |
|
78 NewLC(RStringF aAccessType); |
|
79 |
|
80 /** |
|
81 * Destructor, deletes the resources of CSIPPAccessNetworkInfoHeader. |
|
82 */ |
|
83 IMPORT_C virtual ~CSIPPAccessNetworkInfoHeader(); |
|
84 |
|
85 |
|
86 public: // New functions |
|
87 |
|
88 /** |
|
89 * Sets the access-type |
|
90 * @param aAccessType an access type. |
|
91 */ |
|
92 IMPORT_C void SetAccessTypeL(RStringF aAccessType); |
|
93 |
|
94 /** |
|
95 * Gets the access-type as const |
|
96 * @return access-type |
|
97 */ |
|
98 IMPORT_C RStringF AccessType() const; |
|
99 |
|
100 |
|
101 public: // From CSIPHeaderBase |
|
102 |
|
103 /** |
|
104 * From CSIPHeaderBase CloneL |
|
105 */ |
|
106 IMPORT_C CSIPHeaderBase* CloneL() const; |
|
107 |
|
108 /** |
|
109 * From CSIPHeaderBase Name |
|
110 */ |
|
111 IMPORT_C RStringF Name() const; |
|
112 |
|
113 /** |
|
114 * From CSIPHeaderBase ExternalizeSupported |
|
115 */ |
|
116 IMPORT_C TBool ExternalizeSupported() const; |
|
117 |
|
118 |
|
119 public: // From CSIPHeaderBase, for internal use |
|
120 |
|
121 TPreferredPlace PreferredPlaceInMessage() const; |
|
122 |
|
123 public: // New functions, for internal use |
|
124 |
|
125 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue); |
|
126 |
|
127 private: // From CSIPParameterHeaderBase |
|
128 |
|
129 HBufC8* ToTextMandatoryPartLC() const; |
|
130 void ParseMandatoryPartL(const TDesC8& aMandatoryPart); |
|
131 const CSIPParamContainerBase& Params() const; |
|
132 CSIPParamContainerBase& Params(); |
|
133 |
|
134 private: // Constructors |
|
135 |
|
136 CSIPPAccessNetworkInfoHeader(); |
|
137 void ConstructL(); |
|
138 void ConstructL(RStringF aAccessType); |
|
139 void ConstructL(const CSIPPAccessNetworkInfoHeader& aHeader); |
|
140 |
|
141 private: // Data |
|
142 |
|
143 RStringF iAccessType; |
|
144 CSIPPAccessNetworkInfoHeaderParams* iParams; |
|
145 |
|
146 private: // For testing purposes |
|
147 |
|
148 UNIT_TEST(CSIPPAccessNetworkInfoHeaderTest) |
|
149 }; |
|
150 |
|
151 #endif // end of CSIPPACCESSNETWORKINFOHEADER_H |
|
152 |
|
153 // End of File |