1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-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". |
95 /** |
101 /** |
96 @internalComponent */ |
102 @internalComponent */ |
97 { |
103 { |
98 if((aMessage.Type()==EOptional) || (aMessage.Type()==EGraceful)) |
104 if((aMessage.Type()==EOptional) || (aMessage.Type()==EGraceful)) |
99 { |
105 { |
100 LOGTEXT("CTelServer received Shutdown. Scheduling shutdown when there's no sessions."); |
106 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_CFMESSAGESHUTDOWN_1, "CTelServer received Shutdown. Scheduling shutdown when there's no sessions."); |
101 iShutGracefully = ETrue; |
107 iShutGracefully = ETrue; |
102 LOGTEXT2("Session Count is %d", iSessionCount); |
108 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_CFMESSAGESHUTDOWN_2, "Session Count is %d", iSessionCount); |
103 if(iSessionCount==0) |
109 if(iSessionCount==0) |
104 { |
110 { |
105 LOGTEXT("Calling AsynOneShot::Call()"); |
111 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_CFMESSAGESHUTDOWN_3, "Calling AsynOneShot::Call()"); |
106 iSch->Call(); |
112 iSch->Call(); |
107 } |
113 } |
108 } |
114 } |
109 else |
115 else |
110 { |
116 { |
111 LOGTEXT("CTelServer received Shutdown option EUnGraceful. Not supported, ignoring."); |
117 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_CFMESSAGESHUTDOWN_4, "CTelServer received Shutdown option EUnGraceful. Not supported, ignoring."); |
112 } |
118 } |
113 } |
119 } |
114 |
120 |
115 // |
121 // |
116 // CTelSchedulerStop class definitions |
122 // CTelSchedulerStop class definitions |
234 void CTelServer::Dec() |
240 void CTelServer::Dec() |
235 // |
241 // |
236 // Decrement a session stop scheduler if no session |
242 // Decrement a session stop scheduler if no session |
237 // |
243 // |
238 { |
244 { |
239 LOGTEXT("Entered CTelServer::Dec"); |
245 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_DEC_1, "Entered CTelServer::Dec"); |
240 __ASSERT_ALWAYS((iSessionCount>0),Fault(EEtelFaultNegativeSessionCount)); |
246 __ASSERT_ALWAYS((iSessionCount>0),Fault(EEtelFaultNegativeSessionCount)); |
241 iSessionCount--; |
247 iSessionCount--; |
242 LOGTEXT2("Session Count is %d", iSessionCount); |
248 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_DEC_2, "Session Count is %d", iSessionCount); |
243 // If iShutGracefully==ETrue the Rootserver has informed us that it wants us to shutdown |
249 // If iShutGracefully==ETrue the Rootserver has informed us that it wants us to shutdown |
244 // next time there is no sessions. If it is EFalse no such notification has arrived and |
250 // next time there is no sessions. If it is EFalse no such notification has arrived and |
245 // ETel continues running even though there are no sessions. |
251 // ETel continues running even though there are no sessions. |
246 if((iSessionCount==0) && (iShutGracefully)) |
252 if((iSessionCount==0) && (iShutGracefully)) |
247 { |
253 { |
248 LOGTEXT("Calling AsynOneShot::Call()"); |
254 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_DEC_3, "Calling AsynOneShot::Call()"); |
249 iSch->Call(); |
255 iSch->Call(); |
250 } |
256 } |
251 LOGTEXT("Exited from CTelServer::Dec"); |
257 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTELSERVER_DEC_4, "Exited from CTelServer::Dec"); |
252 } |
258 } |
253 |
259 |
254 TBool CTelServer::IsPriorityClient(const CTelSession* aSession) const |
260 TBool CTelServer::IsPriorityClient(const CTelSession* aSession) const |
255 // |
261 // |
256 // Check if aSession is the priority client session |
262 // Check if aSession is the priority client session |
441 // |
447 // |
442 { |
448 { |
443 // RThread::SetProtected is superceded by the security model |
449 // RThread::SetProtected is superceded by the security model |
444 |
450 |
445 __UHEAP_MARK; |
451 __UHEAP_MARK; |
446 LOGTEXT("----------New Log----------\015\012"); |
452 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDERS, ETELSERVERTHREAD_1, "----------New Log----------\015\012"); |
447 LOGTEXT("Entered ETel Server thread"); |
453 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDERS, ETELSERVERTHREAD_2, "Entered ETel Server thread"); |
448 LOGTEXTREL("Entered ETel Server thread"); |
454 OstTraceDef0(OST_TRACE_CATEGORY_PRODUCTION, TRACE_BORDERS, ETELSERVERTHREAD_3, "Entered ETel Server thread"); |
449 |
455 |
450 CTrapCleanup* pT; |
456 CTrapCleanup* pT; |
451 if ((pT=CTrapCleanup::New())==NULL) |
457 if ((pT=CTrapCleanup::New())==NULL) |
452 { |
458 { |
453 Fault(EEtelFaultCreateTrapCleanup); |
459 Fault(EEtelFaultCreateTrapCleanup); |
469 if(err!=KErrNone) |
475 if(err!=KErrNone) |
470 { |
476 { |
471 Fault(EEtelFaultSvrStartServer); |
477 Fault(EEtelFaultSvrStartServer); |
472 } |
478 } |
473 |
479 |
474 LOGTEXT("ETel:\tMeeting rendezvous\n"); |
480 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDERS, ETELSERVERTHREAD_4, "ETel:\tMeeting rendezvous\n"); |
475 RThread::Rendezvous(KErrNone); |
481 RThread::Rendezvous(KErrNone); |
476 CTelScheduler::Start(); |
482 CTelScheduler::Start(); |
477 LOGTEXT("ETel:\tScheduler has been stopped\n"); |
483 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDERS, ETELSERVERTHREAD_5, "ETel:\tScheduler has been stopped\n"); |
478 |
484 |
479 delete pT; |
485 delete pT; |
480 delete pServer; |
486 delete pServer; |
481 delete pScheduler; |
487 delete pScheduler; |
482 |
488 |
483 LOGTEXT("ETel:\tAbout to exit ETel thread function\n"); |
489 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDERS, ETELSERVERTHREAD_6, "ETel:\tAbout to exit ETel thread function\n"); |
484 LOGTEXTREL("ETel:\tAbout to exit ETel thread function\n"); |
490 OstTraceDef0(OST_TRACE_CATEGORY_PRODUCTION, TRACE_BORDERS, ETELSERVERTHREAD_7, "ETel:\tAbout to exit ETel thread function\n"); |
485 __UHEAP_MARKEND; |
491 __UHEAP_MARKEND; |
486 |
492 |
487 return(KErrNone); |
493 return(KErrNone); |
488 } |
494 } |
489 |
495 |
582 20605, //range is 20605-20606 inclusive |
588 20605, //range is 20605-20606 inclusive |
583 20607, //range is 20607-20609 inclusive |
589 20607, //range is 20607-20609 inclusive |
584 20610, //range is 20610-20610 inclusive |
590 20610, //range is 20610-20610 inclusive |
585 20611, //range is 20611-20618 inclusive |
591 20611, //range is 20611-20618 inclusive |
586 20619, //range is 20619-20999 inclusive |
592 20619, //range is 20619-20999 inclusive |
587 21000, //range is 21000-21029 inclusive |
593 21000, //range is 21000-21030 inclusive |
588 21030, //range is 21030-21499 inclusive |
594 21031, //range is 21031-21499 inclusive |
589 21500, //range is 21500-21508 inclusive |
595 21500, //range is 21500-21508 inclusive |
590 21509, //range is 21509-21509 inclusive |
596 21509, //range is 21509-21509 inclusive |
591 21510, //range is 21510-21511 inclusive |
597 21510, //range is 21510-21511 inclusive |
592 21512, //range is 21512-21513 inclusive |
598 21512, //range is 21512-21513 inclusive |
593 21514, //range is 21514-21521 inclusive |
599 21514, //range is 21514-21521 inclusive |
594 21522, //range is 21522-21522 inclusive |
600 21522, //range is 21522-21522 inclusive |
595 21523, //range is 21523-21524 inclusive |
601 21523, //range is 21523-21524 inclusive |
596 21525, //range is 21525-21525 inclusive |
602 21525, //range is 21525-21525 inclusive |
597 21526, //range is 21526 |
603 21526, //range is 21526 |
598 21527, //range is 21527-21528 inclusive |
604 21527, //range is 21527-21528 inclusive |
599 21529, //range is 21529 |
605 21529, //range is 21529-21530 inclusive |
600 21530, //range is 21530-21999 inclusive |
606 21531, //range is 21531-21999 inclusive |
601 22000, //range is 22000-22003 inclusive |
607 22000, //range is 22000-22003 inclusive |
602 22004, //range is 22004 |
608 22004, //range is 22004 |
603 22005, //range is 22005-22008 inclusive |
609 22005, //range is 22005-22008 inclusive |
604 22009, //range is 22009 |
610 22009, //range is 22009 |
605 22010, //range is 22010-22011 inclusive |
611 22010, //range is 22010-22011 inclusive |