コード例 #1
0
ファイル: input_hub.c プロジェクト: kuii/dfbNEON
static void
CoreInputHubClient_Dispatch( void                  *context,
                             const OnePacketHeader *header,
                             void                  *data,
                             OneThread             *thread )
{
     CoreInputHubClient         *client       = context;
     const InputHubNotification *notification = data;

     D_DEBUG_AT( Core_InputHub, "%s()\n", __FUNCTION__ );

     switch (notification->type) {
          case IHNT_DEVICE_ADD:
               CoreInputHubClient_Dispatch_DeviceAdd( client, notification );
               break;

          case IHNT_DEVICE_REMOVE:
               CoreInputHubClient_Dispatch_DeviceRemove( client, notification );
               break;

          case IHNT_EVENT_DISPATCH:
               CoreInputHubClient_Dispatch_EventDispatch( client, notification );
               break;

          default:
               D_BUG( "unknown notification type %d", notification->type );
     }
}
コード例 #2
0
ファイル: input_hub.c プロジェクト: Distrotech/DirectFB
static void
CoreInputHubClient_Dispatch( void                  *context,
                             const OnePacketHeader *header,
                             void                  *data,
                             OneThread             *thread )
{
     CoreInputHubClient         *client       = context;
     const InputHubNotification *notification = data;

     D_DEBUG_AT( Core_InputHub, "%s()\n", __FUNCTION__ );

     switch (notification->type) {
          case IHNT_ATTACHED:
               direct_mutex_lock( &client->lock );

               client->activate_stop = true;

               direct_waitqueue_broadcast( &client->wq );

               direct_mutex_unlock( &client->lock );
               break;

          case IHNT_DEVICE_ADD:
               CoreInputHubClient_Dispatch_DeviceAdd( client, notification );
               break;

          case IHNT_DEVICE_REMOVE:
               CoreInputHubClient_Dispatch_DeviceRemove( client, notification );
               break;

          case IHNT_EVENT_DISPATCH:
               CoreInputHubClient_Dispatch_EventDispatch( client, notification );
               break;

          default:
               D_BUG( "unknown notification type %d", notification->type );
     }
}