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