1 // Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
87 /** |
81 /** |
88 * Factory |
82 * Factory |
89 */ |
83 */ |
90 CWapSapMessageSender* CWapSapMessageSender::NewL(CSmsProtocol* aSmsProtocol, CWapSmsProvider* aWapSap) |
84 CWapSapMessageSender* CWapSapMessageSender::NewL(CSmsProtocol* aSmsProtocol, CWapSmsProvider* aWapSap) |
91 { |
85 { |
92 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_NEWL_1, "CWapSapMessageSender::NewL"); |
86 LOGWAPPROT1("CWapSapMessageSender::NewL"); |
93 |
87 |
94 CWapSapMessageSender* msgSender = new(ELeave) CWapSapMessageSender(aSmsProtocol,aWapSap); |
88 CWapSapMessageSender* msgSender = new(ELeave) CWapSapMessageSender(aSmsProtocol,aWapSap); |
95 CleanupStack::PushL(msgSender); |
89 CleanupStack::PushL(msgSender); |
96 msgSender->iSmsMsgArray = new(ELeave) CArrayPtrFlat<CSmsMessage>(KSmsMsgArraySegmentSize); |
90 msgSender->iSmsMsgArray = new(ELeave) CArrayPtrFlat<CSmsMessage>(KSmsMsgArraySegmentSize); |
97 aSmsProtocol->AddSmsMessageObserverL(*msgSender); |
91 aSmsProtocol->AddSmsMessageObserverL(*msgSender); |
106 * Splits up the CWapDatagram into one or more SMS messages and sends them |
100 * Splits up the CWapDatagram into one or more SMS messages and sends them |
107 * one at a time to SMSPROT.PRT |
101 * one at a time to SMSPROT.PRT |
108 */ |
102 */ |
109 void CWapSapMessageSender::SendDatagramL(CWapDatagram* aMsg) |
103 void CWapSapMessageSender::SendDatagramL(CWapDatagram* aMsg) |
110 { |
104 { |
111 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_SENDDATAGRAML_1, "CWapSapMessageSender::SendDatagramL"); |
105 LOGWAPPROT1("CWapSapMessageSender::SendDatagramL"); |
112 |
106 |
113 __ASSERT_DEBUG(iSmsMsgArray->Count()==0,Panic(EWapSmsSapMessageSenderBusy)); |
107 __ASSERT_DEBUG(iSmsMsgArray->Count()==0,Panic(EWapSmsSapMessageSenderBusy)); |
114 |
108 |
115 CleanupStack::PushL(aMsg); |
109 CleanupStack::PushL(aMsg); |
116 aMsg->EncodeConcatenatedMessagesL(iSmsProtocol->FileSession(), *iSmsMsgArray); |
110 aMsg->EncodeConcatenatedMessagesL(iSmsProtocol->FileSession(), *iSmsMsgArray); |
122 /** |
116 /** |
123 * Send an SMS message to SMSPROT.PRT |
117 * Send an SMS message to SMSPROT.PRT |
124 */ |
118 */ |
125 void CWapSapMessageSender::SendNextSms() |
119 void CWapSapMessageSender::SendNextSms() |
126 { |
120 { |
127 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_SENDNEXTSMS_1, "CWapSapMessageSender::SendNextSms"); |
121 LOGWAPPROT1("CWapSapMessageSender::SendNextSms"); |
128 |
122 |
129 __ASSERT_DEBUG(iSmsMsgArray->Count()>0,Panic(EWapSmsSapMessageSenderNothingToSend)); |
123 __ASSERT_DEBUG(iSmsMsgArray->Count()>0,Panic(EWapSmsSapMessageSenderNothingToSend)); |
130 CSmsMessage* smsMsg = iSmsMsgArray->At(0); |
124 CSmsMessage* smsMsg = iSmsMsgArray->At(0); |
131 TRAPD(ret, SetSmsMessageSettingsL(smsMsg) ); |
125 TRAPD(ret, SetSmsMessageSettingsL(smsMsg) ); |
132 if(ret != KErrNone) |
126 if(ret != KErrNone) |
143 /** |
137 /** |
144 * Setup the SMS message according to the settings stored in the CommDB |
138 * Setup the SMS message according to the settings stored in the CommDB |
145 */ |
139 */ |
146 void CWapSapMessageSender::SetSmsMessageSettingsL(CSmsMessage* aSmsMessage) |
140 void CWapSapMessageSender::SetSmsMessageSettingsL(CSmsMessage* aSmsMessage) |
147 { |
141 { |
148 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_SETSMSMESSAGESETTINGSL_1, "CWapSapMessageSender::SetSmsMessageSettingsL"); |
142 LOGWAPPROT1("CWapSapMessageSender::SetSmsMessageSettingsL"); |
149 |
143 |
150 TBuf<KCommsDbSvrMaxFieldLength> msgCenterNumberValue; |
144 TBuf<KCommsDbSvrMaxFieldLength> msgCenterNumberValue; |
151 TUint32 msgValidityPeriodValue = KWapSmsMessageValidityPeriod; |
145 TUint32 msgValidityPeriodValue = KWapSmsMessageValidityPeriod; |
152 TBool msgDeliveryReportValue = EFalse; |
146 TBool msgDeliveryReportValue = EFalse; |
153 |
147 |
281 * Received notification that a message has been sent. |
275 * Received notification that a message has been sent. |
282 * Continue sending SMSs if we have more or complete the send. |
276 * Continue sending SMSs if we have more or complete the send. |
283 */ |
277 */ |
284 void CWapSapMessageSender::MessageSendCompleted(TInt aStatus) |
278 void CWapSapMessageSender::MessageSendCompleted(TInt aStatus) |
285 { |
279 { |
286 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_MESSAGESENDCOMPLETED_1, "CWapSapMessageSender::MessageSendCompleted [aStatus=%d]", aStatus); |
280 LOGWAPPROT2("CWapSapMessageSender::MessageSendCompleted [aStatus=%d]", aStatus); |
287 |
281 |
288 if (aStatus!=KErrNone) |
282 if (aStatus!=KErrNone) |
289 iSmsMsgArray->ResetAndDestroy(); |
283 iSmsMsgArray->ResetAndDestroy(); |
290 |
284 |
291 if (iSmsMsgArray->Count()==0) |
285 if (iSmsMsgArray->Count()==0) |
300 /** |
294 /** |
301 * Return the address |
295 * Return the address |
302 */ |
296 */ |
303 const TSmsAddr& CWapSapMessageSender::GetLocalAddress() const |
297 const TSmsAddr& CWapSapMessageSender::GetLocalAddress() const |
304 { |
298 { |
305 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_GETLOCALADDRESS_1, "CWapSapMessageSender::GetLocalAddress()"); |
299 LOGWAPPROT1("CWapSapMessageSender::GetLocalAddress()"); |
306 |
300 |
307 return iSmsAddr; |
301 return iSmsAddr; |
308 } // CWapSapMessageSender::GetLocalAddress |
302 } // CWapSapMessageSender::GetLocalAddress |
309 |
303 |
310 |
304 |
311 /** |
305 /** |
312 * Set the address |
306 * Set the address |
313 */ |
307 */ |
314 void CWapSapMessageSender::SetLocalAddress(const TSmsAddr& aSmsAddr) |
308 void CWapSapMessageSender::SetLocalAddress(const TSmsAddr& aSmsAddr) |
315 { |
309 { |
316 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_SETLOCALADDRESS_1, "CWapSapMessageSender::SetLocalAddress()"); |
310 LOGWAPPROT1("CWapSapMessageSender::SetLocalAddress()"); |
317 |
311 |
318 iSmsAddr = aSmsAddr; |
312 iSmsAddr = aSmsAddr; |
319 } // CWapSapMessageSender::SetLocalAddress |
313 } // CWapSapMessageSender::SetLocalAddress |
320 |
314 |
321 |
315 |
326 void CWapSapMessageSender::ModemNotificationCompleted(TInt /*aStatus*/) |
320 void CWapSapMessageSender::ModemNotificationCompleted(TInt /*aStatus*/) |
327 { |
321 { |
328 // Ignore in code coverage - implementation required by base class |
322 // Ignore in code coverage - implementation required by base class |
329 // but not relavent for WAP PROT. |
323 // but not relavent for WAP PROT. |
330 BULLSEYE_OFF |
324 BULLSEYE_OFF |
331 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_MODEMNOTIFICATIONCOMPLETED_1, "CWapSapMessageSender::ModemNotificationCompleted()"); |
325 LOGWAPPROT1("CWapSapMessageSender::ModemNotificationCompleted()"); |
332 BULLSEYE_RESTORE |
326 BULLSEYE_RESTORE |
333 } |
327 } |
334 |
328 |
335 /** |
329 /** |
336 * Notification that the enumeration has completed |
330 * Notification that the enumeration has completed |
339 void CWapSapMessageSender::EnumeratePhoneCompleted(TInt /*aStatus*/) |
333 void CWapSapMessageSender::EnumeratePhoneCompleted(TInt /*aStatus*/) |
340 { |
334 { |
341 // Ignore in code coverage - implementation required by base class |
335 // Ignore in code coverage - implementation required by base class |
342 // but not relavent for WAP PROT. |
336 // but not relavent for WAP PROT. |
343 BULLSEYE_OFF |
337 BULLSEYE_OFF |
344 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_ENUMERATEPHONECOMPLETED_1, "CWapSapMessageSender::EnumeratePhoneCompleted()"); |
338 LOGWAPPROT1("CWapSapMessageSender::EnumeratePhoneCompleted()"); |
345 BULLSEYE_RESTORE |
339 BULLSEYE_RESTORE |
346 } |
340 } |
347 |
341 |
348 /** |
342 /** |
349 * Notification that a message has been received |
343 * Notification that a message has been received |
352 TInt CWapSapMessageSender::MessageReceived(const CSmsMessage& /*aSmsMessage*/,TDes& /*aDes*/) |
346 TInt CWapSapMessageSender::MessageReceived(const CSmsMessage& /*aSmsMessage*/,TDes& /*aDes*/) |
353 { |
347 { |
354 // Ignore in code coverage - implementation required by base class |
348 // Ignore in code coverage - implementation required by base class |
355 // but not relavent for WAP PROT. |
349 // but not relavent for WAP PROT. |
356 BULLSEYE_OFF |
350 BULLSEYE_OFF |
357 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_MESSAGERECEIVED_1, "CWapSapMessageSender::MessageReceived"); |
351 LOGWAPPROT1("CWapSapMessageSender::MessageReceived"); |
358 __ASSERT_DEBUG(EFalse,Panic(EWapSmsReceiveOnMessageSender)); |
352 __ASSERT_DEBUG(EFalse,Panic(EWapSmsReceiveOnMessageSender)); |
359 return KErrNone; |
353 return KErrNone; |
360 BULLSEYE_RESTORE |
354 BULLSEYE_RESTORE |
361 } |
355 } |
362 |
356 |
366 TBool CWapSapMessageSender::ClientConfirmsMessage()const |
360 TBool CWapSapMessageSender::ClientConfirmsMessage()const |
367 { |
361 { |
368 // Ignore in code coverage - implementation required by base class |
362 // Ignore in code coverage - implementation required by base class |
369 // but not relavent for WAP PROT. |
363 // but not relavent for WAP PROT. |
370 BULLSEYE_OFF |
364 BULLSEYE_OFF |
371 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_CLIENTCONFIRMSMESSAGE_1, "CWapSapMessageSender::ClientConfirmsMessage"); |
365 LOGWAPPROT1("CWapSapMessageSender::ClientConfirmsMessage"); |
372 __ASSERT_DEBUG(EFalse,Panic(EWapSmsReceiveOnMessageSender)); |
366 __ASSERT_DEBUG(EFalse,Panic(EWapSmsReceiveOnMessageSender)); |
373 return ETrue; |
367 return ETrue; |
374 BULLSEYE_RESTORE |
368 BULLSEYE_RESTORE |
375 } |
369 } |
376 |
370 |
377 /** |
371 /** |
378 * Informs protocol whether address is used by the observer |
372 * Informs protocol whether address is used by the observer |
379 */ |
373 */ |
380 TInt CWapSapMessageSender::SmsAddrIsDuplicate(const MSmsMessageObserver* /*aObserver*/,const TSmsAddr& /*aAddr*/)const |
374 TInt CWapSapMessageSender::SmsAddrIsDuplicate(const MSmsMessageObserver* /*aObserver*/,const TSmsAddr& /*aAddr*/)const |
381 { |
375 { |
382 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_SMSADDRISDUPLICATE_1, "CWapSapMessageSender::SmsAddrIsDuplicate()"); |
376 LOGWAPPROT1("CWapSapMessageSender::SmsAddrIsDuplicate()"); |
383 |
377 |
384 return EFalse; |
378 return EFalse; |
385 } // CWapSapMessageSender::SmsAddrIsDuplicate |
379 } // CWapSapMessageSender::SmsAddrIsDuplicate |
386 |
380 |
387 |
381 |
392 void CWapSapMessageSender::MessageWriteCompleted(TInt /*aStatus*/, const CSmsMessage* /*aSmsMessage*/) |
386 void CWapSapMessageSender::MessageWriteCompleted(TInt /*aStatus*/, const CSmsMessage* /*aSmsMessage*/) |
393 { |
387 { |
394 // Ignore in code coverage - implementation required by base class |
388 // Ignore in code coverage - implementation required by base class |
395 // but not relavent for WAP PROT. |
389 // but not relavent for WAP PROT. |
396 BULLSEYE_OFF |
390 BULLSEYE_OFF |
397 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_MESSAGEWRITECOMPLETED_1, "CWapSapMessageSender::MessageWriteCompleted()"); |
391 LOGWAPPROT1("CWapSapMessageSender::MessageWriteCompleted()"); |
398 BULLSEYE_RESTORE |
392 BULLSEYE_RESTORE |
399 } |
393 } |
400 |
394 |
401 /** |
395 /** |
402 * Notification that a PDU delete has completed |
396 * Notification that a PDU delete has completed |
405 void CWapSapMessageSender::MessageDeleteCompleted(TInt /*aStatus*/) |
399 void CWapSapMessageSender::MessageDeleteCompleted(TInt /*aStatus*/) |
406 { |
400 { |
407 // Ignore in code coverage - implementation required by base class |
401 // Ignore in code coverage - implementation required by base class |
408 // but not relavent for WAP PROT. |
402 // but not relavent for WAP PROT. |
409 BULLSEYE_OFF |
403 BULLSEYE_OFF |
410 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_MESSAGEDELETECOMPLETED_1, "CWapSapMessageSender::MessageDeleteCompleted()"); |
404 LOGWAPPROT1("CWapSapMessageSender::MessageDeleteCompleted()"); |
411 BULLSEYE_RESTORE |
405 BULLSEYE_RESTORE |
412 } |
406 } |
413 |
407 |
414 /** |
408 /** |
415 * Notification that a read SMS parameters has completed |
409 * Notification that a read SMS parameters has completed |
418 void CWapSapMessageSender::ReadSmsParamsCompleted(TInt /*aStatus*/,CMobilePhoneSmspList* /*aSmspList*/) |
412 void CWapSapMessageSender::ReadSmsParamsCompleted(TInt /*aStatus*/,CMobilePhoneSmspList* /*aSmspList*/) |
419 { |
413 { |
420 // Ignore in code coverage - implementation required by base class |
414 // Ignore in code coverage - implementation required by base class |
421 // but not relavent for WAP PROT. |
415 // but not relavent for WAP PROT. |
422 BULLSEYE_OFF |
416 BULLSEYE_OFF |
423 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_READSMSPARAMSCOMPLETED_1, "CWapSapMessageSender::ReadSmsParamsCompleted()"); |
417 LOGWAPPROT1("CWapSapMessageSender::ReadSmsParamsCompleted()"); |
424 BULLSEYE_RESTORE |
418 BULLSEYE_RESTORE |
425 } |
419 } |
426 |
420 |
427 /** |
421 /** |
428 * Notification that a write SMS parameters has completed |
422 * Notification that a write SMS parameters has completed |
431 void CWapSapMessageSender::WriteSmsParamsCompleted(TInt /*aStatus*/) |
425 void CWapSapMessageSender::WriteSmsParamsCompleted(TInt /*aStatus*/) |
432 { |
426 { |
433 // Ignore in code coverage - implementation required by base class |
427 // Ignore in code coverage - implementation required by base class |
434 // but not relavent for WAP PROT. |
428 // but not relavent for WAP PROT. |
435 BULLSEYE_OFF |
429 BULLSEYE_OFF |
436 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSAPMESSAGESENDER_WRITESMSPARAMSCOMPLETED_1, "CWapSapMessageSender::WriteSmsParamsCompleted()"); |
430 LOGWAPPROT1("CWapSapMessageSender::WriteSmsParamsCompleted()"); |
437 BULLSEYE_RESTORE |
431 BULLSEYE_RESTORE |
438 } |
432 } |
439 |
433 |
440 // |
434 // |
441 // CWapProtocolObserver |
435 // CWapProtocolObserver |
448 /** |
442 /** |
449 * Factory |
443 * Factory |
450 */ |
444 */ |
451 CWapProtocolObserver* CWapProtocolObserver::NewL(CWapSmsProtocol* aProtocol) |
445 CWapProtocolObserver* CWapProtocolObserver::NewL(CWapSmsProtocol* aProtocol) |
452 { |
446 { |
453 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_NEWL_1, "CWapProtocolObserver::NewL()"); |
447 LOGWAPPROT1("CWapProtocolObserver::NewL()"); |
454 |
448 |
455 CWapProtocolObserver* prot = new(ELeave) CWapProtocolObserver; |
449 CWapProtocolObserver* prot = new(ELeave) CWapProtocolObserver; |
456 prot->iWapSmsProtocol=aProtocol; |
450 prot->iWapSmsProtocol=aProtocol; |
457 return prot; |
451 return prot; |
458 } // CWapProtocolObserver::NewL |
452 } // CWapProtocolObserver::NewL |
461 /** |
455 /** |
462 * Return the address |
456 * Return the address |
463 */ |
457 */ |
464 const TSmsAddr& CWapProtocolObserver::GetLocalAddress() const |
458 const TSmsAddr& CWapProtocolObserver::GetLocalAddress() const |
465 { |
459 { |
466 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_GETLOCALADDRESS_1, "CWapProtocolObserver::GetLocalAddress()"); |
460 LOGWAPPROT1("CWapProtocolObserver::GetLocalAddress()"); |
467 |
461 |
468 return iSmsAddr; |
462 return iSmsAddr; |
469 } // CWapProtocolObserver::GetLocalAddress |
463 } // CWapProtocolObserver::GetLocalAddress |
470 |
464 |
471 |
465 |
472 /** |
466 /** |
473 * Set the address |
467 * Set the address |
474 */ |
468 */ |
475 void CWapProtocolObserver::SetLocalAddress(const TSmsAddr& aSmsAddr) |
469 void CWapProtocolObserver::SetLocalAddress(const TSmsAddr& aSmsAddr) |
476 { |
470 { |
477 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_SETLOCALADDRESS_1, "CWapProtocolObserver::SetLocalAddress()"); |
471 LOGWAPPROT1("CWapProtocolObserver::SetLocalAddress()"); |
478 |
472 |
479 iSmsAddr = aSmsAddr; |
473 iSmsAddr = aSmsAddr; |
480 } // CWapProtocolObserver::SetLocalAddress |
474 } // CWapProtocolObserver::SetLocalAddress |
481 |
475 |
482 |
476 |
484 * Notification that the modem has been connected or disconnected |
478 * Notification that the modem has been connected or disconnected |
485 * (Has no relevance for the wap stack) |
479 * (Has no relevance for the wap stack) |
486 */ |
480 */ |
487 void CWapProtocolObserver::ModemNotificationCompleted(TInt /*aStatus*/) |
481 void CWapProtocolObserver::ModemNotificationCompleted(TInt /*aStatus*/) |
488 { |
482 { |
489 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_MODEMNOTIFICATIONCOMPLETED_1, "CWapProtocolObserver::ModemNotificationCompleted()"); |
483 LOGWAPPROT1("CWapProtocolObserver::ModemNotificationCompleted()"); |
490 |
484 |
491 } // CWapProtocolObserver::ModemNotificationCompleted |
485 } // CWapProtocolObserver::ModemNotificationCompleted |
492 |
486 |
493 |
487 |
494 /* |
488 /* |
498 void CWapProtocolObserver::MessageSendCompleted(TInt /*aStatus*/) |
492 void CWapProtocolObserver::MessageSendCompleted(TInt /*aStatus*/) |
499 { |
493 { |
500 // Ignore in code coverage - implementation required by base class |
494 // Ignore in code coverage - implementation required by base class |
501 // but not relavent for WAP PROT. |
495 // but not relavent for WAP PROT. |
502 BULLSEYE_OFF |
496 BULLSEYE_OFF |
503 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_MESSAGESENDCOMPLETED_1, "CWapProtocolObserver::MessageSendCompleted()"); |
497 LOGWAPPROT1("CWapProtocolObserver::MessageSendCompleted()"); |
504 BULLSEYE_RESTORE |
498 BULLSEYE_RESTORE |
505 } |
499 } |
506 |
500 |
507 /** |
501 /** |
508 * Informs protocol whether client confirms received message |
502 * Informs protocol whether client confirms received message |
509 */ |
503 */ |
510 TBool CWapProtocolObserver::ClientConfirmsMessage()const |
504 TBool CWapProtocolObserver::ClientConfirmsMessage()const |
511 { |
505 { |
512 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_CLIENTCONFIRMSMESSAGE_1, "CWapProtocolObserver::ClientConfirmsMessage()"); |
506 LOGWAPPROT1("CWapProtocolObserver::ClientConfirmsMessage()"); |
513 |
507 |
514 return EFalse; |
508 return EFalse; |
515 } // CWapProtocolObserver::ClientConfirmsMessage |
509 } // CWapProtocolObserver::ClientConfirmsMessage |
516 |
510 |
517 |
511 |
518 /** |
512 /** |
519 * Informs protocol whether client confirms received message |
513 * Informs protocol whether client confirms received message |
520 */ |
514 */ |
521 TInt CWapProtocolObserver::SmsAddrIsDuplicate(const MSmsMessageObserver* aObserver,const TSmsAddr& aAddr)const |
515 TInt CWapProtocolObserver::SmsAddrIsDuplicate(const MSmsMessageObserver* aObserver,const TSmsAddr& aAddr)const |
522 { |
516 { |
523 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_SMSADDRISDUPLICATE_1, "CWapProtocolObserver::SmsAddrIsDuplicate()"); |
517 LOGWAPPROT1("CWapProtocolObserver::SmsAddrIsDuplicate()"); |
524 |
518 |
525 if(this == aObserver)return EFalse; |
519 if(this == aObserver)return EFalse; |
526 if(aAddr.SmsAddrFamily() == ESmsAddrApplication8BitPort || ( aAddr.SmsAddrFamily() == ESmsAddrApplication16BitPort && aAddr.Port() > 255)) |
520 if(aAddr.SmsAddrFamily() == ESmsAddrApplication8BitPort || ( aAddr.SmsAddrFamily() == ESmsAddrApplication16BitPort && aAddr.Port() > 255)) |
527 { |
521 { |
528 TWapAddr wapAddr; |
522 TWapAddr wapAddr; |
537 /** |
531 /** |
538 * Notification that a message has been received |
532 * Notification that a message has been received |
539 */ |
533 */ |
540 TInt CWapProtocolObserver::MessageReceived(const CSmsMessage& aSmsMessage,TDes& /*aDes*/) |
534 TInt CWapProtocolObserver::MessageReceived(const CSmsMessage& aSmsMessage,TDes& /*aDes*/) |
541 { |
535 { |
542 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_MESSAGERECEIVED_1, "CWapProtocolObserver::MessageReceived"); |
536 LOGWAPPROT1("CWapProtocolObserver::MessageReceived"); |
543 |
537 |
544 TRAPD(ret, iWapSmsProtocol->ProcessSmsL(aSmsMessage) ); |
538 TRAPD(ret, iWapSmsProtocol->ProcessSmsL(aSmsMessage) ); |
545 return ret; |
539 return ret; |
546 } // CWapProtocolObserver::MessageReceived |
540 } // CWapProtocolObserver::MessageReceived |
547 |
541 |
553 void CWapProtocolObserver::EnumeratePhoneCompleted(TInt /*aStatus*/) |
547 void CWapProtocolObserver::EnumeratePhoneCompleted(TInt /*aStatus*/) |
554 { |
548 { |
555 // Ignore in code coverage - implementation required by base class |
549 // Ignore in code coverage - implementation required by base class |
556 // but not relavent for WAP PROT. |
550 // but not relavent for WAP PROT. |
557 BULLSEYE_OFF |
551 BULLSEYE_OFF |
558 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_ENUMERATEPHONECOMPLETED_1, "CWapProtocolObserver::EnumeratePhoneCompleted()"); |
552 LOGWAPPROT1("CWapProtocolObserver::EnumeratePhoneCompleted()"); |
559 BULLSEYE_RESTORE |
553 BULLSEYE_RESTORE |
560 } |
554 } |
561 |
555 |
562 /** |
556 /** |
563 * Notification that a message has been written to the phone or SIM |
557 * Notification that a message has been written to the phone or SIM |
566 void CWapProtocolObserver::MessageWriteCompleted(TInt /*aStatus*/, const CSmsMessage* /*aSmsMessage*/) |
560 void CWapProtocolObserver::MessageWriteCompleted(TInt /*aStatus*/, const CSmsMessage* /*aSmsMessage*/) |
567 { |
561 { |
568 // Ignore in code coverage - implementation required by base class |
562 // Ignore in code coverage - implementation required by base class |
569 // but not relavent for WAP PROT. |
563 // but not relavent for WAP PROT. |
570 BULLSEYE_OFF |
564 BULLSEYE_OFF |
571 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_MESSAGEWRITECOMPLETED_1, "CWapProtocolObserver::MessageWriteCompleted()"); |
565 LOGWAPPROT1("CWapProtocolObserver::MessageWriteCompleted()"); |
572 BULLSEYE_RESTORE |
566 BULLSEYE_RESTORE |
573 } |
567 } |
574 |
568 |
575 /** |
569 /** |
576 * Notification that a PDU delete has completed |
570 * Notification that a PDU delete has completed |
579 void CWapProtocolObserver::MessageDeleteCompleted(TInt /*aStatus*/) |
573 void CWapProtocolObserver::MessageDeleteCompleted(TInt /*aStatus*/) |
580 { |
574 { |
581 // Ignore in code coverage - implementation required by base class |
575 // Ignore in code coverage - implementation required by base class |
582 // but not relavent for WAP PROT. |
576 // but not relavent for WAP PROT. |
583 BULLSEYE_OFF |
577 BULLSEYE_OFF |
584 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_MESSAGEDELETECOMPLETED_1, "CWapProtocolObserver::MessageDeleteCompleted()"); |
578 LOGWAPPROT1("CWapProtocolObserver::MessageDeleteCompleted()"); |
585 BULLSEYE_RESTORE |
579 BULLSEYE_RESTORE |
586 } |
580 } |
587 |
581 |
588 /** |
582 /** |
589 * Notification that a read SMS parameters has completed |
583 * Notification that a read SMS parameters has completed |
592 void CWapProtocolObserver::ReadSmsParamsCompleted(TInt /*aStatus*/,CMobilePhoneSmspList* /*aSmspList*/) |
586 void CWapProtocolObserver::ReadSmsParamsCompleted(TInt /*aStatus*/,CMobilePhoneSmspList* /*aSmspList*/) |
593 { |
587 { |
594 // Ignore in code coverage - implementation required by base class |
588 // Ignore in code coverage - implementation required by base class |
595 // but not relavent for WAP PROT. |
589 // but not relavent for WAP PROT. |
596 BULLSEYE_OFF |
590 BULLSEYE_OFF |
597 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPPROTOCOLOBSERVER_READSMSPARAMSCOMPLETED_1, "CWapProtocolObserver::ReadSmsParamsCompleted()"); |
591 LOGWAPPROT1("CWapProtocolObserver::ReadSmsParamsCompleted()"); |
598 BULLSEYE_RESTORE |
592 BULLSEYE_RESTORE |
599 } |
593 } |
600 |
594 |
601 void CWapProtocolObserver::WriteSmsParamsCompleted(TInt /*aStatus*/) |
595 void CWapProtocolObserver::WriteSmsParamsCompleted(TInt /*aStatus*/) |
602 /** |
596 /** |