112 if (reqStatus.Int()==KErrCancel) |
112 if (reqStatus.Int()==KErrCancel) |
113 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage (async & cancel (Cancelled Request)) passed"), iTestCount++); |
113 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage (async & cancel (Cancelled Request)) passed"), iTestCount++); |
114 else |
114 else |
115 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage (async & cancel (Request Not Cancelled)) passed"), iTestCount++); |
115 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage (async & cancel (Request Not Cancelled)) passed"), iTestCount++); |
116 |
116 |
|
117 sendMsg = DMMTSY_USSD_MESSAGE_PDU; |
|
118 sendAtts.iFlags = DMMTSY_USSD_ATTRIBUTE_FLAGS; |
|
119 sendAtts.iFormat = DMMTSY_USSD_ATTRIBUTE_FORMAT; |
|
120 sendAtts.iType = DMMTSY_USSD_ATTRIBUTE_TYPE; |
|
121 sendAtts.iDcs = DMMTSY_USSD_ATTRIBUTE_DCS; |
|
122 |
|
123 ussdMessaging.SendMessage(reqStatus, sendMsg, sendAttsPckg, RMobileUssdMessaging::ETransferToDefaultHandler); |
|
124 User::WaitForRequest(reqStatus); |
|
125 TEST(reqStatus.Int()==KErrNone); |
|
126 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ passed"), iTestCount++); |
|
127 |
|
128 // asynchronous & cancel |
|
129 ussdMessaging.SendMessage(reqStatus, sendMsg, sendAttsPckg, RMobileUssdMessaging::ETransferToDefaultHandler); |
|
130 ussdMessaging.CancelAsyncRequest(EMobileUssdMessagingSendMessageDefaultHandler); |
|
131 User::WaitForRequest(reqStatus); |
|
132 TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel); |
|
133 if (reqStatus.Int()==KErrCancel) |
|
134 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ (async & cancel (Cancelled Request)) passed"), iTestCount++); |
|
135 else |
|
136 INFO_PRINTF2(_L("Test %d - RMobileUssdMessaging::SendMessage /EMobileUssdMessagingSendMessageDefaultHandler/ (async & cancel (Request Not Cancelled)) passed"), iTestCount++); |
|
137 |
117 // test.Next(_L("OK: RMobileUssdMessaging's Receive & Send Message")); |
138 // test.Next(_L("OK: RMobileUssdMessaging's Receive & Send Message")); |
118 |
139 |
119 // Send Message NoFdnCheck |
140 // Send Message NoFdnCheck |
120 |
141 |
121 // asynchronous |
142 // asynchronous |