equal
deleted
inserted
replaced
27 // ximpfw |
27 // ximpfw |
28 #include <ximpclient.h> |
28 #include <ximpclient.h> |
29 #include <ximpcontext.h> |
29 #include <ximpcontext.h> |
30 #include <StringLoader.h> |
30 #include <StringLoader.h> |
31 #include <vimpstdetailsviewpluginrsc.rsg> |
31 #include <vimpstdetailsviewpluginrsc.rsg> |
|
32 #include "uiservicetabtracer.h" |
32 |
33 |
33 // --------------------------------------------------------------------------- |
34 // --------------------------------------------------------------------------- |
34 // NewL, two-phase construction |
35 // NewL, two-phase construction |
35 // --------------------------------------------------------------------------- |
36 // --------------------------------------------------------------------------- |
36 // |
37 // |
62 // ConstructL, second phase constructor |
63 // ConstructL, second phase constructor |
63 // --------------------------------------------------------------------------- |
64 // --------------------------------------------------------------------------- |
64 // |
65 // |
65 void CVIMPSTDetailsPresenceHandler::ConstructL(const TDesC& aServiceName ) |
66 void CVIMPSTDetailsPresenceHandler::ConstructL(const TDesC& aServiceName ) |
66 { |
67 { |
|
68 TRACER_AUTO; |
67 iServiceName = aServiceName.AllocL(); |
69 iServiceName = aServiceName.AllocL(); |
68 |
70 |
69 |
71 |
70 iXIMClient = MXIMPClient::NewClientL(); |
72 iXIMClient = MXIMPClient::NewClientL(); |
71 //Create new sink to receive ximp context events |
73 //Create new sink to receive ximp context events |
97 // CVIMPSTDetailsPresenceHandler::SubscribePresenceL |
99 // CVIMPSTDetailsPresenceHandler::SubscribePresenceL |
98 // --------------------------------------------------------------------------- |
100 // --------------------------------------------------------------------------- |
99 // |
101 // |
100 void CVIMPSTDetailsPresenceHandler::SubscribePresenceL(const TDesC& aUserId ) |
102 void CVIMPSTDetailsPresenceHandler::SubscribePresenceL(const TDesC& aUserId ) |
101 { |
103 { |
|
104 TRACER_AUTO; |
102 if( iUserId ) |
105 if( iUserId ) |
103 { |
106 { |
104 delete iUserId; |
107 delete iUserId; |
105 iUserId = NULL; |
108 iUserId = NULL; |
106 } |
109 } |
159 // --------------------------------------------------------------------------- |
162 // --------------------------------------------------------------------------- |
160 // |
163 // |
161 void CVIMPSTDetailsPresenceHandler::HandlePresenceNotificationL(TInt /*aErrorCode*/, |
164 void CVIMPSTDetailsPresenceHandler::HandlePresenceNotificationL(TInt /*aErrorCode*/, |
162 MPresenceBuddyInfo2* aPresenceBuddyInfo) |
165 MPresenceBuddyInfo2* aPresenceBuddyInfo) |
163 { |
166 { |
|
167 TRACER_AUTO; |
164 if ( aPresenceBuddyInfo ) |
168 if ( aPresenceBuddyInfo ) |
165 { |
169 { |
166 CleanupDeletePushL( aPresenceBuddyInfo ); |
170 CleanupDeletePushL( aPresenceBuddyInfo ); |
167 TPtrC buddyXSPId = aPresenceBuddyInfo->BuddyId(); // read the buddyID : returns in XSP format |
171 TPtrC buddyXSPId = aPresenceBuddyInfo->BuddyId(); // read the buddyID : returns in XSP format |
168 TPtrC buddyId = buddyXSPId.Right( buddyXSPId.Length() - iServiceName->Length() - KColon().Length()); |
172 TPtrC buddyId = buddyXSPId.Right( buddyXSPId.Length() - iServiceName->Length() - KColon().Length()); |
247 // CVIMPSTDetailsPresenceHandler::ProcessStatusMesssageL |
251 // CVIMPSTDetailsPresenceHandler::ProcessStatusMesssageL |
248 // --------------------------------------------------------------------------- |
252 // --------------------------------------------------------------------------- |
249 // |
253 // |
250 void CVIMPSTDetailsPresenceHandler::ProcessStatusMesssageL(const TDesC& aStatusMessage ) |
254 void CVIMPSTDetailsPresenceHandler::ProcessStatusMesssageL(const TDesC& aStatusMessage ) |
251 { |
255 { |
|
256 TRACER_AUTO; |
252 if( iStatusMessage ) |
257 if( iStatusMessage ) |
253 { |
258 { |
254 delete iStatusMessage ; |
259 delete iStatusMessage ; |
255 iStatusMessage = NULL; |
260 iStatusMessage = NULL; |
256 } |
261 } |
280 // CVIMPSTDetailsPresenceHandler::GetHeaderLabelDataL |
285 // CVIMPSTDetailsPresenceHandler::GetHeaderLabelDataL |
281 // -------------------------------------------------------------------------- |
286 // -------------------------------------------------------------------------- |
282 // |
287 // |
283 const TDesC& CVIMPSTDetailsPresenceHandler::GetHeaderLabelDataL( TInt aIndex ) |
288 const TDesC& CVIMPSTDetailsPresenceHandler::GetHeaderLabelDataL( TInt aIndex ) |
284 { |
289 { |
|
290 TRACER_AUTO; |
285 if( aIndex == 0 && iServiceName ) // first label data |
291 if( aIndex == 0 && iServiceName ) // first label data |
286 { |
292 { |
287 return *iServiceName; |
293 return *iServiceName; |
288 } |
294 } |
289 else if( aIndex == 2 && iPresenceSupported ) // second label data |
295 else if( aIndex == 2 && iPresenceSupported ) // second label data |
297 // CVIMPSTDetailsPresenceHandler::GetStatusMessageL |
303 // CVIMPSTDetailsPresenceHandler::GetStatusMessageL |
298 // -------------------------------------------------------------------------- |
304 // -------------------------------------------------------------------------- |
299 // |
305 // |
300 const TDesC& CVIMPSTDetailsPresenceHandler::GetStatusMessageL() |
306 const TDesC& CVIMPSTDetailsPresenceHandler::GetStatusMessageL() |
301 { |
307 { |
|
308 TRACER_AUTO; |
302 if( iStatusMessage && iStatusMessage->Length() ) |
309 if( iStatusMessage && iStatusMessage->Length() ) |
303 { |
310 { |
304 return *iStatusMessage; |
311 return *iStatusMessage; |
305 } |
312 } |
306 return GetStatusTextL(); |
313 return GetStatusTextL(); |
319 // CVIMPSTDetailsPresenceHandler::GetStatusTextL |
326 // CVIMPSTDetailsPresenceHandler::GetStatusTextL |
320 // -------------------------------------------------------------------------- |
327 // -------------------------------------------------------------------------- |
321 // |
328 // |
322 const TDesC& CVIMPSTDetailsPresenceHandler::GetStatusTextL() |
329 const TDesC& CVIMPSTDetailsPresenceHandler::GetStatusTextL() |
323 { |
330 { |
|
331 TRACER_AUTO; |
324 TInt resourceId = R_SERVDETAIL_STATUSTEXT_OFFLINE; |
332 TInt resourceId = R_SERVDETAIL_STATUSTEXT_OFFLINE; |
325 |
333 |
326 switch( iStatus ) |
334 switch( iStatus ) |
327 { |
335 { |
328 case TVIMPSTEnums::EOffline: |
336 case TVIMPSTEnums::EOffline: |
404 // CVIMPSTDetailsPresenceHandler::GetKeyFieldsAndValuesL |
412 // CVIMPSTDetailsPresenceHandler::GetKeyFieldsAndValuesL |
405 // --------------------------------------------------------------------------- |
413 // --------------------------------------------------------------------------- |
406 // |
414 // |
407 void CVIMPSTDetailsPresenceHandler::GetKeyFieldsAndValuesL(MPresenceBuddyInfo2& aPresenceBuddyInfo) |
415 void CVIMPSTDetailsPresenceHandler::GetKeyFieldsAndValuesL(MPresenceBuddyInfo2& aPresenceBuddyInfo) |
408 { |
416 { |
|
417 TRACER_AUTO; |
409 // At any point of time fro remote and blocked contact only one of the keys |
418 // At any point of time fro remote and blocked contact only one of the keys |
410 // KPendingRequestExtensionValue/KBlockedExtensionValue will be assigned, and not both the keys. |
419 // KPendingRequestExtensionValue/KBlockedExtensionValue will be assigned, and not both the keys. |
411 TPtrC8 value = aPresenceBuddyInfo.GetAnyField( KExtensionKey() ) ; |
420 TPtrC8 value = aPresenceBuddyInfo.GetAnyField( KExtensionKey() ) ; |
412 if(value.Compare( KPendingRequestExtensionValue ) == 0) |
421 if(value.Compare( KPendingRequestExtensionValue ) == 0) |
413 { |
422 { |