htiui/HtiServicePlugins/HtiKeyEventServicePlugin/src/PointerEventHandler.cpp
changeset 0 d6fe6244b863
child 3 2703485a934c
equal deleted inserted replaced
-1:000000000000 0:d6fe6244b863
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Functional implementation of pointer event service
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "HtiKeyEventServiceplugin.h"
       
    21 #include "PointerEventHandler.h"
       
    22 
       
    23 #include <HtiDispatcherInterface.h>
       
    24 #include <HTILogging.h>
       
    25 
       
    26 
       
    27 // CONSTANTS
       
    28 _LIT8( KErrorMissingCommand, "Command was not given - message was empty" );
       
    29 _LIT8( KErrorServiceNotReady, "Service is busy - possibly executing long running pointer events" );
       
    30 _LIT8( KErrorInvalidParameters, "Command parameters not valid" );
       
    31 _LIT8( KErrorUnrecognizedCommand, "Unrecognized command" );
       
    32 _LIT8( KErrorInternalFailure, "Internal pointer command failure" );
       
    33 
       
    34 const TInt KTapCmdLength = 10;
       
    35 const TInt KDragMultiCmdMinLength = 14;
       
    36 const TInt KSinglePointerCmdLength = 4;
       
    37 
       
    38 // ----------------------------------------------------------------------------
       
    39 // CPointerEventHandler::NewL()
       
    40 // ----------------------------------------------------------------------------
       
    41 CPointerEventHandler* CPointerEventHandler::NewL()
       
    42     {
       
    43     HTI_LOG_FUNC_IN( "CPointerEventHandler::NewL" );
       
    44     CPointerEventHandler* self = new (ELeave) CPointerEventHandler();
       
    45     CleanupStack::PushL ( self );
       
    46     self->ConstructL();
       
    47     CleanupStack::Pop();
       
    48     HTI_LOG_FUNC_OUT( "CPointerEventHandler::Done" );
       
    49     return self;
       
    50     }
       
    51 
       
    52 // ----------------------------------------------------------------------------
       
    53 // CPointerEventHandler::CPointerEventHandler()
       
    54 // ----------------------------------------------------------------------------
       
    55 CPointerEventHandler::CPointerEventHandler()
       
    56     : CActive( CActive::EPriorityStandard ), iReady( ETrue ), iCommand( 0 ),
       
    57       iState( EPointerUp )
       
    58     {
       
    59     }
       
    60 
       
    61 // ----------------------------------------------------------------------------
       
    62 // CPointerEventHandler::~CPointerEventHandler()
       
    63 // ----------------------------------------------------------------------------
       
    64 CPointerEventHandler::~CPointerEventHandler()
       
    65     {
       
    66     HTI_LOG_TEXT( "CPointerEventHandler destroy" );
       
    67     Cancel();
       
    68     iTimer.Close();
       
    69     iWsSession.Close();
       
    70     if ( iCoords )
       
    71         {
       
    72         iCoords->Close();
       
    73         }
       
    74     delete iCoords;
       
    75     }
       
    76 
       
    77 // ----------------------------------------------------------------------------
       
    78 // CPointerEventHandler::ConstructL()
       
    79 // ----------------------------------------------------------------------------
       
    80 void CPointerEventHandler::ConstructL()
       
    81     {
       
    82     HTI_LOG_TEXT( "CPointerEventHandler::ConstructL" );
       
    83     User::LeaveIfError( iWsSession.Connect() );
       
    84     User::LeaveIfError( iTimer.CreateLocal() );
       
    85     CActiveScheduler::Add( this );
       
    86     }
       
    87 
       
    88 // ----------------------------------------------------------------------------
       
    89 // void CPointerEventHandler::SetDispatcher()
       
    90 // ----------------------------------------------------------------------------
       
    91 void CPointerEventHandler::SetDispatcher( MHtiDispatcher* aDispatcher )
       
    92     {
       
    93     iDispatcher = aDispatcher;
       
    94     }
       
    95 
       
    96 // ----------------------------------------------------------------------------
       
    97 // CPointerEventHandler::RunL()
       
    98 // ----------------------------------------------------------------------------
       
    99 void CPointerEventHandler::RunL()
       
   100     {
       
   101     HTI_LOG_FUNC_IN( "CPointerEventHandler::RunL" );
       
   102 
       
   103     if ( iCommand == ETapScreen )
       
   104         {
       
   105         ChangePointerStateL();
       
   106         }
       
   107 
       
   108     else if ( iCommand == ETapAndDrag && iState == EPointerDown )
       
   109         {
       
   110         PointerMove();
       
   111         PointerUp();
       
   112         SendOkMsgL();
       
   113         iReady = ETrue;
       
   114         }
       
   115 
       
   116     else if ( iCommand == ETapAndDragMultipoint )
       
   117         {
       
   118         if ( iState == EPointerUp )  // Starting a new line
       
   119             {
       
   120             PointerDown();
       
   121             iTapCount--;
       
   122             iTimer.After( iStatus, iEventDelay );
       
   123             SetActive();
       
   124             }
       
   125         else
       
   126             {
       
   127             MoveToNextPointL(); // Continuing current line
       
   128             }
       
   129         }
       
   130 
       
   131     HTI_LOG_FUNC_OUT( "CPointerEventHandler::RunL" );
       
   132     }
       
   133 
       
   134 // ----------------------------------------------------------------------------
       
   135 // CPointerEventHandler::RunError()
       
   136 // ----------------------------------------------------------------------------
       
   137 TInt CPointerEventHandler::RunError( TInt aError )
       
   138     {
       
   139     HTI_LOG_FORMAT( "CPointerEventHandler::RunError %d", aError );
       
   140 
       
   141     TInt dispatchResult = KErrNone;
       
   142     TRAP( dispatchResult, SendErrorMessageL( aError, KErrorInternalFailure ) );
       
   143     if ( dispatchResult != KErrNone )
       
   144         {
       
   145         HTI_LOG_FORMAT( "CPointerEventHandler::RunError: Failed to send error report to framework: %d.", dispatchResult );
       
   146         }
       
   147     iReady = ETrue;
       
   148     return KErrNone;
       
   149     }
       
   150 
       
   151 // ----------------------------------------------------------------------------
       
   152 // CPointerEventHandler::DoCancel()
       
   153 // ----------------------------------------------------------------------------
       
   154 void CPointerEventHandler::DoCancel()
       
   155     {
       
   156     iTimer.Cancel();
       
   157     }
       
   158 
       
   159 // ----------------------------------------------------------------------------
       
   160 // CPointerEventHandler::ProcessMessageL()
       
   161 // ----------------------------------------------------------------------------
       
   162 void CPointerEventHandler::ProcessMessageL( const TDesC8& aMessage,
       
   163     THtiMessagePriority /*aPriority*/ )
       
   164     {
       
   165     HTI_LOG_FUNC_IN("CPointerEventHandler::ProcessMessageL");
       
   166     HTI_LOG_FORMAT("Msg len: %d.", aMessage.Length());
       
   167 
       
   168     if ( !iReady )
       
   169         {
       
   170         SendErrorMessageL( ENotReadyCommand, KErrorServiceNotReady );
       
   171         return;
       
   172         }
       
   173     if ( aMessage.Length() == 0 )
       
   174         {
       
   175         SendErrorMessageL( EMissingCommand, KErrorMissingCommand );
       
   176         return;
       
   177         }
       
   178 
       
   179     User::ResetInactivityTime();
       
   180     iCommand = aMessage.Ptr()[0];
       
   181     switch ( iCommand )
       
   182         {
       
   183         case ETapScreen:
       
   184             HandleTapScreenL( aMessage.Right( aMessage.Length() - 1 ) );
       
   185             break;
       
   186         case ETapAndDrag:
       
   187             HandleTapAndDragL( aMessage.Right( aMessage.Length() - 1 ) );
       
   188             break;
       
   189         case ETapAndDragMultipoint:
       
   190             HandleTapAndDragMultipointL(
       
   191                 aMessage.Right( aMessage.Length() - 1 ) );
       
   192             break;
       
   193         case EPressPointerDown:
       
   194         case ELiftPointerUp:
       
   195             HandlePointerDownOrUpL( aMessage.Right( aMessage.Length() - 1 ) );
       
   196             break;
       
   197         default:
       
   198             SendErrorMessageL( EUnrecognizedCommand,
       
   199                 KErrorUnrecognizedCommand );
       
   200             break;
       
   201         }
       
   202 
       
   203     HTI_LOG_FUNC_OUT( "CPointerEventHandler::ProcessMessageL: Done" );
       
   204     }
       
   205 
       
   206 // ----------------------------------------------------------------------------
       
   207 // CPointerEventHandler::HandleTapScreenL()
       
   208 // Handles single or multiple taps to one point.
       
   209 // ----------------------------------------------------------------------------
       
   210 void CPointerEventHandler::HandleTapScreenL( const TDesC8& aData )
       
   211     {
       
   212     HTI_LOG_FUNC_IN( "CPointerEventHandler::HandleTapScreenL" );
       
   213 
       
   214     if ( aData.Length() != KTapCmdLength )
       
   215         {
       
   216         SendErrorMessageL( EInvalidParameters, KErrorInvalidParameters );
       
   217         return;
       
   218         }
       
   219 
       
   220     // Parse the parameters - correct length is already verified
       
   221     TInt offset = 0;
       
   222     iX = aData[offset] + ( aData[offset+1] << 8 );
       
   223     offset += 2;
       
   224     HTI_LOG_FORMAT( "X coord = %d", iX );
       
   225     iY = aData[offset] + ( aData[offset+1] << 8 );
       
   226     offset += 2;
       
   227     HTI_LOG_FORMAT( "Y coord = %d", iY );
       
   228     iEventDelay = ( aData[offset] + ( aData[offset+1] << 8 ) ) * 1000;
       
   229     offset += 2;
       
   230     HTI_LOG_FORMAT( "Time to hold down = %d", iEventDelay.Int() );
       
   231     iTapCount = aData[offset] + ( aData[offset+1] << 8 );
       
   232     offset += 2;
       
   233     HTI_LOG_FORMAT( "Tap count = %d", iTapCount );
       
   234     iActionDelay = ( aData[offset] + ( aData[offset+1] << 8 ) ) * 1000;
       
   235     HTI_LOG_FORMAT( "Pause between taps = %d", iActionDelay.Int() );
       
   236 
       
   237     // Start tapping
       
   238     iReady = EFalse;
       
   239     ChangePointerStateL();
       
   240 
       
   241     HTI_LOG_FUNC_OUT( "CPointerEventHandler::HandleTapScreenL" );
       
   242     }
       
   243 
       
   244 // ----------------------------------------------------------------------------
       
   245 // CPointerEventHandler::HandleTapAndDragL()
       
   246 // Handles a single drag and drop with straight line.
       
   247 // ----------------------------------------------------------------------------
       
   248 void CPointerEventHandler::HandleTapAndDragL( const TDesC8& aData )
       
   249     {
       
   250     HTI_LOG_FUNC_IN( "CPointerEventHandler::HandleTapAndDragL" );
       
   251 
       
   252     if ( aData.Length() != KTapCmdLength )
       
   253         {
       
   254         SendErrorMessageL( EInvalidParameters, KErrorInvalidParameters );
       
   255         return;
       
   256         }
       
   257 
       
   258     TInt offset = 0;
       
   259     iX = aData[offset] + ( aData[offset+1] << 8 );
       
   260     offset += 2;
       
   261     HTI_LOG_FORMAT( "X coord down = %d", iX );
       
   262     iY = aData[offset] + ( aData[offset+1] << 8 );
       
   263     offset += 2;
       
   264     HTI_LOG_FORMAT( "Y coord down = %d", iY );
       
   265     TInt xUp = aData[offset] + ( aData[offset+1] << 8 );
       
   266     offset += 2;
       
   267     HTI_LOG_FORMAT( "X coord up = %d", xUp );
       
   268     TInt yUp = aData[offset] + ( aData[offset+1] << 8 );
       
   269     offset += 2;
       
   270     HTI_LOG_FORMAT( "Y coord up = %d", yUp );
       
   271     iEventDelay = ( aData[offset] + ( aData[offset+1] << 8 ) ) * 1000;
       
   272     HTI_LOG_FORMAT( "Drag time = %d", iEventDelay.Int() );
       
   273 
       
   274     iReady = EFalse;
       
   275     PointerDown();
       
   276     iX = xUp;
       
   277     iY = yUp;
       
   278     iTimer.After( iStatus, iEventDelay );
       
   279     SetActive();
       
   280 
       
   281     HTI_LOG_FUNC_OUT( "CPointerEventHandler::HandleTapAndDragL" );
       
   282     }
       
   283 
       
   284 // ----------------------------------------------------------------------------
       
   285 // CPointerEventHandler::HandleTapAndDragMultipointL()
       
   286 // Handles drawing one or more curvy lines.
       
   287 // ----------------------------------------------------------------------------
       
   288 void CPointerEventHandler::HandleTapAndDragMultipointL( const TDesC8& aData )
       
   289     {
       
   290     HTI_LOG_FUNC_IN( "CPointerEventHandler::HandleTapAndDragMultipointL" );
       
   291 
       
   292     TInt dataLength = aData.Length();
       
   293     if ( dataLength < KDragMultiCmdMinLength || dataLength % 2 != 0 )
       
   294         {
       
   295         SendErrorMessageL( EInvalidParameters, KErrorInvalidParameters );
       
   296         return;
       
   297         }
       
   298 
       
   299     TInt offset = 0;
       
   300     iEventDelay = ( aData[offset] + ( aData[offset+1] << 8 ) ) * 1000;
       
   301     offset += 2;
       
   302     HTI_LOG_FORMAT( "Time between events = %d", iEventDelay.Int() );
       
   303     iActionDelay = ( aData[offset] + ( aData[offset+1] << 8 ) ) * 1000;
       
   304     offset += 2;
       
   305     HTI_LOG_FORMAT( "Pause between lines = %d", iActionDelay.Int() );
       
   306 
       
   307     if ( iCoords == NULL )
       
   308         {
       
   309         iCoords = new ( ELeave ) RArray<TInt>();
       
   310         }
       
   311     iCoords->Reset();
       
   312 
       
   313     // Read integers from aData to the array, all integers are 2 bytes
       
   314     while ( offset < dataLength )
       
   315         {
       
   316         iCoords->AppendL( aData[offset] + ( aData[offset + 1] << 8 ) );
       
   317         offset += 2;
       
   318         }
       
   319 
       
   320     iReady = EFalse;
       
   321     iTapCount = ( *iCoords )[0];
       
   322     iCoords->Remove( 0 );
       
   323     iX = ( *iCoords )[0];
       
   324     iCoords->Remove( 0 );
       
   325     iY = ( *iCoords )[0];
       
   326     iCoords->Remove( 0 );
       
   327     HTI_LOG_FORMAT( "Point count for first line = %d", iTapCount );
       
   328     PointerDown();
       
   329     iTapCount--;
       
   330     iTimer.After( iStatus, iEventDelay );
       
   331     SetActive();
       
   332 
       
   333     HTI_LOG_FUNC_OUT( "CPointerEventHandler::HandleTapAndDragMultipointL" );
       
   334     }
       
   335 
       
   336 // ----------------------------------------------------------------------------
       
   337 // CPointerEventHandler::HandlePointerDownOrUpL()
       
   338 // Handles pushing pointer down in one point or lifting it up.
       
   339 // This is synchronous operation and sends OK message right after the event
       
   340 // is simulated.
       
   341 // ----------------------------------------------------------------------------
       
   342 void CPointerEventHandler::HandlePointerDownOrUpL( const TDesC8& aData )
       
   343     {
       
   344     HTI_LOG_FUNC_IN( "CPointerEventHandler::HandlePointerDownOrUpL" );
       
   345     if ( aData.Length() != KSinglePointerCmdLength )
       
   346         {
       
   347         SendErrorMessageL( EInvalidParameters, KErrorInvalidParameters );
       
   348         return;
       
   349         }
       
   350 
       
   351     // Parse the parameters - correct length is already verified
       
   352     TInt offset = 0;
       
   353     iX = aData[offset] + ( aData[offset+1] << 8 );
       
   354     offset += 2;
       
   355     HTI_LOG_FORMAT( "X coord = %d", iX );
       
   356     iY = aData[offset] + ( aData[offset+1] << 8 );
       
   357     offset += 2;
       
   358     HTI_LOG_FORMAT( "Y coord = %d", iY );
       
   359 
       
   360     if ( iCommand == EPressPointerDown )
       
   361         {
       
   362         PointerDown();
       
   363         }
       
   364     else
       
   365         {
       
   366         PointerUp();
       
   367         }
       
   368     SendOkMsgL();
       
   369     HTI_LOG_FUNC_OUT( "CPointerEventHandler::HandlePointerDownOrUpL" );
       
   370     }
       
   371 
       
   372 // ----------------------------------------------------------------------------
       
   373 // CPointerEventHandler::ChangePointerStateL()
       
   374 // Decides whether to do  "pointer down" or "pointer up" event next or if
       
   375 // operation is complete.
       
   376 // This function is used by ETapScreen command.
       
   377 // ----------------------------------------------------------------------------
       
   378 void CPointerEventHandler::ChangePointerStateL()
       
   379     {
       
   380     HTI_LOG_FUNC_IN( "CPointerEventHandler::ChangePointerStateL" );
       
   381     HTI_LOG_FORMAT( "Taps remaining = %d", iTapCount );
       
   382     if ( iTapCount < 1 )
       
   383         {
       
   384         SendOkMsgL();
       
   385         iReady = ETrue;
       
   386         return;
       
   387         }
       
   388 
       
   389     if ( iState == EPointerUp )
       
   390         {
       
   391         PointerDown();
       
   392         iTimer.After( iStatus, iEventDelay );
       
   393         SetActive();
       
   394         }
       
   395     else if ( iState == EPointerDown )
       
   396         {
       
   397         PointerUp();
       
   398         iTapCount--; // one tap done
       
   399         if ( iTapCount > 0 ) // do we continue tapping?
       
   400             {
       
   401             iTimer.After( iStatus, iActionDelay );
       
   402             SetActive();
       
   403             }
       
   404         else
       
   405             {
       
   406             SendOkMsgL();  // tapping done
       
   407             iReady = ETrue;
       
   408             }
       
   409         }
       
   410     HTI_LOG_FUNC_OUT( "CPointerEventHandler::ChangePointerStateL" );
       
   411     }
       
   412 
       
   413 // ----------------------------------------------------------------------------
       
   414 // CPointerEventHandler::MoveToNextPointL()
       
   415 // Takes the next point from the coordinate array and initiates pointer moving
       
   416 // to that point.
       
   417 // This function is used by ETapAndDragMultipoint command and called from
       
   418 // the RunL().
       
   419 // ----------------------------------------------------------------------------
       
   420 void CPointerEventHandler::MoveToNextPointL()
       
   421     {
       
   422     HTI_LOG_FUNC_IN( "CPointerEventHandler::MoveToNextPointL" );
       
   423     HTI_LOG_FORMAT( "Points remaining for this line = %d", iTapCount );
       
   424 
       
   425     if ( iTapCount == 0 ) // End of current line
       
   426         {
       
   427         PointerUp();
       
   428         if ( iCoords->Count() < 5 ) // point count & at least 2 points
       
   429             {
       
   430             // This was the last line, we are done
       
   431             SendOkMsgL();
       
   432             iReady = ETrue;
       
   433             }
       
   434         else
       
   435             {
       
   436             // New line starts: take the point count of this line and
       
   437             // first coordinates.
       
   438             iTapCount = ( *iCoords )[0];
       
   439             iCoords->Remove( 0 );
       
   440             iX = ( *iCoords )[0];
       
   441             iCoords->Remove( 0 );
       
   442             iY = ( *iCoords )[0];
       
   443             iCoords->Remove( 0 );
       
   444             HTI_LOG_FORMAT( "Point count for new line = %d", iTapCount );
       
   445             iTimer.After( iStatus, iActionDelay );
       
   446             SetActive();
       
   447             }
       
   448         }
       
   449 
       
   450     else  // Current line continues: take next point coords and move
       
   451         {
       
   452         iX = ( *iCoords )[0];
       
   453         iCoords->Remove( 0 );
       
   454         iY = ( *iCoords )[0];
       
   455         iCoords->Remove( 0 );
       
   456         PointerMove();
       
   457         iTapCount--;
       
   458         iTimer.After( iStatus, iEventDelay );
       
   459         SetActive();
       
   460         }
       
   461 
       
   462     HTI_LOG_FUNC_OUT( "CPointerEventHandler::MoveToNextPointL" );
       
   463     }
       
   464 
       
   465 // ----------------------------------------------------------------------------
       
   466 // CPointerEventHandler::PointerDown()
       
   467 // ----------------------------------------------------------------------------
       
   468 void CPointerEventHandler::PointerDown()
       
   469     {
       
   470     HTI_LOG_FUNC_IN( "CPointerEventHandler::PointerDown" );
       
   471     SimulatePointerEvent( TRawEvent::EButton1Down );
       
   472     iState = EPointerDown;
       
   473     HTI_LOG_FUNC_OUT( "CPointerEventHandler::PointerDown" );
       
   474     }
       
   475 
       
   476 // ----------------------------------------------------------------------------
       
   477 // CPointerEventHandler::PointerUp()
       
   478 // ----------------------------------------------------------------------------
       
   479 void CPointerEventHandler::PointerUp()
       
   480     {
       
   481     HTI_LOG_FUNC_IN( "CPointerEventHandler::PointerUp" );
       
   482     SimulatePointerEvent( TRawEvent::EButton1Up );
       
   483     iState = EPointerUp;
       
   484     HTI_LOG_FUNC_OUT( "CPointerEventHandler::PointerUp" );
       
   485     }
       
   486 
       
   487 // ----------------------------------------------------------------------------
       
   488 // CPointerEventHandler::PointerMove()
       
   489 // ----------------------------------------------------------------------------
       
   490 void CPointerEventHandler::PointerMove()
       
   491     {
       
   492     HTI_LOG_FUNC_IN( "CPointerEventHandler::PointerMove" );
       
   493     SimulatePointerEvent( TRawEvent::EPointerMove );
       
   494     iState = EPointerMoving;
       
   495     HTI_LOG_FUNC_OUT( "CPointerEventHandler::PointerMove" );
       
   496     }
       
   497 
       
   498 // ----------------------------------------------------------------------------
       
   499 // CPointerEventHandler::SimulatePointerEvent()
       
   500 // Sends the pointer event as a raw event.
       
   501 // ----------------------------------------------------------------------------
       
   502 void CPointerEventHandler::SimulatePointerEvent( TRawEvent::TType aType )
       
   503     {
       
   504     HTI_LOG_FUNC_IN( "CPointerEventHandler::SimulatePointerEvent" );
       
   505     TRawEvent rawEvent;
       
   506     rawEvent.Set( aType, iX, iY );
       
   507     iWsSession.SimulateRawEvent( rawEvent );
       
   508     iWsSession.Flush();
       
   509     HTI_LOG_FUNC_OUT( "CPointerEventHandler::SimulatePointerEvent" );
       
   510     }
       
   511 
       
   512 // ----------------------------------------------------------------------------
       
   513 // CPointerEventHandler::SendOkMsgL()
       
   514 // ----------------------------------------------------------------------------
       
   515 void CPointerEventHandler::SendOkMsgL()
       
   516     {
       
   517     HTI_LOG_FUNC_IN("CPointerEventHandler::SendOkMsgL");
       
   518 
       
   519     User::LeaveIfNull( iDispatcher );
       
   520     TBuf8<1> response;
       
   521     response.Append( EResultOk );
       
   522     HBufC8* respH8 = response.AllocL();
       
   523     User::LeaveIfError( iDispatcher->DispatchOutgoingMessage(
       
   524         respH8, KKeyEventServiceUid ) );
       
   525 
       
   526     HTI_LOG_FUNC_OUT("CPointerEventHandler::SendOkMsgL");
       
   527     }
       
   528 
       
   529 // ----------------------------------------------------------------------------
       
   530 // CPointerEventHandler::SendErrorMessageL()
       
   531 // ----------------------------------------------------------------------------
       
   532 void CPointerEventHandler::SendErrorMessageL(
       
   533         TInt aError, const TDesC8& aDescription )
       
   534     {
       
   535     HTI_LOG_FUNC_IN("CPointerEventHandler::SendErrorMessageL");
       
   536     User::LeaveIfNull( iDispatcher );
       
   537     User::LeaveIfError( iDispatcher->DispatchOutgoingErrorMessage(
       
   538         aError, aDescription, KKeyEventServiceUid ) );
       
   539     HTI_LOG_FUNC_OUT("CPointerEventHandler::SendErrorMessageL");
       
   540     }
       
   541 
       
   542 // End of file