hti/HtiFramework/src/HtiDispatcher.cpp
branchRCL_3
changeset 14 a9c038d69df8
parent 12 d27dfa8884ad
child 18 3406c99bc375
equal deleted inserted replaced
13:da2cedce4920 14:a9c038d69df8
   122     iConsole( NULL ),
   122     iConsole( NULL ),
   123     iIdleOverCommAdapter( EFalse ),
   123     iIdleOverCommAdapter( EFalse ),
   124     iHtiInstanceId( 0 ),
   124     iHtiInstanceId( 0 ),
   125     iShowErrorDialogs( aShowErrorDialogs ),
   125     iShowErrorDialogs( aShowErrorDialogs ),
   126     iReconnectDelay(aReconnectDelay),
   126     iReconnectDelay(aReconnectDelay),
   127     iRebootReason(0)
   127     iRebootReason(-1)
   128     {
   128     {
   129     HTI_LOG_FORMAT( "MaxQueueMemorySize %d", iMaxQueueMemorySize );
   129     HTI_LOG_FORMAT( "MaxQueueMemorySize %d", iMaxQueueMemorySize );
   130     iQueueSizeLowThresold = ( iMaxQueueMemorySize / 2 ) / 2;
   130     iQueueSizeLowThresold = ( iMaxQueueMemorySize / 2 ) / 2;
   131     iQueueSizeHighThresold = ( iMaxQueueMemorySize / 2 ) * 4 / 5;
   131     iQueueSizeHighThresold = ( iMaxQueueMemorySize / 2 ) * 4 / 5;
   132     HTI_LOG_FORMAT( "QueueSizeThresholds low : %d", iQueueSizeLowThresold );
   132     HTI_LOG_FORMAT( "QueueSizeThresholds low : %d", iQueueSizeLowThresold );
   867                         {
   867                         {
   868                         iRebootReason = aMessage[1];
   868                         iRebootReason = aMessage[1];
   869                         }
   869                         }
   870                     else if(aMessage.Length() == 1)
   870                     else if(aMessage.Length() == 1)
   871                         {
   871                         {
   872                         iRebootReason = 0;
   872                         iRebootReason = -1;
   873                         }
   873                         }
   874                     else
   874                     else
   875                         {
   875                         {
   876                         User::LeaveIfError(DispatchOutgoingErrorMessage( KErrArgument,
   876                         User::LeaveIfError(DispatchOutgoingErrorMessage( KErrArgument,
   877                                       KErrDescrInvalidParameter,
   877                                       KErrDescrInvalidParameter,
  1037         iConsole->Printf( _L( "Reboot requested.\n" ) );
  1037         iConsole->Printf( _L( "Reboot requested.\n" ) );
  1038         }
  1038         }
  1039     TInt err = KErrNone;
  1039     TInt err = KErrNone;
  1040     RProcess rebootProcess;
  1040     RProcess rebootProcess;
  1041     // First try the UI layer rebooter
  1041     // First try the UI layer rebooter
  1042     if(iRebootReason == 0)
  1042     if(iRebootReason == -1)
  1043         {
  1043         {
  1044         err = rebootProcess.Create( KHtiDeviceRebootExeUI, KNullDesC );
  1044         err = rebootProcess.Create( KHtiDeviceRebootExeUI, KNullDesC );
  1045         }
  1045         }
  1046     else
  1046     else
  1047         {
  1047         {