16 */ |
16 */ |
17 |
17 |
18 #define SYNCML_V3 |
18 #define SYNCML_V3 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 #include <SyncMLObservers.h> |
20 #include <SyncMLObservers.h> |
21 #include <SyncMLNotifierParams.h> |
|
22 #include <SyncMLNotifier.h> |
|
23 #include <nsmlconstants.h> |
21 #include <nsmlconstants.h> |
24 #include <nsmldebug.h> |
22 #include <nsmldebug.h> |
25 #include <nsmlphoneinfo.h> |
23 #include <nsmlphoneinfo.h> |
26 #include <nsmlunicodeconverter.h> |
24 #include <nsmlunicodeconverter.h> |
27 // common includes with DM |
25 // common includes with DM |
1537 { |
1535 { |
1538 iStatusToServer->SetStatusCodeL( statusID, TNSmlError::ESmlStatusIncompleteCommand ); |
1536 iStatusToServer->SetStatusCodeL( statusID, TNSmlError::ESmlStatusIncompleteCommand ); |
1539 iAgent->Interrupt( TNSmlError::ESmlAlertInvalid, EFalse, EFalse ); |
1537 iAgent->Interrupt( TNSmlError::ESmlAlertInvalid, EFalse, EFalse ); |
1540 return; |
1538 return; |
1541 } |
1539 } |
1542 |
1540 |
1543 //Read min and max times |
1541 // SyncmlNotifier Dependency is removed |
1544 // MINDT |
|
1545 TInt mindt = AlertParameter( aAlert->itemList->item->data, KNSmlDSAgentMINDT ); |
|
1546 // MAXDT |
|
1547 TInt maxdt = AlertParameter( aAlert->itemList->item->data, KNSmlDSAgentMAXDT ); |
|
1548 |
|
1549 HBufC* alertData = AlertDataLC( aAlert->itemList ); |
|
1550 |
|
1551 //Fill notifier params |
|
1552 TSyncMLDlgNotifParams params; |
|
1553 params.iNoteType = ESyncMLInfoNote; |
|
1554 params.iServerMsg = TBufC<KSyncMLMaxServerMsgLength>(alertData->Des()); |
|
1555 |
|
1556 CleanupStack::PopAndDestroy(); //alertData |
|
1557 |
|
1558 //Pack data and start notifier |
|
1559 RNotifier notifier; |
|
1560 User::LeaveIfError( notifier.Connect() ); |
|
1561 CleanupClosePushL(notifier); |
|
1562 |
|
1563 TPckgBuf<TBool> resBuf; |
|
1564 |
|
1565 TRequestStatus status; |
|
1566 |
|
1567 TSyncMLDlgNotifParamsPckg data(params); |
|
1568 |
|
1569 notifier.StartNotifierAndGetResponse( status, KSyncMLDlgNotifierUid, data, resBuf ); |
|
1570 User::WaitForRequest(status); |
|
1571 |
|
1572 CleanupStack::PopAndDestroy(); //notifier, |
|
1573 |
|
1574 return; |
1542 return; |
1575 } |
1543 } |
1576 |
1544 |
1577 // Target element |
1545 // Target element |
1578 if ( initAlert ) |
1546 if ( initAlert ) |