void RoutingManager::enableRoutingToHost(bool skipCheckNDEF)
{
    tNFA_STATUS nfaStat;
    NXPLOG_API_D ("%s enter", "RoutingManager::enableRoutingToHost()");
    mSkipCheckNDEF = skipCheckNDEF;
    {
        SyncEventGuard guard (mRoutingEvent);

        // Route Nfc-A & B to host
        if (mSeTechMask == 0)
        {
            nfaStat = NFA_EeSetDefaultProtoRouting(mDefaultEe ,
                                        NFC_PROTOCOL_MASK_ISO7816|NFA_PROTOCOL_MASK_ISO_DEP,
                                        0, 0, 0, 0);
            if (nfaStat == NFA_STATUS_OK)
            {
                mRoutingEvent.wait ();
            }
            else
            {
                NXPLOG_API_E ("Fail to set  iso7816 routing");
            }
        }
    }
    commitRouting();
}
void RoutingManager::enableRoutingToHost()
{
    tNFA_STATUS nfaStat;

    {
        SyncEventGuard guard (mRoutingEvent);

        // Route Nfc-A to host if we don't have a SE
        if (mSeTechMask == 0)
        {
            nfaStat = NFA_EeSetDefaultTechRouting (mDefaultEe, NFA_TECHNOLOGY_MASK_A, 0, 0);
            if (nfaStat == NFA_STATUS_OK)
                mRoutingEvent.wait ();
            else
                ALOGE ("Fail to set default tech routing");
        }

        // Default routing for IsoDep protocol
        nfaStat = NFA_EeSetDefaultProtoRouting(mDefaultEe, NFA_PROTOCOL_MASK_ISO_DEP, 0, 0);
        if (nfaStat == NFA_STATUS_OK)
            mRoutingEvent.wait ();
        else
            ALOGE ("Fail to set default proto routing");
    }
}
void RoutingManager::disableRoutingToHost()
{
    tNFA_STATUS nfaStat;
    NXPLOG_API_D ("%s enter", "RoutingManager::disableRoutingToHost()");
    {
        SyncEventGuard guard (mRoutingEvent);
        // Default routing for NFC-A & B technology if we don't have a SE
        if (mSeTechMask == 0)
        {
            nfaStat = NFA_EeSetDefaultProtoRouting(mDefaultEe, 0, 0, 0, 0, 0);
            if (nfaStat == NFA_STATUS_OK)
            {
                mRoutingEvent.wait ();
            }
            else
            {
                NXPLOG_API_E ("Fail to set  iso7816 routing");
            }
        }
    }
    commitRouting();
}
void RoutingManager::disableRoutingToHost()
{
    tNFA_STATUS nfaStat;

    {
        SyncEventGuard guard (mRoutingEvent);
        // Default routing for NFC-A technology if we don't have a SE
        if (mSeTechMask == 0)
        {
            nfaStat = NFA_EeSetDefaultTechRouting (mDefaultEe, 0, 0, 0);
            if (nfaStat == NFA_STATUS_OK)
                mRoutingEvent.wait ();
            else
                ALOGE ("Fail to set default tech routing");
        }

        // Default routing for IsoDep protocol
        nfaStat = NFA_EeSetDefaultProtoRouting(mDefaultEe, 0, 0, 0);
        if (nfaStat == NFA_STATUS_OK)
            mRoutingEvent.wait ();
        else
            ALOGE ("Fail to set default proto routing");
    }
}