1393 chunkStream.WriteL ( listitems->Des() ); |
1393 chunkStream.WriteL ( listitems->Des() ); |
1394 CleanupStack::PopAndDestroy(1);//chunkstream |
1394 CleanupStack::PopAndDestroy(1);//chunkstream |
1395 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1395 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1396 TSyncMLDlgNotifReturnParams emptybuf; |
1396 TSyncMLDlgNotifReturnParams emptybuf; |
1397 TSyncMLDlgNotifReturnParamsPckg resultBuf( emptybuf ); |
1397 TSyncMLDlgNotifReturnParamsPckg resultBuf( emptybuf ); |
1398 RNotifier notifier; |
1398 /* RNotifier notifier; |
1399 User::LeaveIfError( notifier.Connect() ); |
1399 User::LeaveIfError( notifier.Connect() ); |
1400 CleanupClosePushL(notifier); //cs 7 |
1400 CleanupClosePushL(notifier); //cs 7 |
1401 _DBG_FILE("starting choice notifier"); |
1401 _DBG_FILE("starting choice notifier"); |
1402 notifier.StartNotifierAndGetResponse( status, KNSmlSyncDialogUid, pkgBuf, resultBuf ); |
1402 notifier.StartNotifierAndGetResponse( status, KNSmlSyncDialogUid, pkgBuf, resultBuf ); |
1403 _DBG_FILE("notifier returned"); |
1403 _DBG_FILE("notifier returned"); |
1404 User::WaitForRequest( status ); |
1404 User::WaitForRequest( status ); |
1405 CleanupStack::PopAndDestroy(4);//notifier,lengthbuf,listitems,choiceitemslength |
1405 CleanupStack::PopAndDestroy(4);//notifier,lengthbuf,listitems,choiceitemslength |
|
1406 */ |
|
1407 CleanupStack::PopAndDestroy(3);//lengthbuf,listitems,choiceitemslength |
1406 iChunk.Close(); |
1408 iChunk.Close(); |
1407 TBuf8<KSyncMLMaxAlertResultLength> rettext; |
1409 TBuf8<KSyncMLMaxAlertResultLength> rettext; |
1408 rettext.Copy( resultBuf().irettext.Left( KSyncMLMaxAlertResultLength ) ); |
1410 rettext.Copy( resultBuf().irettext.Left( KSyncMLMaxAlertResultLength ) ); |
1409 if ( status != KErrNone ) |
1411 if ( status != KErrNone ) |
1410 { |
1412 { |
1529 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf(notifyParams); |
1531 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf(notifyParams); |
1530 |
1532 |
1531 |
1533 |
1532 if(!IsHbSyncmlNotifierEnabledL()) |
1534 if(!IsHbSyncmlNotifierEnabledL()) |
1533 { |
1535 { |
1534 RNotifier notifier; |
1536 _DBG_FILE("starting notifier"); |
|
1537 /* RNotifier notifier; |
1535 User::LeaveIfError(notifier.Connect()); |
1538 User::LeaveIfError(notifier.Connect()); |
1536 CleanupClosePushL(notifier); |
1539 CleanupClosePushL(notifier); |
1537 |
1540 |
1538 |
1541 |
1539 notifier.StartNotifierAndGetResponse(status, KNSmlSyncDialogUid, pkgBuf, |
1542 notifier.StartNotifierAndGetResponse(status, KNSmlSyncDialogUid, pkgBuf, |
1635 } |
1639 } |
1636 iStatusToServer->SetStatusCodeL( aStatusId, TNSmlError::ESmlStatusCommandFailed ); |
1640 iStatusToServer->SetStatusCodeL( aStatusId, TNSmlError::ESmlStatusCommandFailed ); |
1637 return; |
1641 return; |
1638 } |
1642 } |
1639 CleanupStack::PushL(dataBuf16); //cs |
1643 CleanupStack::PushL(dataBuf16); //cs |
1640 RNotifier notifier; |
1644 /* RNotifier notifier; |
1641 User::LeaveIfError( notifier.Connect() ); |
1645 User::LeaveIfError( notifier.Connect() ); |
1642 CleanupClosePushL(notifier); //cs |
1646 CleanupClosePushL(notifier); //cs |
|
1647 */ |
1643 TPckgBuf<TBool> resBuf; |
1648 TPckgBuf<TBool> resBuf; |
1644 if( dataBuf16->Length() > KSyncMLMaxServerMsgLength ) |
1649 if( dataBuf16->Length() > KSyncMLMaxServerMsgLength ) |
1645 { |
1650 { |
1646 notifyParams.iServerMsg = (*dataBuf16).Left(KSyncMLMaxServerMsgLength) ; |
1651 notifyParams.iServerMsg = (*dataBuf16).Left(KSyncMLMaxServerMsgLength) ; |
1647 } |
1652 } |
1657 //Note type to Text input note |
1662 //Note type to Text input note |
1658 notifyParams.iNoteType = ESyncMLInputQuery; |
1663 notifyParams.iNoteType = ESyncMLInputQuery; |
1659 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1664 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1660 TSyncMLDlgNotifReturnParams emptybuf; |
1665 TSyncMLDlgNotifReturnParams emptybuf; |
1661 TSyncMLDlgNotifReturnParamsPckg resultBuf( emptybuf ); |
1666 TSyncMLDlgNotifReturnParamsPckg resultBuf( emptybuf ); |
1662 notifier.StartNotifierAndGetResponse( status, KNSmlSyncDialogUid, pkgBuf, resultBuf ); |
1667 /* notifier.StartNotifierAndGetResponse( status, KNSmlSyncDialogUid, pkgBuf, resultBuf ); |
1663 User::WaitForRequest( status ); |
1668 User::WaitForRequest( status ); |
|
1669 */ |
1664 TBuf8<KSyncMLMaxDefaultResponseMsgLength> rettext; |
1670 TBuf8<KSyncMLMaxDefaultResponseMsgLength> rettext; |
1665 rettext.Copy( resultBuf().irettext.Left( KSyncMLMaxDefaultResponseMsgLength ) ); |
1671 rettext.Copy( resultBuf().irettext.Left( KSyncMLMaxDefaultResponseMsgLength ) ); |
1666 if ( status == KErrCancel || status == KErrTimedOut || status == KErrAbort ) |
1672 /* if ( status == KErrCancel || status == KErrTimedOut || status == KErrAbort ) |
1667 { |
1673 { |
1668 TInt error = TNSmlError::ESmlStatusOperationCancelled ; |
1674 TInt error = TNSmlError::ESmlStatusOperationCancelled ; |
1669 iStatusToServer->SetStatusCodeL( aStatusId, error ); |
1675 iStatusToServer->SetStatusCodeL( aStatusId, error ); |
1670 HandleAlertErrorL(); |
1676 HandleAlertErrorL(); |
1671 } |
1677 } |
|
1678 */ |
1672 //For sending data to server |
1679 //For sending data to server |
1673 SmlPcdata_t* data = NULL; |
1680 SmlPcdata_t* data = NULL; |
1674 PcdataNewL( data, rettext); |
1681 PcdataNewL( data, rettext); |
1675 CleanupStack::PushL( data ); |
1682 CleanupStack::PushL( data ); |
1676 iStatusToServer->AddItemDataL( aStatusId, data ); |
1683 iStatusToServer->AddItemDataL( aStatusId, data ); |
1677 CleanupStack::PopAndDestroy(); //data |
1684 CleanupStack::PopAndDestroy(); //data |
1678 if( DRPresent ) |
1685 if( DRPresent ) |
1679 CleanupStack::PopAndDestroy(6); //notifier,alertData,alertDataWithMDT,dataBuf16,hptr,DrBuf16 |
1686 CleanupStack::PopAndDestroy(5); //alertData,alertDataWithMDT,dataBuf16,hptr,DrBuf16 |
|
1687 // CleanupStack::PopAndDestroy(6); //notifier,alertData,alertDataWithMDT,dataBuf16,hptr,DrBuf16 |
1680 else |
1688 else |
1681 //#endif |
1689 //#endif |
1682 CleanupStack::PopAndDestroy(4); //notifier,alertData,alertDataWithMDT,dataBuf16 |
1690 // CleanupStack::PopAndDestroy(4); //notifier,alertData,alertDataWithMDT,dataBuf16 |
|
1691 CleanupStack::PopAndDestroy(3); //alertData,alertDataWithMDT,dataBuf16 |
1683 } |
1692 } |
1684 |
1693 |
1685 // --------------------------------------------------------- |
1694 // --------------------------------------------------------- |
1686 // CNSmlDMCmds::HandleDisplayAlertL |
1695 // CNSmlDMCmds::HandleDisplayAlertL |
1687 // Handles Display Alert command from a server. |
1696 // Handles Display Alert command from a server. |
1733 TRequestStatus status; |
1742 TRequestStatus status; |
1734 notifyParams.iNoteType = ESyncMLInfoNote; |
1743 notifyParams.iNoteType = ESyncMLInfoNote; |
1735 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1744 TPckgBuf<TSyncMLDlgNotifParams> pkgBuf( notifyParams ); |
1736 if(!IsHbSyncmlNotifierEnabledL()) |
1745 if(!IsHbSyncmlNotifierEnabledL()) |
1737 { |
1746 { |
1738 RNotifier notifier; |
1747 /* RNotifier notifier; |
1739 User::LeaveIfError(notifier.Connect()); |
1748 User::LeaveIfError(notifier.Connect()); |
1740 CleanupClosePushL(notifier); |
1749 CleanupClosePushL(notifier); |
1741 notifier.StartNotifierAndGetResponse(status, KNSmlSyncDialogUid, pkgBuf, |
1750 notifier.StartNotifierAndGetResponse(status, KNSmlSyncDialogUid, pkgBuf, |
1742 resBuf); |
1751 resBuf); |
1743 User::WaitForRequest(status); |
1752 User::WaitForRequest(status); |
1744 CleanupStack::PopAndDestroy(); //notifier |
1753 CleanupStack::PopAndDestroy(); //notifier |
|
1754 */ |
1745 } |
1755 } |
1746 else |
1756 else |
1747 { |
1757 { |
1748 LOGSTRING("HandleDisplayAlertL Start test 1 start"); |
1758 LOGSTRING("HandleDisplayAlertL Start test 1 start"); |
1749 ServerHbNotifierL(notifyParams.iNoteType, notifyParams.iServerMsg); |
1759 ServerHbNotifierL(notifyParams.iNoteType, notifyParams.iServerMsg); |