debug logs
This commit is contained in:
		@@ -66,6 +66,7 @@ qti_ext_new_slot(
 | 
			
		||||
    RadioInstance* radio,
 | 
			
		||||
    GHashTable* params)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_slot_new(radio, params);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -76,6 +77,7 @@ qti_ext_new_slot(
 | 
			
		||||
BinderExtPlugin*
 | 
			
		||||
qti_ext_new()
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -88,6 +90,7 @@ void
 | 
			
		||||
qti_ext_init(
 | 
			
		||||
    QtiExt* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static
 | 
			
		||||
@@ -95,6 +98,7 @@ void
 | 
			
		||||
qti_ext_class_init(
 | 
			
		||||
    QtiExtClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    klass->plugin_name = qti_plugin_name;
 | 
			
		||||
    klass->new_slot = qti_ext_new_slot;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -99,6 +99,7 @@ qti_ims_result_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsResultRequest* req = g_slice_new(QtiImsResultRequest);
 | 
			
		||||
 | 
			
		||||
    req->ext = binder_ext_ims_ref(ext);
 | 
			
		||||
@@ -113,6 +114,7 @@ void
 | 
			
		||||
qti_ims_result_request_free(
 | 
			
		||||
    QtiImsResultRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    binder_ext_ims_unref(req->ext);
 | 
			
		||||
    gutil_slice_free(req);
 | 
			
		||||
}
 | 
			
		||||
@@ -125,6 +127,7 @@ qti_ims_result_request_complete(
 | 
			
		||||
    GBinderReader* reader,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsResultRequest* req = user_data;
 | 
			
		||||
 | 
			
		||||
    if (req->complete) {
 | 
			
		||||
@@ -138,6 +141,7 @@ void
 | 
			
		||||
qti_ims_result_request_destroy(
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsResultRequest* req = user_data;
 | 
			
		||||
 | 
			
		||||
    if (req->destroy) {
 | 
			
		||||
@@ -153,6 +157,7 @@ qti_ims_reg_status_changed(
 | 
			
		||||
    QTI_RADIO_REG_STATE state,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(user_data);
 | 
			
		||||
    BINDER_EXT_IMS_STATE ims_state;
 | 
			
		||||
 | 
			
		||||
@@ -185,7 +190,7 @@ qti_ims_reg_status_response(
 | 
			
		||||
    GBinderReader* reader,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("qti_ims_reg_status_response");
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsResultRequest* req = user_data;
 | 
			
		||||
 | 
			
		||||
    QTI_RADIO_REG_STATE state = QTI_RADIO_REG_STATE_INVALID;
 | 
			
		||||
@@ -215,6 +220,7 @@ BINDER_EXT_IMS_STATE
 | 
			
		||||
qti_ims_get_state(
 | 
			
		||||
    BinderExtIms* ext)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    DBG("%s ims_state=%d", self->slot, self->ims_state);
 | 
			
		||||
@@ -226,6 +232,7 @@ void
 | 
			
		||||
qti_ims_get_registrations(
 | 
			
		||||
    BinderExtIms* ext, void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    // We should always check for updated state
 | 
			
		||||
@@ -248,6 +255,7 @@ qti_ims_set_registration(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(ext);
 | 
			
		||||
    const gboolean enabled = (registration != BINDER_EXT_IMS_REGISTRATION_OFF);
 | 
			
		||||
 | 
			
		||||
@@ -277,6 +285,7 @@ qti_ims_cancel(
 | 
			
		||||
    BinderExtIms* ext,
 | 
			
		||||
    guint id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
@@ -293,6 +302,7 @@ qti_ims_add_state_handler(
 | 
			
		||||
    BinderExtImsFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    DBG("%s", self->slot);
 | 
			
		||||
@@ -306,6 +316,7 @@ qti_ims_add_get_state_handler(
 | 
			
		||||
    QtiIms* self,
 | 
			
		||||
    QtiImsGetRegStatusFunc handler)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    DBG("%s", self->slot);
 | 
			
		||||
    return G_LIKELY(handler) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_GET_STATE_NAME, G_CALLBACK(handler), self) : 0;
 | 
			
		||||
@@ -316,6 +327,7 @@ void
 | 
			
		||||
qti_ims_iface_init(
 | 
			
		||||
    BinderExtImsInterface* iface)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    iface->version = BINDER_EXT_IMS_INTERFACE_VERSION;
 | 
			
		||||
    iface->flags = BINDER_EXT_IMS_INTERFACE_FLAG_VOICE_SUPPORT | BINDER_EXT_IMS_INTERFACE_FLAG_SMS_SUPPORT;
 | 
			
		||||
    iface->get_state = qti_ims_get_state;
 | 
			
		||||
@@ -333,6 +345,7 @@ qti_ims_new(
 | 
			
		||||
    const char* slot,
 | 
			
		||||
    QtiRadioExt* radio_ext)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
@@ -362,6 +375,7 @@ void
 | 
			
		||||
qti_ims_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiIms* self = THIS(object);
 | 
			
		||||
 | 
			
		||||
    g_free(self->slot);
 | 
			
		||||
@@ -381,6 +395,7 @@ void
 | 
			
		||||
qti_ims_class_init(
 | 
			
		||||
    QtiImsClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = qti_ims_finalize;
 | 
			
		||||
    qti_ims_signals[SIGNAL_STATE_CHANGED] =
 | 
			
		||||
        g_signal_new(SIGNAL_STATE_CHANGED_NAME, G_OBJECT_CLASS_TYPE(klass),
 | 
			
		||||
 
 | 
			
		||||
@@ -94,6 +94,7 @@ qti_ims_call_result_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCallResultRequest* req =
 | 
			
		||||
        g_slice_new0(QtiImsCallResultRequest);
 | 
			
		||||
 | 
			
		||||
@@ -110,6 +111,7 @@ void
 | 
			
		||||
qti_ims_call_result_request_free(
 | 
			
		||||
    QtiImsCallResultRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    BinderExtCall* ext = req->ext;
 | 
			
		||||
 | 
			
		||||
    if (req->destroy) {
 | 
			
		||||
@@ -127,6 +129,7 @@ gboolean
 | 
			
		||||
qti_ims_call_result_request_unref(
 | 
			
		||||
    QtiImsCallResultRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!--(req->ref_count)) {
 | 
			
		||||
        qti_ims_call_result_request_free(req);
 | 
			
		||||
        return TRUE;
 | 
			
		||||
@@ -140,6 +143,7 @@ void
 | 
			
		||||
qti_ims_call_result_request_destroy(
 | 
			
		||||
    gpointer req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_ims_call_result_request_unref(req);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -154,6 +158,7 @@ qti_ims_call_info_find(
 | 
			
		||||
    QtiImsCall* self,
 | 
			
		||||
    guint call_id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    for (int i = 0; i < self->calls->len; i++) {
 | 
			
		||||
        BinderExtCallInfo* info =
 | 
			
		||||
            (BinderExtCallInfo*) g_ptr_array_index(self->calls, i);
 | 
			
		||||
@@ -171,6 +176,7 @@ qti_ims_call_handle_call_info(
 | 
			
		||||
    GPtrArray* updated_calls,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCall* self = THIS(user_data);
 | 
			
		||||
 | 
			
		||||
    // loop over the updated calls
 | 
			
		||||
@@ -206,6 +212,7 @@ qti_ims_call_handle_ring(
 | 
			
		||||
    QtiRadioExt* radio,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    g_signal_emit(THIS(user_data),
 | 
			
		||||
        qti_ims_call_signals[SIGNAL_CALL_RING], 0);
 | 
			
		||||
}
 | 
			
		||||
@@ -215,6 +222,7 @@ const BinderExtCallInfo* const*
 | 
			
		||||
qti_ims_call_get_calls(
 | 
			
		||||
    BinderExtCall* ext)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const BinderExtCallInfo* none = NULL;
 | 
			
		||||
    QtiImsCall* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
@@ -229,6 +237,7 @@ qti_ims_call_result_response(
 | 
			
		||||
    GBinderReader* reader,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCallResultRequest* req = user_data;
 | 
			
		||||
    BinderExtCallResultFunc complete = req->complete;
 | 
			
		||||
 | 
			
		||||
@@ -252,6 +261,7 @@ qti_ims_call_dial(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCall* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    QtiImsCallResultRequest* req = qti_ims_call_result_request_new(ext,
 | 
			
		||||
@@ -280,6 +290,7 @@ qti_ims_call_answer(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCall* self = THIS(ext);
 | 
			
		||||
    QTI_RADIO_RTT_MODE mode = flags & BINDER_EXT_CALL_ANSWER_FLAG_RTT ?
 | 
			
		||||
        QTI_RADIO_RTT_MODE_FULL : QTI_RADIO_RTT_MODE_DISABLED;
 | 
			
		||||
@@ -314,6 +325,7 @@ qti_ims_call_swap(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    DBG("swap is not implemented yet");
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -329,6 +341,7 @@ qti_ims_call_hangup(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    // eh, we can use built in hangup
 | 
			
		||||
    // some devices may not support this, so we need to implement
 | 
			
		||||
    // it eventually
 | 
			
		||||
@@ -363,6 +376,7 @@ qti_ims_call_conference(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    DBG("conference is not implemented yet");
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -376,6 +390,7 @@ qti_ims_call_send_dtmf(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    DBG("send_dtmf is not implemented yet");
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -386,6 +401,7 @@ qti_ims_call_cancel(
 | 
			
		||||
    BinderExtCall* ext,
 | 
			
		||||
    guint id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCall* self = THIS(ext);
 | 
			
		||||
    const guint mapped = GPOINTER_TO_UINT(g_hash_table_lookup(self->id_map,
 | 
			
		||||
        ID_KEY(id)));
 | 
			
		||||
@@ -400,6 +416,7 @@ qti_ims_call_add_calls_changed_handler(
 | 
			
		||||
    BinderExtCallFunc cb,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(cb) ? g_signal_connect(THIS(ext),
 | 
			
		||||
        SIGNAL_CALL_STATE_CHANGED_NAME, G_CALLBACK(cb), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -411,6 +428,7 @@ qti_ims_call_add_disconnect_handler(
 | 
			
		||||
    BinderExtCallDisconnectFunc cb,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(cb) ? g_signal_connect(THIS(ext),
 | 
			
		||||
        SIGNAL_CALL_END_NAME, G_CALLBACK(cb), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -422,6 +440,7 @@ qti_ims_call_add_ring_handler(
 | 
			
		||||
    BinderExtCallFunc cb,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(cb) ? g_signal_connect(THIS(ext),
 | 
			
		||||
        SIGNAL_CALL_RING_NAME, G_CALLBACK(cb), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -433,6 +452,7 @@ qti_ims_call_add_ssn_handler(
 | 
			
		||||
    BinderExtCallSuppSvcNotifyFunc cb,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(cb) ? g_signal_connect(THIS(ext),
 | 
			
		||||
        SIGNAL_CALL_SUPP_SVC_NOTIFY_NAME, G_CALLBACK(cb), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -441,6 +461,7 @@ void
 | 
			
		||||
qti_ims_call_iface_init(
 | 
			
		||||
    BinderExtCallInterface* iface)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    iface->flags |= BINDER_EXT_CALL_INTERFACE_FLAG_IMS_SUPPORT |
 | 
			
		||||
        BINDER_EXT_CALL_INTERFACE_FLAG_IMS_REQUIRED;
 | 
			
		||||
    iface->version = BINDER_EXT_CALL_INTERFACE_VERSION;
 | 
			
		||||
@@ -467,6 +488,7 @@ BinderExtCall*
 | 
			
		||||
qti_ims_call_new(
 | 
			
		||||
    QtiRadioExt* radio_ext)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(radio_ext)) {
 | 
			
		||||
        QtiImsCall* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
 | 
			
		||||
@@ -492,6 +514,7 @@ void
 | 
			
		||||
qti_ims_call_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsCall* self = THIS(object);
 | 
			
		||||
 | 
			
		||||
    qti_radio_ext_unref(self->radio_ext);
 | 
			
		||||
@@ -506,6 +529,7 @@ void
 | 
			
		||||
qti_ims_call_init(
 | 
			
		||||
    QtiImsCall* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    self->pool = gutil_idle_pool_new();
 | 
			
		||||
    self->id_map = g_hash_table_new(g_direct_hash, g_direct_equal);
 | 
			
		||||
}
 | 
			
		||||
@@ -515,6 +539,7 @@ void
 | 
			
		||||
qti_ims_call_class_init(
 | 
			
		||||
    QtiImsCallClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GType type = G_OBJECT_CLASS_TYPE(klass);
 | 
			
		||||
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = qti_ims_call_finalize;
 | 
			
		||||
 
 | 
			
		||||
@@ -93,6 +93,7 @@ qti_ims_sms_result_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSmsResultRequest* req =
 | 
			
		||||
        g_slice_new0(QtiImsSmsResultRequest);
 | 
			
		||||
 | 
			
		||||
@@ -109,6 +110,7 @@ void
 | 
			
		||||
qti_ims_sms_result_request_free(
 | 
			
		||||
    QtiImsSmsResultRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    BinderExtSms* ext = req->ext;
 | 
			
		||||
 | 
			
		||||
    if (req->destroy) {
 | 
			
		||||
@@ -126,6 +128,7 @@ gboolean
 | 
			
		||||
qti_ims_sms_result_request_unref(
 | 
			
		||||
    QtiImsSmsResultRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!--(req->ref_count)) {
 | 
			
		||||
        qti_ims_sms_result_request_free(req);
 | 
			
		||||
        return TRUE;
 | 
			
		||||
@@ -139,6 +142,7 @@ void
 | 
			
		||||
qti_ims_sms_result_request_destroy(
 | 
			
		||||
    gpointer req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_ims_sms_result_request_unref(req);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -150,6 +154,7 @@ qti_ims_sms_result_request_response(
 | 
			
		||||
    GBinderReader* reader,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gint32 result;
 | 
			
		||||
    GBinderReader r;
 | 
			
		||||
    QtiImsSmsResultRequest* req = user_data;
 | 
			
		||||
@@ -183,6 +188,7 @@ qti_ims_sms_incoming_sms_handler(
 | 
			
		||||
    guint pdu_len,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = user_data;
 | 
			
		||||
 | 
			
		||||
    DBG("Incoming SMS!!!: pdu_len=%d", pdu_len);
 | 
			
		||||
@@ -208,6 +214,7 @@ qti_ims_sms_send(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = THIS(ext);
 | 
			
		||||
    QtiImsSmsResultRequest* req = qti_ims_sms_result_request_new(ext,
 | 
			
		||||
        complete, destroy, user_data);
 | 
			
		||||
@@ -233,6 +240,7 @@ qti_ims_sms_cancel(
 | 
			
		||||
    BinderExtSms* ext,
 | 
			
		||||
    guint id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = THIS(ext);
 | 
			
		||||
    const guint mapped = GPOINTER_TO_UINT(g_hash_table_lookup(self->id_map,
 | 
			
		||||
        ID_KEY(id)));
 | 
			
		||||
@@ -247,6 +255,7 @@ qti_ims_sms_ack_report(
 | 
			
		||||
    guint msg_ref,
 | 
			
		||||
    gboolean ok)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    QtiImsSmsResultRequest* req = qti_ims_sms_result_request_new(ext,
 | 
			
		||||
@@ -271,6 +280,7 @@ qti_ims_sms_ack_incoming(
 | 
			
		||||
    BinderExtSms* ext,
 | 
			
		||||
    gboolean ok)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = THIS(ext);
 | 
			
		||||
 | 
			
		||||
    QtiImsSmsResultRequest* req = qti_ims_sms_result_request_new(ext,
 | 
			
		||||
@@ -299,6 +309,7 @@ qti_ims_sms_add_report_handler(
 | 
			
		||||
    BinderExtSmsReportFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return g_signal_connect(ext, SIGNAL_SMS_STATE_CHANGED_NAME, G_CALLBACK(handler), user_data);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -309,6 +320,7 @@ qti_ims_sms_add_incoming_handler(
 | 
			
		||||
    BinderExtSmsIncomingFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return g_signal_connect(ext, SIGNAL_SMS_RECEIVED_NAME, G_CALLBACK(handler), user_data);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -318,6 +330,7 @@ qti_ims_sms_remove_handler(
 | 
			
		||||
    BinderExtSms* ext,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    g_signal_handler_disconnect(ext, id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -325,6 +338,7 @@ void
 | 
			
		||||
qti_ims_sms_iface_init(
 | 
			
		||||
    BinderExtSmsInterface* iface)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    iface->flags |= BINDER_EXT_SMS_INTERFACE_FLAG_IMS_SUPPORT |
 | 
			
		||||
        BINDER_EXT_SMS_INTERFACE_FLAG_IMS_REQUIRED;
 | 
			
		||||
    iface->version = BINDER_EXT_SMS_INTERFACE_VERSION;
 | 
			
		||||
@@ -345,6 +359,7 @@ BinderExtSms*
 | 
			
		||||
qti_ims_sms_new(
 | 
			
		||||
    QtiRadioExt* radio_ext)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(radio_ext)) {
 | 
			
		||||
        QtiImsSms* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
 | 
			
		||||
@@ -367,6 +382,7 @@ void
 | 
			
		||||
qti_ims_sms_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiImsSms* self = THIS(object);
 | 
			
		||||
    qti_radio_ext_unref(self->radio_ext);
 | 
			
		||||
    gutil_idle_pool_destroy(self->pool);
 | 
			
		||||
@@ -379,6 +395,7 @@ void
 | 
			
		||||
qti_ims_sms_init(
 | 
			
		||||
    QtiImsSms* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    self->pool = gutil_idle_pool_new();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -387,6 +404,7 @@ void
 | 
			
		||||
qti_ims_sms_class_init(
 | 
			
		||||
    QtiImsSmsClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GType type = G_OBJECT_CLASS_TYPE(klass);
 | 
			
		||||
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = qti_ims_sms_finalize;
 | 
			
		||||
 
 | 
			
		||||
@@ -47,6 +47,7 @@ static
 | 
			
		||||
int
 | 
			
		||||
qti_plugin_init()
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    BinderExtPlugin* ext;
 | 
			
		||||
 | 
			
		||||
    DBG("");
 | 
			
		||||
@@ -60,6 +61,7 @@ static
 | 
			
		||||
void
 | 
			
		||||
qti_plugin_exit()
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    DBG("");
 | 
			
		||||
    binder_ext_plugin_unregister(qti_plugin_name);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -125,6 +125,7 @@ void
 | 
			
		||||
qti_radio_ext_log_notify(
 | 
			
		||||
    struct ofono_debug_desc* desc)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_radio_ext_binder_log_module.level = (desc->flags &
 | 
			
		||||
        OFONO_DEBUG_FLAG_PRINT) ? GLOG_LEVEL_VERBOSE : GLOG_LEVEL_INHERIT;
 | 
			
		||||
}
 | 
			
		||||
@@ -134,6 +135,7 @@ void
 | 
			
		||||
qti_radio_ext_dump_notify(
 | 
			
		||||
    struct ofono_debug_desc* desc)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_radio_ext_binder_dump_module.level = (desc->flags &
 | 
			
		||||
        OFONO_DEBUG_FLAG_PRINT) ? GLOG_LEVEL_VERBOSE : GLOG_LEVEL_INHERIT;
 | 
			
		||||
}
 | 
			
		||||
@@ -154,6 +156,7 @@ static
 | 
			
		||||
guint
 | 
			
		||||
qti_radio_ext_new_req_id()
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    // Start from 1
 | 
			
		||||
    static guint last_id = 1;
 | 
			
		||||
    return last_id++;
 | 
			
		||||
@@ -163,6 +166,7 @@ static const char*
 | 
			
		||||
qti_radio_ext_req_name(
 | 
			
		||||
    guint32 req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (req) {
 | 
			
		||||
#define QTI_RADIO_REQ_(req, resp, name, NAME) \
 | 
			
		||||
        case QTI_RADIO_REQ_##NAME: return #name;
 | 
			
		||||
@@ -178,6 +182,7 @@ static const char*
 | 
			
		||||
qti_radio_ext_resp_name(
 | 
			
		||||
    guint32 resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (resp) {
 | 
			
		||||
#define QTI_RADIO_RESP_(req, resp, name, NAME) \
 | 
			
		||||
        case QTI_RADIO_RESP_##NAME: return #name;
 | 
			
		||||
@@ -193,6 +198,7 @@ static const char*
 | 
			
		||||
qti_radio_ext_ind_name(
 | 
			
		||||
    guint32 ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (ind) {
 | 
			
		||||
#define QTI_RADIO_IND_(code, name, NAME) \
 | 
			
		||||
        case QTI_RADIO_IND_##NAME: return #name;
 | 
			
		||||
@@ -209,6 +215,7 @@ qti_radio_ext_log_req(
 | 
			
		||||
    guint32 code,
 | 
			
		||||
    guint32 serial)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const GLogModule* log = &qti_radio_ext_binder_log_module;
 | 
			
		||||
    const int level = GLOG_LEVEL_VERBOSE;
 | 
			
		||||
    const char* name;
 | 
			
		||||
@@ -233,6 +240,7 @@ qti_radio_ext_log_resp(
 | 
			
		||||
    guint32 code,
 | 
			
		||||
    guint32 serial)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const GLogModule* log = &qti_radio_ext_binder_log_module;
 | 
			
		||||
    const int level = GLOG_LEVEL_VERBOSE;
 | 
			
		||||
    const char* name;
 | 
			
		||||
@@ -252,6 +260,7 @@ qti_radio_ext_log_ind(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    guint32 code)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const GLogModule* log = &qti_radio_ext_binder_log_module;
 | 
			
		||||
    const int level = GLOG_LEVEL_VERBOSE;
 | 
			
		||||
    const char* name;
 | 
			
		||||
@@ -270,6 +279,7 @@ void
 | 
			
		||||
qti_radio_ext_dump_data(
 | 
			
		||||
    const GBinderReader* reader)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const GLogModule* log = &qti_radio_ext_binder_dump_module;
 | 
			
		||||
    const int level = GLOG_LEVEL_VERBOSE;
 | 
			
		||||
    gsize size;
 | 
			
		||||
@@ -287,6 +297,7 @@ void
 | 
			
		||||
qti_radio_ext_dump_request(
 | 
			
		||||
    GBinderLocalRequest* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static const GLogModule* log = &qti_radio_ext_binder_dump_module;
 | 
			
		||||
    const int level = GLOG_LEVEL_VERBOSE;
 | 
			
		||||
    GBinderWriter writer;
 | 
			
		||||
@@ -307,6 +318,7 @@ qti_radio_ext_read_ims_reg_status_info(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    GBinderReader* reader)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const QtiRadioRegInfo* info;
 | 
			
		||||
 | 
			
		||||
    info = gbinder_reader_read_hidl_struct(reader, QtiRadioRegInfo);
 | 
			
		||||
@@ -336,6 +348,7 @@ qti_radio_ext_handle_ims_reg_status_report(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    const GBinderReader* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GBinderReader reader;
 | 
			
		||||
 | 
			
		||||
    gbinder_reader_copy(&reader, args);
 | 
			
		||||
@@ -351,6 +364,7 @@ BINDER_EXT_CALL_STATE
 | 
			
		||||
qti_ims_call_radio_state_to_state(
 | 
			
		||||
    QTI_RADIO_CALL_STATE state)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (state) {
 | 
			
		||||
    case QTI_RADIO_CALL_STATE_INCOMING:
 | 
			
		||||
        return BINDER_EXT_CALL_STATE_INCOMING;
 | 
			
		||||
@@ -380,6 +394,7 @@ qti_ims_call_info_new(
 | 
			
		||||
    GBinderHidlString name
 | 
			
		||||
    )
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const gsize number_len = number.len;
 | 
			
		||||
    const gsize total = G_ALIGN8(sizeof(BinderExtCallInfo)) +
 | 
			
		||||
        G_ALIGN8(number_len + 1);
 | 
			
		||||
@@ -407,6 +422,7 @@ qti_radio_ext_read_call_state_info(
 | 
			
		||||
    QtiRadioCallInfo* call_info_array,
 | 
			
		||||
    gsize count)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    // array of QtiRadioCallInfo
 | 
			
		||||
    GPtrArray* call_ext_info_array = g_ptr_array_new_with_free_func(g_free);
 | 
			
		||||
 | 
			
		||||
@@ -427,6 +443,7 @@ qti_radio_ext_handle_call_state_indication(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    const GBinderReader* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* callInfoIndication(vec<CallInfo> callList) */
 | 
			
		||||
    QtiRadioCallInfo* call_infos;
 | 
			
		||||
    GBinderReader reader;
 | 
			
		||||
@@ -459,6 +476,7 @@ qti_radio_ext_handle_incoming_sms_indication(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    const GBinderReader* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GBinderReader reader;
 | 
			
		||||
    QtiRadioIncomingImsSms* sms;
 | 
			
		||||
 | 
			
		||||
@@ -495,6 +513,7 @@ qti_radio_ext_indication(
 | 
			
		||||
    int* status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExt* self = THIS(user_data);
 | 
			
		||||
    const char* iface = gbinder_remote_request_interface(req);
 | 
			
		||||
    GBinderReader args;
 | 
			
		||||
@@ -544,6 +563,7 @@ qti_radio_ext_add_ims_reg_status_handler(
 | 
			
		||||
    QtiRadioExtImsRegStatusFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(handler)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_IMS_REG_STATUS_CHANGED_NAME, G_CALLBACK(handler), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -554,6 +574,7 @@ qti_radio_ext_add_call_state_handler(
 | 
			
		||||
    QtiRadioExtCallStateFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(handler)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_EXT_CALL_STATE_CHANGED_NAME, G_CALLBACK(handler), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -564,6 +585,7 @@ qti_radio_ext_add_ring_handler(
 | 
			
		||||
    QtiRadioExtRingFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(handler)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_EXT_ON_RING_NAME, G_CALLBACK(handler), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -574,6 +596,7 @@ qti_radio_ext_add_incoming_sms_handler(
 | 
			
		||||
    QtiRadioExtIncomingSmsFunc handler,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(handler)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_EXT_ON_INCOMING_SMS_NAME, G_CALLBACK(handler), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -588,6 +611,7 @@ qti_radio_ext_response(
 | 
			
		||||
    int* status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExt* self = THIS(user_data);
 | 
			
		||||
    const char* iface = gbinder_remote_request_interface(req);
 | 
			
		||||
    GBinderReader reader;
 | 
			
		||||
@@ -625,6 +649,7 @@ qti_radio_ext_result_response(
 | 
			
		||||
    QtiRadioExtRequest* req,
 | 
			
		||||
    const GBinderReader* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gint32 result;
 | 
			
		||||
    GBinderReader reader;
 | 
			
		||||
    QtiRadioExt* self = req->radio;
 | 
			
		||||
@@ -646,6 +671,7 @@ void
 | 
			
		||||
qti_radio_ext_request_default_free(
 | 
			
		||||
    QtiRadioExtRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (req->destroy) {
 | 
			
		||||
        req->destroy(req->user_data);
 | 
			
		||||
    }
 | 
			
		||||
@@ -657,6 +683,7 @@ void
 | 
			
		||||
qti_radio_ext_request_destroy(
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExtRequest* req = user_data;
 | 
			
		||||
 | 
			
		||||
    gbinder_client_cancel(req->radio->client, req->tx);
 | 
			
		||||
@@ -673,6 +700,7 @@ qti_radio_ext_request_alloc(
 | 
			
		||||
    void* user_data,
 | 
			
		||||
    gsize size)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExtRequest* req = g_malloc0(size);
 | 
			
		||||
 | 
			
		||||
    req->radio = self;
 | 
			
		||||
@@ -695,6 +723,7 @@ qti_radio_ext_result_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExtResultRequest* req =
 | 
			
		||||
        (QtiRadioExtResultRequest*)qti_radio_ext_request_alloc(self, resp,
 | 
			
		||||
            qti_radio_ext_result_response, destroy, user_data,
 | 
			
		||||
@@ -712,6 +741,7 @@ qti_radio_ext_request_sent(
 | 
			
		||||
    int status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    ((QtiRadioExtRequest*)user_data)->tx = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -726,6 +756,7 @@ qti_radio_ext_call(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_radio_ext_log_req(self, code, serial);
 | 
			
		||||
    qti_radio_ext_dump_request(req);
 | 
			
		||||
 | 
			
		||||
@@ -738,6 +769,7 @@ qti_radio_ext_cancel(
 | 
			
		||||
    QtiRadioExt* self,
 | 
			
		||||
    guint id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(id)) {
 | 
			
		||||
        g_hash_table_remove(self->requests, KEY(id));
 | 
			
		||||
    }
 | 
			
		||||
@@ -752,6 +784,7 @@ qti_radio_ext_submit_request(
 | 
			
		||||
    gint32 serial,
 | 
			
		||||
    GBinderLocalRequest* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (request->tx = qti_radio_ext_call(request->radio,
 | 
			
		||||
        code, serial, args, qti_radio_ext_request_sent, NULL, request));
 | 
			
		||||
}
 | 
			
		||||
@@ -768,6 +801,7 @@ qti_radio_ext_result_request_submit(
 | 
			
		||||
    void* user_data,
 | 
			
		||||
    ...)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        GBinderLocalRequest* args;
 | 
			
		||||
        GBinderWriter writer;
 | 
			
		||||
@@ -836,6 +870,7 @@ qti_radio_ext_create(
 | 
			
		||||
    const char* slot,
 | 
			
		||||
    const QtiRadioInterfaceDesc* desc)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExt* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
    const gint code = QTI_RADIO_REQ_SET_CALLBACK;
 | 
			
		||||
    GBinderLocalRequest* req;
 | 
			
		||||
@@ -874,6 +909,7 @@ qti_radio_ext_new_with_version(
 | 
			
		||||
    const char* slot,
 | 
			
		||||
    QTI_RADIO_INTERFACE max_version)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExt* self = NULL;
 | 
			
		||||
 | 
			
		||||
    GBinderServiceManager* sm = gbinder_servicemanager_new(dev);
 | 
			
		||||
@@ -916,6 +952,7 @@ qti_radio_ext_new(
 | 
			
		||||
    const char* dev,
 | 
			
		||||
    const char* slot)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_new_with_version(dev, slot, DEFAULT_INTERFACE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -924,6 +961,7 @@ QtiRadioExt*
 | 
			
		||||
qti_radio_ext_ref(
 | 
			
		||||
    QtiRadioExt* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_ref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -934,6 +972,7 @@ void
 | 
			
		||||
qti_radio_ext_unref(
 | 
			
		||||
    QtiRadioExt* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_unref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -945,6 +984,7 @@ qti_radio_ext_set_reg_state_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gbinder_writer_append_int32(args, va_arg(va, gint32));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -953,6 +993,7 @@ QTI_RADIO_REG_STATE
 | 
			
		||||
qti_radio_ext_reg_state(
 | 
			
		||||
    BINDER_EXT_IMS_REGISTRATION state)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (state) {
 | 
			
		||||
    case BINDER_EXT_IMS_REGISTRATION_ON:
 | 
			
		||||
        return QTI_RADIO_REG_STATE_REGISTERED;
 | 
			
		||||
@@ -972,6 +1013,7 @@ qti_radio_ext_set_reg_state(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QTI_RADIO_REG_STATE reg_state = qti_radio_ext_reg_state(state);
 | 
			
		||||
 | 
			
		||||
    DBG("Setting registration state %d", reg_state);
 | 
			
		||||
@@ -992,6 +1034,7 @@ binder_copy_hidl_string(
 | 
			
		||||
    GBinderHidlString* dest,
 | 
			
		||||
    const char* src)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gssize len = src ? strlen(src) : 0;
 | 
			
		||||
    dest->owns_buffer = TRUE;
 | 
			
		||||
    if (len > 0) {
 | 
			
		||||
@@ -1011,6 +1054,7 @@ qti_radio_ext_dial_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioDialRequest* dial_request_writer;
 | 
			
		||||
 | 
			
		||||
    const char* number = va_arg(va, const char*);
 | 
			
		||||
@@ -1103,6 +1147,7 @@ qti_radio_ext_dial(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
        QTI_RADIO_REQ_DIAL,
 | 
			
		||||
        QTI_RADIO_RESP_DIAL,
 | 
			
		||||
@@ -1117,6 +1162,7 @@ qti_radio_ext_answer_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gint32 call_type = va_arg(va, gint32);
 | 
			
		||||
    gint32 presentation = va_arg(va, gint32);
 | 
			
		||||
    gint32 mode = va_arg(va, gint32);
 | 
			
		||||
@@ -1136,6 +1182,7 @@ qti_radio_ext_answer(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
        QTI_RADIO_REQ_ANSWER,
 | 
			
		||||
        QTI_RADIO_RESP_ANSWER,
 | 
			
		||||
@@ -1150,6 +1197,7 @@ qti_radio_ext_hangup_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gint32 call_id = va_arg(va, gint32);
 | 
			
		||||
 | 
			
		||||
    static const GBinderWriterField qti_radio_hangup_request_info_f[] = {
 | 
			
		||||
@@ -1205,6 +1253,7 @@ qti_radio_ext_hangup(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
        QTI_RADIO_REQ_HANGUP_1_2,
 | 
			
		||||
        QTI_RADIO_RESP_HANGUP_1_2,
 | 
			
		||||
@@ -1219,6 +1268,7 @@ qti_radio_ext_send_ims_sms_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* smsc = va_arg(va, const char*);
 | 
			
		||||
    const void* pdu = va_arg(va, const void*);
 | 
			
		||||
    gsize pdu_len = va_arg(va, gsize);
 | 
			
		||||
@@ -1274,6 +1324,7 @@ qti_radio_ext_send_ims_sms(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
        QTI_RADIO_REQ_SEND_IMS_SMS,
 | 
			
		||||
        QTI_RADIO_RESP_SEND_IMS_SMS,
 | 
			
		||||
@@ -1288,6 +1339,7 @@ qti_radio_ext_acknowledge_sms_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    guint32 message_ref = va_arg(va, guint32);
 | 
			
		||||
    guint32 sms_result = va_arg(va, guint32);
 | 
			
		||||
 | 
			
		||||
@@ -1304,6 +1356,7 @@ qti_radio_ext_acknowledge_sms(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QTI_RADIO_IMS_SMS_DELIVER_STATUS_RESULT sms_result_code = sms_result ? QTI_RADIO_DELIVER_STATUS_OK : QTI_RADIO_DELIVER_STATUS_ERROR;
 | 
			
		||||
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
@@ -1323,6 +1376,7 @@ qti_radio_ext_acknowledge_sms_report(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QTI_RADIO_IMS_SMS_STATUS_REPORT_RESULT sms_report_code = sms_report ? QTI_RADIO_STATUS_REPORT_OK : QTI_RADIO_STATUS_REPORT_ERROR;
 | 
			
		||||
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
@@ -1340,6 +1394,7 @@ qti_radio_ext_get_ims_reg_state_args(
 | 
			
		||||
    GBinderWriter* args,
 | 
			
		||||
    va_list va)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    // empty
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1350,6 +1405,7 @@ qti_radio_ext_get_ims_reg_state(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return qti_radio_ext_result_request_submit(self,
 | 
			
		||||
        QTI_RADIO_REQ_GET_IMS_REG_STATE,
 | 
			
		||||
        QTI_RADIO_RESP_GET_IMS_REG_STATE,
 | 
			
		||||
@@ -1366,6 +1422,7 @@ void
 | 
			
		||||
qti_radio_ext_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiRadioExt* self = THIS(object);
 | 
			
		||||
 | 
			
		||||
    g_free(self->slot);
 | 
			
		||||
@@ -1377,6 +1434,7 @@ void
 | 
			
		||||
qti_radio_ext_init(
 | 
			
		||||
    QtiRadioExt* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    self->pool = gutil_idle_pool_new();
 | 
			
		||||
    self->requests = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
 | 
			
		||||
        qti_radio_ext_request_destroy);
 | 
			
		||||
@@ -1387,6 +1445,7 @@ void
 | 
			
		||||
qti_radio_ext_class_init(
 | 
			
		||||
    QtiRadioExtClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = qti_radio_ext_finalize;
 | 
			
		||||
    qti_radio_ext_signals[SIGNAL_IMS_REG_STATUS_CHANGED] =
 | 
			
		||||
        g_signal_new(SIGNAL_IMS_REG_STATUS_CHANGED_NAME, G_OBJECT_CLASS_TYPE(klass),
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,7 @@ void
 | 
			
		||||
qti_slot_terminate(
 | 
			
		||||
    QtiSlot* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (self->ims) {
 | 
			
		||||
        binder_ext_ims_unref(self->ims);
 | 
			
		||||
        self->ims = NULL;
 | 
			
		||||
@@ -88,6 +89,7 @@ qti_slot_get_interface(
 | 
			
		||||
    BinderExtSlot* slot,
 | 
			
		||||
    GType iface)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiSlot* self = THIS(slot);
 | 
			
		||||
 | 
			
		||||
    if (iface == BINDER_EXT_TYPE_IMS) {
 | 
			
		||||
@@ -106,6 +108,7 @@ void
 | 
			
		||||
qti_slot_shutdown(
 | 
			
		||||
    BinderExtSlot* slot)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_slot_terminate(THIS(slot));
 | 
			
		||||
    BINDER_EXT_SLOT_CLASS(PARENT_CLASS)->shutdown(slot);
 | 
			
		||||
}
 | 
			
		||||
@@ -119,6 +122,7 @@ qti_slot_new(
 | 
			
		||||
    RadioInstance* radio,
 | 
			
		||||
    GHashTable* params)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    QtiSlot* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
    BinderExtSlot* slot = &self->parent;
 | 
			
		||||
    char* radio_slot =  g_strdup_printf("imsradio%d", radio->slot_index);
 | 
			
		||||
@@ -144,6 +148,7 @@ void
 | 
			
		||||
qti_slot_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    qti_slot_terminate(THIS(object));
 | 
			
		||||
    G_OBJECT_CLASS(PARENT_CLASS)->finalize(object);
 | 
			
		||||
}
 | 
			
		||||
@@ -153,6 +158,7 @@ void
 | 
			
		||||
qti_slot_init(
 | 
			
		||||
    QtiSlot* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static
 | 
			
		||||
@@ -160,6 +166,7 @@ void
 | 
			
		||||
qti_slot_class_init(
 | 
			
		||||
    QtiSlotClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    klass->get_interface = qti_slot_get_interface;
 | 
			
		||||
    klass->shutdown = qti_slot_shutdown;
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = qti_slot_finalize;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user