equal
deleted
inserted
replaced
43 return self; |
43 return self; |
44 } |
44 } |
45 // Second phase construction. |
45 // Second phase construction. |
46 void CWSOviTokenCreationResponse::ConstructL() |
46 void CWSOviTokenCreationResponse::ConstructL() |
47 { |
47 { |
48 CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), |
48 CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), KTokenCreationResponseLocalName); |
49 KTokenCreationResponseLocalName); |
|
50 } |
49 } |
51 |
50 |
52 void CWSOviTokenCreationResponse::StartElementL(const TDesC8& /*aNsUri*/, |
51 void CWSOviTokenCreationResponse::StartElementL(const TDesC8& /*aNsUri*/, |
53 const TDesC8& aLocalName, |
52 const TDesC8& aLocalName, |
54 const TDesC8& /*aQName*/, |
53 const TDesC8& /*aQName*/, |
76 { |
75 { |
77 if (aLocalName == KTokenSecretLocalName) |
76 if (aLocalName == KTokenSecretLocalName) |
78 { |
77 { |
79 iState = KStateSave; |
78 iState = KStateSave; |
80 } |
79 } |
81 else if (aLocalName == KTokenLocalName) |
80 else if (aLocalName == KTokenLocalName) |
82 { |
81 { |
83 iState = KStateSave; |
82 iState = KStateSave; |
84 } |
83 } |
85 else if (aLocalName == KTTLLocalName) |
84 else if (aLocalName == KTTLLocalName) |
86 { |
85 { |
87 iState = KStateSave; |
86 iState = KStateSave; |
88 } |
87 } |
|
88 else if (aLocalName == KExpiresLocalName) |
|
89 { |
|
90 iState = KStateSave; |
|
91 } |
89 break; |
92 break; |
90 } |
93 } |
91 case KStateParsingUserInfo: |
94 case KStateParsingUserInfo: |
92 { |
95 { |
93 if (aLocalName == KUserNameLocalName) |
96 if (aLocalName == KUserNameLocalName) |
152 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel, content); |
155 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel, content); |
153 iTTL = content.AllocL(); |
156 iTTL = content.AllocL(); |
154 ResetContentL(); |
157 ResetContentL(); |
155 iState = KStateParsingTokenInfo; |
158 iState = KStateParsingTokenInfo; |
156 } |
159 } |
|
160 else if (aLocalName == KExpiresLocalName) |
|
161 { |
|
162 if(iValidUntil) |
|
163 { |
|
164 delete iValidUntil; |
|
165 iValidUntil = NULL; |
|
166 } |
|
167 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"WSOviTokenCreationResponse::expires parsing"); |
|
168 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("iValidUntil : %S"), &content)); |
|
169 |
|
170 iValidUntil = content.AllocL(); |
|
171 |
|
172 ResetContentL(); |
|
173 iState = KStateParsingTokenInfo; |
|
174 } |
157 else if ( aLocalName == KUserNameLocalName) |
175 else if ( aLocalName == KUserNameLocalName) |
158 { |
176 { |
159 if (iUsername) |
177 if (iUsername) |
160 { |
178 { |
161 delete iUsername; |
179 delete iUsername; |
200 { |
218 { |
201 delete iToken; |
219 delete iToken; |
202 delete iTokenSecret; |
220 delete iTokenSecret; |
203 delete iTTL; |
221 delete iTTL; |
204 delete iUsername; |
222 delete iUsername; |
|
223 delete iValidUntil; |
205 } |
224 } |
206 |
225 |
207 TPtrC8 CWSOviTokenCreationResponse::Token() |
226 TPtrC8 CWSOviTokenCreationResponse::Token() |
208 { |
227 { |
209 if (iToken) |
228 if (iToken) |
238 { |
257 { |
239 return KNullDesC8(); |
258 return KNullDesC8(); |
240 } |
259 } |
241 } |
260 } |
242 |
261 |
|
262 TPtrC8 CWSOviTokenCreationResponse::ValidUntil() |
|
263 { |
|
264 if (iValidUntil) |
|
265 { |
|
266 return *iValidUntil; |
|
267 } |
|
268 else |
|
269 { |
|
270 return KNullDesC8(); |
|
271 } |
|
272 } |
|
273 |
243 TPtrC8 CWSOviTokenCreationResponse::Username() |
274 TPtrC8 CWSOviTokenCreationResponse::Username() |
244 { |
275 { |
245 if (iUsername) |
276 if (iUsername) |
246 { |
277 { |
247 return *iUsername; |
278 return *iUsername; |