Exemple #1
0
static void btif_context_switched(void *p_msg)
{
    tBTIF_CONTEXT_SWITCH_CBACK *p;

    BTIF_TRACE_VERBOSE0("btif_context_switched");

    p = (tBTIF_CONTEXT_SWITCH_CBACK *) p_msg;

    /* each callback knows how to parse the data */
    if (p->p_cb)
        p->p_cb(p->event, p->p_param);
}
static void queue_int_handle_evt(UINT16 event, char *p_param)
{

    BTIF_TRACE_VERBOSE2("%s, Event : 0x%x", __FUNCTION__, event);
    switch(event)
    {
        case BTIF_QUEUE_CONNECT_EVT:
            queue_int_add((connect_node_t*)p_param);
            break;

        case BTIF_QUEUE_ADVANCE_EVT:
            queue_int_advance();
            break;
        case BTIF_QUEUE_PENDING_CONECT_EVT:
            queue_int_add((connect_node_t*)p_param);
            return;
            break;
        default:
            BTIF_TRACE_VERBOSE0("BTIF_QUEUE_PENDING_CONECT_ADVANCE_EVT");
            break;
    }

    queue_int_connect_next();
}
/*******************************************************************************
**
** Function         btif_queue_pending_retry
**
** Description      Advance to the next scheduled connection.
**
** Returns          void
**
*******************************************************************************/
void btif_queue_pending_retry()
{
    BTIF_TRACE_VERBOSE0("btif_queue_pending_retry");
    btif_transfer_context(queue_int_handle_evt, BTIF_QUEUE_PENDING_CONECT_ADVANCE_EVT,
                          NULL, 0, NULL);
}