Esempio n. 1
0
jboolean checkWriteSignal(int socket) {
    jboolean ret = KNI_FALSE;
    WMA_PROTOCOLS protocol;

    if (wmaGetProtocolByFD(socket, &protocol) == WMA_OK) {

        /* Make an up-call to unblock the thread */
        switch (protocol) {

        case WMA_SMS_PROTOCOL:
            jsr120_sms_message_sent_notifier();
            ret = KNI_TRUE;
            break;

        case WMA_CBS_PROTOCOL:
            /* No write signal supported for CBS */
            break;

        case WMA_MMS_PROTOCOL:
#if ENABLE_JSR_205
            jsr205_mms_message_sent_notifier();
            ret = KNI_TRUE;
#endif
            break;
        }
    }

    return ret;
}
Esempio n. 2
0
void WMASocket::writableSlot(int socket) {

    (void)socket; // avoid a compiler warning

    /* Make an up-call to unblock the thread */
     switch (sockProtocol) {

         case WMA_SMS_PROTOCOL:
             jsr120_sms_message_sent_notifier();
             break;

#if ENABLE_JSR_205
         case WMA_MMS_PROTOCOL:
             jsr205_mms_message_sent_notifier();
             break;
#endif

         default:
            /* Silently fail for unknown protocols. */
            break;
    }
}