295 TInt CMmONStoreTsy::ExtFunc( |
295 TInt CMmONStoreTsy::ExtFunc( |
296 const TTsyReqHandle aTsyReqHandle, |
296 const TTsyReqHandle aTsyReqHandle, |
297 const TInt aIpc, |
297 const TInt aIpc, |
298 const TDataPackage& aPackage ) |
298 const TDataPackage& aPackage ) |
299 { |
299 { |
300 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_EXTFUNC_1, "TSY: CMmONStoreTsy::ExtFunc - IPC:%d Handle:%d", aIpc, aTsyReqHandle); |
300 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_EXTFUNC_1, "TSY: CMmONStoreTsy::ExtFunc. IPC:%{TIPCNamesList} Handle:%u Object:0x%08x", (TUint)aIpc, (TUint)aTsyReqHandle, (TUint)this); |
301 |
301 |
302 TInt ret = KErrNone; |
302 TInt ret = KErrNone; |
303 TInt trapError = KErrNone; |
303 TInt trapError = KErrNone; |
304 |
304 |
305 // Reset last tsy request type |
305 // Reset last tsy request type |
306 iReqHandleType = EMultimodeONStoreReqHandleUnknown; |
306 iReqHandleType = EMultimodeONStoreReqHandleUnknown; |
338 TInt CMmONStoreTsy::DoExtFuncL( |
338 TInt CMmONStoreTsy::DoExtFuncL( |
339 const TTsyReqHandle aTsyReqHandle, |
339 const TTsyReqHandle aTsyReqHandle, |
340 const TInt aIpc, |
340 const TInt aIpc, |
341 const TDataPackage& aPackage ) |
341 const TDataPackage& aPackage ) |
342 { |
342 { |
343 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_DOEXTFUNCL_1, "TSY: CMmONStoreTsy::DoExtFuncL - IPC:%d Handle:%d", aIpc, aTsyReqHandle); |
343 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_DOEXTFUNCL_1, "TSY: CMmONStoreTsy::DoExtFuncL. IPC:%{TIPCNamesList} Handle:%d Object:0x%08x", (TInt)aIpc, (TUint)aTsyReqHandle, (TUint)this); |
344 |
344 TInt ret ( KErrNone ); |
|
345 |
345 TAny* dataPtr=aPackage.Ptr1(); |
346 TAny* dataPtr=aPackage.Ptr1(); |
346 TAny* dataPtr2=aPackage.Ptr2(); |
347 TAny* dataPtr2=aPackage.Ptr2(); |
347 |
348 |
348 // Create unique transaction id |
349 // Create unique transaction id |
349 |
350 |
350 switch (aIpc) |
351 switch (aIpc) |
351 { |
352 { |
352 case EMobilePhoneStoreRead: |
353 case EMobilePhoneStoreRead: |
353 return ReadL( aPackage.Des1n() ); |
354 ret = ReadL( aPackage.Des1n() ); |
|
355 break; |
354 |
356 |
355 case EMobilePhoneStoreWrite: |
357 case EMobilePhoneStoreWrite: |
356 return WriteL( aTsyReqHandle, aPackage.Des1n() ); |
358 ret = WriteL( aTsyReqHandle, aPackage.Des1n() ); |
|
359 break; |
357 |
360 |
358 case EMobilePhoneStoreDelete: |
361 case EMobilePhoneStoreDelete: |
359 return DeleteL( aTsyReqHandle, |
362 ret = DeleteL( aTsyReqHandle, |
360 REINTERPRET_CAST( TInt*, dataPtr ) ); |
363 REINTERPRET_CAST( TInt*, dataPtr ) ); |
|
364 break; |
361 |
365 |
362 case EMobilePhoneStoreDeleteAll: |
366 case EMobilePhoneStoreDeleteAll: |
363 return DeleteAllL( aTsyReqHandle ); |
367 ret = DeleteAllL( aTsyReqHandle ); |
|
368 break; |
364 |
369 |
365 case EMobilePhoneStoreGetInfo: |
370 case EMobilePhoneStoreGetInfo: |
366 return GetInfoL( aTsyReqHandle, |
371 ret = GetInfoL( aTsyReqHandle, |
367 REINTERPRET_CAST( RMobileONStore::TMobileONStoreInfoV1*, |
372 REINTERPRET_CAST( RMobileONStore::TMobileONStoreInfoV1*, |
368 dataPtr ) ); |
373 dataPtr ) ); |
|
374 break; |
369 |
375 |
370 case EMobilePhoneStoreReadAllPhase1: |
376 case EMobilePhoneStoreReadAllPhase1: |
371 return ReadAllPhase1L( aTsyReqHandle, |
377 ret = ReadAllPhase1L( aTsyReqHandle, |
372 REINTERPRET_CAST( RMobilePhone::TClientId*, dataPtr ), |
378 REINTERPRET_CAST( RMobilePhone::TClientId*, dataPtr ), |
373 REINTERPRET_CAST( TInt*, dataPtr2 ) ); |
379 REINTERPRET_CAST( TInt*, dataPtr2 ) ); |
|
380 break; |
374 |
381 |
375 case EMobilePhoneStoreReadAllPhase2: |
382 case EMobilePhoneStoreReadAllPhase2: |
376 return ReadAllPhase2( aTsyReqHandle, |
383 ret = ReadAllPhase2( aTsyReqHandle, |
377 REINTERPRET_CAST( RMobilePhone::TClientId*, dataPtr ), |
384 REINTERPRET_CAST( RMobilePhone::TClientId*, dataPtr ), |
378 aPackage.Des2n() ); |
385 aPackage.Des2n() ); |
|
386 break; |
379 |
387 |
380 case EMobilePhoneStoreNotifyStoreEvent: |
388 case EMobilePhoneStoreNotifyStoreEvent: |
381 return NotifyStoreEvent( |
389 ret = NotifyStoreEvent( |
382 REINTERPRET_CAST( RMobilePhoneStore::TMobileStoreEvent*, |
390 REINTERPRET_CAST( RMobilePhoneStore::TMobileStoreEvent*, |
383 dataPtr ), REINTERPRET_CAST( TInt*, dataPtr2 ) ); |
391 dataPtr ), REINTERPRET_CAST( TInt*, dataPtr2 ) ); |
|
392 break; |
384 |
393 |
385 case EMobileONStoreStoreAll: |
394 case EMobileONStoreStoreAll: |
386 return StoreAllL( aTsyReqHandle,aPackage.Des1n() ); |
395 ret = StoreAllL( aTsyReqHandle,aPackage.Des1n() ); |
|
396 break; |
387 |
397 |
388 default: |
398 default: |
389 return KErrNotSupported; |
399 ret = KErrNotSupported; |
390 } |
400 } |
|
401 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_DOEXTFUNCL_2, "TSY: CMmONStoreTsy::DoExtFuncL, error=%{TSymbianErrorCodes}", ret); |
|
402 return ret; |
391 } |
403 } |
392 |
404 |
393 // --------------------------------------------------------------------------- |
405 // --------------------------------------------------------------------------- |
394 // CMmONStoreTsy::CancelService |
406 // CMmONStoreTsy::CancelService |
395 // To cancel any extension requests |
407 // To cancel any extension requests |
1629 iStoreAllONListSize = aONList->Enumerate(); |
1641 iStoreAllONListSize = aONList->Enumerate(); |
1630 |
1642 |
1631 // StoreAll overwrites ON phone store. So, first delete all store. |
1643 // StoreAll overwrites ON phone store. So, first delete all store. |
1632 ret = iMmONStoreExtInterface->DeleteAllL( |
1644 ret = iMmONStoreExtInterface->DeleteAllL( |
1633 EMmTsyONStoreDeleteAllIPC ); |
1645 EMmTsyONStoreDeleteAllIPC ); |
1634 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_STOREALLL_2, "CMmONStoreTsy::StoreAllL - DeleteAllL() ret: %d", ret); |
1646 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_STOREALLL_2, "CMmONStoreTsy::StoreAllL - DeleteAllL() ret: %{TSymbianErrorCodes}", ret); |
1635 |
1647 |
1636 // Message construction failed or phonet sender returned error |
1648 // Message construction failed or phonet sender returned error |
1637 if ( KErrNone != ret ) |
1649 if ( KErrNone != ret ) |
1638 { |
1650 { |
1639 ReqCompleted( aTsyReqHandle, ret ); |
1651 ReqCompleted( aTsyReqHandle, ret ); |
1815 // --------------------------------------------------------------------------- |
1827 // --------------------------------------------------------------------------- |
1816 // |
1828 // |
1817 void CMmONStoreTsy::CompleteStoreAll( |
1829 void CMmONStoreTsy::CompleteStoreAll( |
1818 TInt aResult ) |
1830 TInt aResult ) |
1819 { |
1831 { |
1820 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_COMPLETESTOREALL_1, "CMmONStoreTsy::CompleteStoreAll %d",aResult); |
1832 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_COMPLETESTOREALL_1, "CMmONStoreTsy::CompleteStoreAll %{TSymbianErrorCodes}",aResult); |
1821 // Reset req handle. Returns the deleted req handle |
1833 // Reset req handle. Returns the deleted req handle |
1822 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1834 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1823 EMultimodeONStoreStoreAll ); |
1835 EMultimodeONStoreStoreAll ); |
1824 |
1836 |
1825 if ( EMultimodeONStoreReqHandleUnknown != reqHandle ) |
1837 if ( EMultimodeONStoreReqHandleUnknown != reqHandle ) |
1910 // |
1922 // |
1911 void CMmONStoreTsy::ReqCompleted( |
1923 void CMmONStoreTsy::ReqCompleted( |
1912 const TTsyReqHandle aTsyReqHandle, |
1924 const TTsyReqHandle aTsyReqHandle, |
1913 const TInt aError ) |
1925 const TInt aError ) |
1914 { |
1926 { |
1915 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_REQCOMPLETED_1, "TSY: CMmONStoreTsy::ReqCompleted Completed - Handle:%d Error:%d", aTsyReqHandle, aError); |
1927 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_REQCOMPLETED_1, "TSY: CMmONStoreTsy::ReqCompleted. Handle:%d Error:%{TSymbianErrorCodes} Object:0x%08x", aTsyReqHandle, aError, this); |
1916 |
1928 |
1917 CTelObject::ReqCompleted( aTsyReqHandle, aError ); |
1929 CTelObject::ReqCompleted( aTsyReqHandle, aError ); |
|
1930 |
|
1931 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_REQCOMPLETED_2, "<-- TSY: CMmONStoreTsy::ReqCompleted"); |
1918 } |
1932 } |
1919 |
1933 |
1920 #endif // TF_LOGGING_ENABLED |
1934 #endif // TF_LOGGING_ENABLED |
1921 |
1935 |
1922 #ifdef REQHANDLE_TIMER |
1936 #ifdef REQHANDLE_TIMER |
1997 // |
2011 // |
1998 void CMmONStoreTsy::Complete( |
2012 void CMmONStoreTsy::Complete( |
1999 TInt aReqHandleType, |
2013 TInt aReqHandleType, |
2000 TInt aError ) |
2014 TInt aError ) |
2001 { |
2015 { |
2002 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_COMPLETE_1, "TSY: CMmONStoreTsy::Complete - ReqHandleType: %d Error: %d", aReqHandleType, aError ); |
2016 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMONSTORETSY_COMPLETE_1, "TSY: CMmONStoreTsy::Complete - ReqHandleType: %d Error: %{TSymbianErrorCodes}", aReqHandleType, aError ); |
2003 //All possible TSY req handle types are listed in the |
2017 //All possible TSY req handle types are listed in the |
2004 //switch case below. |
2018 //switch case below. |
2005 switch( aReqHandleType ) |
2019 switch( aReqHandleType ) |
2006 { |
2020 { |
2007 case EMultimodeONStoreRead: |
2021 case EMultimodeONStoreRead: |