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; }
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; } }
/** * The native software platform on the target device calls this API to notify that a message has * been sent. When jsr120_send_sms()is called, the native software platform on the target * device is expected to deliver the message to the network. It then calls this callback function. * * @param handle Handle value returned from javacall_sms_send * @param result indication of send completed status result: Either * <tt>JAVACALL_OK</tt> on success, * <tt>JAVACALL_FAIL</tt> on failure */ void jsr120_notify_sms_send_completed(int handle, WMA_STATUS result) { /* wake up listeners */ jsr120_sms_message_sent_notifier(handle, result); }