|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // SIPSCPR_subconparams.h |
|
15 // SIP extension parameters definition |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @publishedAll |
|
22 @released since v9.2 |
|
23 */ |
|
24 |
|
25 #ifndef SIP_SUBCONPARAMS_H |
|
26 #define SIP_SUBCONPARAMS_H |
|
27 |
|
28 #include <es_sock.h> |
|
29 #include <comms-infras/es_parameterfamily.h> |
|
30 |
|
31 /** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */ |
|
32 const TInt KSubConSIPParametersUid = 0x10274C18; |
|
33 |
|
34 /** The numeric value of Invite identifier for SIP extension parameter set */ |
|
35 const TInt KSubConSIPInviteParamsType = 1; |
|
36 |
|
37 /** The numeric value of Subscribe identifier for SIP extension parameter set */ |
|
38 const TInt KSubConSIPSubscribeParamsType = 2; |
|
39 |
|
40 /** The numeric value of Authentication of SIP extension parameter set */ |
|
41 const TInt KSubConSIPAuthenticateParamsType = 3; |
|
42 |
|
43 class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet |
|
44 /** |
|
45 This contains the SIP Invite parameters that will be passed via subconnection |
|
46 to the SIP stack |
|
47 @publishedAll |
|
48 @released since v9.2 |
|
49 */ |
|
50 { |
|
51 public: |
|
52 /** |
|
53 Creates a new SubConSIPInvite parameter set object. |
|
54 @param aFamily ,contains family related info |
|
55 @param aType contains parameter Type such as (Requested, Acceptable and Granted) |
|
56 @return A pointer to the newly allocated object. |
|
57 @leave KErrArgument if the data is not of type TParameterSetType. |
|
58 */ |
|
59 inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); |
|
60 inline static CSubConSIPInviteParamSet* NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType); |
|
61 inline static CSubConSIPInviteParamSet* NewL(); |
|
62 |
|
63 /** Constructor. */ |
|
64 inline CSubConSIPInviteParamSet(); |
|
65 /** Destructor. */ |
|
66 virtual ~CSubConSIPInviteParamSet(); |
|
67 |
|
68 /** Getters for SIP header. */ |
|
69 /** Gets Request URI field of the SIP header. **/ |
|
70 inline const TPtrC8 GetRequestUri() const; |
|
71 /** Gets From field of the SIP header. **/ |
|
72 inline const TPtrC8 GetFrom() const; |
|
73 /** Gets To field of the SIP header. **/ |
|
74 inline const TPtrC8 GetTo() const; |
|
75 /** Gets Contact field of the SIP header. **/ |
|
76 inline const TPtrC8 GetContact() const; |
|
77 /** Gets ContentType field of the SIP header. **/ |
|
78 inline const TPtrC8 GetContentType() const; |
|
79 /** Gets ContentSubType field of the SIP header. **/ |
|
80 inline const TPtrC8 GetContentSubType() const; |
|
81 /** Gets Content field of the SIP header. **/ |
|
82 inline const TPtrC8 GetContent() const; |
|
83 |
|
84 /** Setters for SIP header. |
|
85 /** Sets Request URI field of the SIP header. **/ |
|
86 inline void SetRequestUriL(const TPtrC8 & aReqUri); |
|
87 /** Sets From field of the SIP header. **/ |
|
88 inline void SetFromL(const TPtrC8 & aFrom); |
|
89 /** Sets To field of the SIP header. **/ |
|
90 inline void SetToL(const TPtrC8 & aTo); |
|
91 /** Sets Contact field of the SIP header. **/ |
|
92 inline void SetContactL(const TPtrC8 & aContact); |
|
93 /** Sets Content Type field of the SIP header. **/ |
|
94 inline void SetContentTypeL(const TPtrC8 & aContentType); |
|
95 /** Sets Content Sub Type field of the SIP header. **/ |
|
96 inline void SetContentSubTypeL(const TPtrC8 & aContentSubType); |
|
97 /** Sets Content field of the SIP header. **/ |
|
98 inline void SetContentL(const TPtrC8 & aContent); |
|
99 |
|
100 DATA_VTABLE |
|
101 protected: |
|
102 |
|
103 /** The Request URI field of the SIP header. */ |
|
104 RBuf8 iReqUri; |
|
105 /** The From field of the SIP header. */ |
|
106 RBuf8 iFrom; |
|
107 /** The To field of the SIP header. */ |
|
108 RBuf8 iTo; |
|
109 /** The Contact field of the SIP header. */ |
|
110 RBuf8 iContact; |
|
111 /** The Content Type field of the SIP header. */ |
|
112 RBuf8 iContentType; |
|
113 /** The Content Sub Type field of the SIP header. */ |
|
114 RBuf8 iContentSubType; |
|
115 /** The Content field of the SIP header. */ |
|
116 RBuf8 iContent; |
|
117 }; |
|
118 |
|
119 |
|
120 |
|
121 class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet |
|
122 /** |
|
123 This contains the SIP Subscribe parameters that will be passed via subconnection |
|
124 to the SIP stack |
|
125 @publishedAll |
|
126 @released since v9.2 |
|
127 */ |
|
128 { |
|
129 public: |
|
130 /** |
|
131 Creates a new SubConSIPSubscribe parameter set object. |
|
132 @param aFamily ,contains family related info |
|
133 @param aType contains parameter Type such as (Requested, Acceptable and Granted) |
|
134 @return A pointer to the newly allocated object. |
|
135 @leave KErrArgument if the data is not of type TParameterSetType. |
|
136 */ |
|
137 inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); |
|
138 inline static CSubConSIPSubscribeParamSet* NewL(); |
|
139 |
|
140 /** Constructor. */ |
|
141 inline CSubConSIPSubscribeParamSet(); |
|
142 |
|
143 /** Destructor. */ |
|
144 virtual ~CSubConSIPSubscribeParamSet(); |
|
145 |
|
146 /** Getters for SIP header. */ |
|
147 /** Gets Request URI field of the SIP header. **/ |
|
148 inline const TPtrC8 GetRequestUri() const; |
|
149 /** Gets From field of the SIP header. **/ |
|
150 inline const TPtrC8 GetFrom() const; |
|
151 /** Gets To field of the SIP header. **/ |
|
152 inline const TPtrC8 GetTo() const; |
|
153 /** Gets Contact field of the SIP header. **/ |
|
154 inline const TPtrC8 GetContact() const; |
|
155 /** Gets Event Type field of the SIP header. **/ |
|
156 inline const TPtrC8 GetEventType() const; |
|
157 /** Gets Accept Type field of the SIP header. **/ |
|
158 inline const TPtrC8 GetAcceptType() const; |
|
159 /** Gets Accept Sub Type field of the SIP header. **/ |
|
160 inline const TPtrC8 GetAcceptSubType() const; |
|
161 /** Gets Expires field of the SIP header. **/ |
|
162 inline const TInt GetExpires() const; |
|
163 /** Gets Auto Refresh field of the SIP header. **/ |
|
164 inline const TBool GetAutoRefresh() const; |
|
165 |
|
166 /** Setters for SIP header. */ |
|
167 /** Sets Request URI field of the SIP header. **/ |
|
168 inline void SetRequestUriL(const TPtrC8 & aReqUri); |
|
169 /** Sets From field of the SIP header. **/ |
|
170 inline void SetFromL(const TPtrC8 & aFrom); |
|
171 /** Sets To field of the SIP header. **/ |
|
172 inline void SetToL(const TPtrC8 & aTo); |
|
173 /** Sets Contact field of the SIP header. **/ |
|
174 inline void SetContactL(const TPtrC8 & aContact); |
|
175 /** Sets Event Type field of the SIP header. **/ |
|
176 inline void SetEventTypeL(const TPtrC8 & aEventType); |
|
177 /** Sets Accept Type field of the SIP header. **/ |
|
178 inline void SetAcceptTypeL(const TPtrC8 & aAcceptType); |
|
179 /** Sets Accept Sub Type field of the SIP header. **/ |
|
180 inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType); |
|
181 /** Sets Expires Sub Type field of the SIP header. **/ |
|
182 inline void SetExpires(TInt aExpires); |
|
183 /** Sets AutoRfresh field of the SIP header. **/ |
|
184 inline void SetAutoRefresh(TBool aAutoRefresh); |
|
185 |
|
186 |
|
187 DATA_VTABLE |
|
188 protected: |
|
189 |
|
190 /** The Request URI field of the SIP header. */ |
|
191 RBuf8 iReqUri; |
|
192 /** The From field of the SIP header. */ |
|
193 RBuf8 iFrom; |
|
194 /** The To field of the SIP header. */ |
|
195 RBuf8 iTo; |
|
196 /** The Contact field of the SIP header. */ |
|
197 RBuf8 iContact; |
|
198 /** The Event Type field of the SIP header. */ |
|
199 RBuf8 iEventType; |
|
200 /** The Accept Type field of the SIP header. */ |
|
201 RBuf8 iAcceptType; |
|
202 /** The Accept Sub Type field of the SIP header. */ |
|
203 RBuf8 iAcceptSubType; |
|
204 /** The Expires field of the SIP header. */ |
|
205 TInt iExpires; |
|
206 /** The AutoRefresh field of the SIP header. */ |
|
207 TBool iAutoRefresh; |
|
208 }; |
|
209 |
|
210 class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet |
|
211 /** |
|
212 This contains the SIP Authenticate parameters that will be passed via subconnection |
|
213 to the SIP stack |
|
214 @publishedAll |
|
215 @released since v9.2 |
|
216 */ |
|
217 { |
|
218 public: |
|
219 /** |
|
220 Creates a new SubConSIPAuthenticate parameter set object. |
|
221 @param aFamily ,contains family related info |
|
222 @param aType contains parameter Type such as (Requested, Acceptable and Granted) |
|
223 @return A pointer to the newly allocated object. |
|
224 @leave KErrArgument if the data is not of type TParameterSetType. |
|
225 */ |
|
226 inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); |
|
227 inline static CSubConSIPAuthenticateParamSet* NewL(); |
|
228 |
|
229 /** Constructor. */ |
|
230 inline CSubConSIPAuthenticateParamSet(); |
|
231 |
|
232 /** Destructor. */ |
|
233 virtual ~CSubConSIPAuthenticateParamSet(); |
|
234 |
|
235 /** Getters for SIP header. */ |
|
236 /** Gets Username field of the SIP header. **/ |
|
237 inline const TPtrC8 GetUserName() const; |
|
238 /** Gets Password field of the SIP header. **/ |
|
239 inline const TPtrC8 GetPassword() const; |
|
240 /** Gets Realm field of the SIP header. **/ |
|
241 inline const TPtrC8 GetRealm() const; |
|
242 |
|
243 /** Setters for SIP header. */ |
|
244 /** Sets Username field of the SIP header. **/ |
|
245 inline void SetUserNameL(const TPtrC8 & aUserName); |
|
246 /** Sets Password field of the SIP header. **/ |
|
247 inline void SetPasswordL(const TPtrC8 & aPassword); |
|
248 /** Sets Realm field of the SIP header. **/ |
|
249 inline void SetRealmL(const TPtrC8 & aRealm); |
|
250 |
|
251 DATA_VTABLE |
|
252 protected: |
|
253 |
|
254 /** The Username entry of Authenticate field in a SIP header. */ |
|
255 RBuf8 iUserName; |
|
256 /** The Password entry of Authenticate field in a SIP header. */ |
|
257 RBuf8 iPassword; |
|
258 /** The Realm entry of Authenticate field in a SIP header. */ |
|
259 RBuf8 iRealm; |
|
260 }; |
|
261 |
|
262 |
|
263 |
|
264 class CSIPSubConnExtensionParamsFactory : public CBase |
|
265 /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets. |
|
266 |
|
267 @publishedAll |
|
268 @released since v9.2 |
|
269 */ |
|
270 { |
|
271 public: |
|
272 static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); |
|
273 }; |
|
274 |
|
275 #include "SIP_subconparams.inl" |
|
276 |
|
277 #endif // SIP_SUBCONPARAMS_H |