equal
deleted
inserted
replaced
32 #include "tvimpstenums.h" |
32 #include "tvimpstenums.h" |
33 |
33 |
34 |
34 |
35 #include "vimpstallerrors.h" |
35 #include "vimpstallerrors.h" |
36 #include "tvimpstconsts.h" |
36 #include "tvimpstconsts.h" |
37 #include "vimpstdebugtrace.h" |
37 |
|
38 #include "uiservicetabtracer.h" |
38 |
39 |
39 // Constants |
40 // Constants |
40 _LIT( KListNameAllBuddy ,"buddylist" ); |
41 _LIT( KListNameAllBuddy ,"buddylist" ); |
41 |
42 |
42 |
43 |
48 CVIMPSTEngineContactMgmtExtention* CVIMPSTEngineContactMgmtExtention::NewL( |
49 CVIMPSTEngineContactMgmtExtention* CVIMPSTEngineContactMgmtExtention::NewL( |
49 MXIMPContext& aPresenceCtx, |
50 MXIMPContext& aPresenceCtx, |
50 MPresentityGroups& aPresGroup, |
51 MPresentityGroups& aPresGroup, |
51 CVIMPSTEngineRequestMapper& aRequestMapper) |
52 CVIMPSTEngineRequestMapper& aRequestMapper) |
52 { |
53 { |
53 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::NewL start")); |
54 TRACER_AUTO; |
54 CVIMPSTEngineContactMgmtExtention* self = |
55 CVIMPSTEngineContactMgmtExtention* self = |
55 CVIMPSTEngineContactMgmtExtention::NewLC( aPresenceCtx, |
56 CVIMPSTEngineContactMgmtExtention::NewLC( aPresenceCtx, |
56 aPresGroup, |
57 aPresGroup, |
57 aRequestMapper |
58 aRequestMapper |
58 ); |
59 ); |
59 CleanupStack::Pop( self ); |
60 CleanupStack::Pop( self ); |
60 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::NewL end")); |
|
61 return self; |
61 return self; |
62 } |
62 } |
63 |
63 |
64 // --------------------------------------------------------- |
64 // --------------------------------------------------------- |
65 // CVIMPSTEngineContactMgmtExtention::NewLC |
65 // CVIMPSTEngineContactMgmtExtention::NewLC |
68 CVIMPSTEngineContactMgmtExtention* CVIMPSTEngineContactMgmtExtention::NewLC( |
68 CVIMPSTEngineContactMgmtExtention* CVIMPSTEngineContactMgmtExtention::NewLC( |
69 MXIMPContext& aPresenceCtx, |
69 MXIMPContext& aPresenceCtx, |
70 MPresentityGroups& aPresGroup, |
70 MPresentityGroups& aPresGroup, |
71 CVIMPSTEngineRequestMapper& aRequestMapper) |
71 CVIMPSTEngineRequestMapper& aRequestMapper) |
72 { |
72 { |
73 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::NewLC start")); |
73 TRACER_AUTO; |
74 CVIMPSTEngineContactMgmtExtention* self = new (ELeave) |
74 CVIMPSTEngineContactMgmtExtention* self = new (ELeave) |
75 CVIMPSTEngineContactMgmtExtention(aPresenceCtx, aPresGroup,aRequestMapper); |
75 CVIMPSTEngineContactMgmtExtention(aPresenceCtx, aPresGroup,aRequestMapper); |
76 CleanupStack::PushL( self ); |
76 CleanupStack::PushL( self ); |
77 |
77 |
78 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::NewLC end") ); |
|
79 return self; |
78 return self; |
80 } |
79 } |
81 |
80 |
82 |
81 |
83 // --------------------------------------------------------- |
82 // --------------------------------------------------------- |
99 // --------------------------------------------------------- |
98 // --------------------------------------------------------- |
100 // CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention |
99 // CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention |
101 // --------------------------------------------------------- |
100 // --------------------------------------------------------- |
102 CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention() |
101 CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention() |
103 { |
102 { |
104 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention start")); |
103 TRACER_AUTO; |
105 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::~CVIMPSTEngineContactMgmtExtention end")); |
|
106 } |
104 } |
107 |
105 |
108 |
106 |
109 // ----------------------------------------------------------------------------- |
107 // ----------------------------------------------------------------------------- |
110 // CVIMPSTEngineContactMgmtExtention::IsSupported() |
108 // CVIMPSTEngineContactMgmtExtention::IsSupported() |
130 // CVIMPSTEngineContactMgmtExtention::DeleteServerContactL |
128 // CVIMPSTEngineContactMgmtExtention::DeleteServerContactL |
131 // --------------------------------------------------------- |
129 // --------------------------------------------------------- |
132 TInt CVIMPSTEngineContactMgmtExtention::DeleteServerContactL( const TDesC& aContactListId, |
130 TInt CVIMPSTEngineContactMgmtExtention::DeleteServerContactL( const TDesC& aContactListId, |
133 const TDesC& aUserId ) |
131 const TDesC& aUserId ) |
134 { |
132 { |
135 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::DeleteServerContactL start")); |
133 TRACER_AUTO; |
136 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::DeleteServerContactL aContactListId = %s"),&aContactListId ); |
134 TRACE( "DeleteServerContactL aContactListId = %s",&aContactListId ); |
137 |
|
138 // err is initialized to KErrNone, b'coz if adaptation or presence is not supported then, |
135 // err is initialized to KErrNone, b'coz if adaptation or presence is not supported then, |
139 // the request should not be sent to the server, this is a hack as the voip |
136 // the request should not be sent to the server, this is a hack as the voip |
140 // writes the adaptation uid into settings even if presence is not supported. |
137 // writes the adaptation uid into settings even if presence is not supported. |
141 // bug has to be raised to voip. |
138 // bug has to be raised to voip. |
142 |
139 |
174 |
171 |
175 CleanupStack::PopAndDestroy(); // listId; |
172 CleanupStack::PopAndDestroy(); // listId; |
176 |
173 |
177 err = iReqResult; |
174 err = iReqResult; |
178 } |
175 } |
179 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::DeleteServerContactL end")); |
|
180 return err; |
176 return err; |
181 } |
177 } |
182 |
178 |
183 |
179 |
184 // --------------------------------------------------------- |
180 // --------------------------------------------------------- |
188 const TDesC& aUserId, |
184 const TDesC& aUserId, |
189 const TDesC& aNickname , |
185 const TDesC& aNickname , |
190 TBool aWaitToComplete /*= ETrue*/ ) |
186 TBool aWaitToComplete /*= ETrue*/ ) |
191 { |
187 { |
192 |
188 |
193 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::AddServerContactL start")); |
189 TRACER_AUTO; |
194 |
190 |
195 // err is initialized to KErrNone, b'coz if adaptation or presence is not supported then, |
191 // err is initialized to KErrNone, b'coz if adaptation or presence is not supported then, |
196 // the request should not be sent to the server, this is a hack as the voip |
192 // the request should not be sent to the server, this is a hack as the voip |
197 // writes the adaptation uid into settings even if presence is not supported. |
193 // writes the adaptation uid into settings even if presence is not supported. |
198 // bug has to be raised to voip. |
194 // bug has to be raised to voip. |
239 CleanupStack::PopAndDestroy(); //listIdentity |
235 CleanupStack::PopAndDestroy(); //listIdentity |
240 |
236 |
241 CleanupStack::PopAndDestroy(); //userId |
237 CleanupStack::PopAndDestroy(); //userId |
242 CleanupStack::PopAndDestroy(); // listId |
238 CleanupStack::PopAndDestroy(); // listId |
243 |
239 |
244 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::AddServerContactL end")); |
|
245 err = iReqResult; |
240 err = iReqResult; |
246 } |
241 } |
247 |
242 |
248 return err; |
243 return err; |
249 } |
244 } |
252 // --------------------------------------------------------- |
247 // --------------------------------------------------------- |
253 // CVIMPSTEngineContactMgmtExtention::CreateIdentityLC |
248 // CVIMPSTEngineContactMgmtExtention::CreateIdentityLC |
254 // --------------------------------------------------------- |
249 // --------------------------------------------------------- |
255 MXIMPIdentity* CVIMPSTEngineContactMgmtExtention::CreateIdentityLC(const TDesC& aListId) |
250 MXIMPIdentity* CVIMPSTEngineContactMgmtExtention::CreateIdentityLC(const TDesC& aListId) |
256 { |
251 { |
257 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::CreateIdentityLC start")); |
252 TRACER_AUTO; |
258 |
253 |
259 MXIMPObjectFactory& objFactory = iPresenceCtx.ObjectFactory(); |
254 MXIMPObjectFactory& objFactory = iPresenceCtx.ObjectFactory(); |
260 MXIMPIdentity* newIdentity = objFactory.NewIdentityLC(); |
255 MXIMPIdentity* newIdentity = objFactory.NewIdentityLC(); |
261 //no need to check for null as NewIdentityLC does not return null, |
256 //no need to check for null as NewIdentityLC does not return null, |
262 // if failed ot allocate memory it will leave with KErrNoMemory |
257 // if failed ot allocate memory it will leave with KErrNoMemory |
263 newIdentity->SetIdentityL( aListId) ; |
258 newIdentity->SetIdentityL( aListId) ; |
264 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::CreateIdentityLC end")); |
|
265 return newIdentity; |
259 return newIdentity; |
266 } |
260 } |
267 |
261 |
268 |
262 |
269 // --------------------------------------------------------- |
263 // --------------------------------------------------------- |
272 void CVIMPSTEngineContactMgmtExtention::HandleSessionContextEventL(const MXIMPContext& /*aContext*/, |
266 void CVIMPSTEngineContactMgmtExtention::HandleSessionContextEventL(const MXIMPContext& /*aContext*/, |
273 const MXIMPBase& aEvent, |
267 const MXIMPBase& aEvent, |
274 TXimpOperation aXimpOperation /*= EVIMPSTXimpOperationNoOperation*/ ) |
268 TXimpOperation aXimpOperation /*= EVIMPSTXimpOperationNoOperation*/ ) |
275 { |
269 { |
276 |
270 |
277 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::HandleSessionContextEventL start")); |
271 TRACER_AUTO; |
278 |
272 |
279 switch( aEvent.GetInterfaceId() ) |
273 switch( aEvent.GetInterfaceId() ) |
280 { |
274 { |
281 case MXIMPRequestCompleteEvent::KInterfaceId: |
275 case MXIMPRequestCompleteEvent::KInterfaceId: |
282 { |
276 { |
283 TRACE( T_LIT("InsideCallbackswitch::MXIMPRequestCompleteEvent")); |
277 TRACE( "InsideCallbackswitch::MXIMPRequestCompleteEvent"); |
284 if ( (EVIMPSTXimpOperationAddContact == aXimpOperation) |
278 if ( (EVIMPSTXimpOperationAddContact == aXimpOperation) |
285 || (EVIMPSTXimpOperationDeleteContact == aXimpOperation) ) |
279 || (EVIMPSTXimpOperationDeleteContact == aXimpOperation) ) |
286 { |
280 { |
287 const MXIMPRequestCompleteEvent* event = |
281 const MXIMPRequestCompleteEvent* event = |
288 TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From( |
282 TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From( |
306 default: |
300 default: |
307 { |
301 { |
308 break; |
302 break; |
309 } |
303 } |
310 } |
304 } |
311 TRACE( T_LIT("CVIMPSTEngineContactMgmtExtention::HandleSessionContextEventL end")); |
|
312 } |
305 } |
313 |
306 |
314 //---------------------------------------------------------------------------- |
307 //---------------------------------------------------------------------------- |
315 // CVIMPSTEngineContactMgmtExtention::SetSupported() |
308 // CVIMPSTEngineContactMgmtExtention::SetSupported() |
316 // ----------------------------------------------------------------------------- |
309 // ----------------------------------------------------------------------------- |