Home | History | Annotate | Download | only in health

Lines Matching refs:dc_data

129 static void free_hdp_create_dc(struct hdp_create_dc *dc_data)
131 dbus_message_unref(dc_data->msg);
132 dbus_connection_unref(dc_data->conn);
133 hdp_application_unref(dc_data->app);
134 health_device_unref(dc_data->dev);
136 g_free(dc_data);
139 static struct hdp_create_dc *hdp_create_data_ref(struct hdp_create_dc *dc_data)
141 dc_data->ref++;
143 DBG("hdp_create_data_ref(%p): ref=%d", dc_data, dc_data->ref);
145 return dc_data;
148 static void hdp_create_data_unref(struct hdp_create_dc *dc_data)
150 dc_data->ref--;
152 DBG("hdp_create_data_unref(%p): ref=%d", dc_data, dc_data->ref);
154 if (dc_data->ref > 0)
157 free_hdp_create_dc(dc_data);
502 struct hdp_tmp_dc_data *dc_data = data;
507 struct hdp_channel *chan = dc_data->hdp_chann;
511 reply = g_dbus_create_error(dc_data->msg,
514 g_dbus_send_message(dc_data->conn, reply);
526 fd = mcap_mdl_get_fd(dc_data->hdp_chann->mdl);
528 reply = g_dbus_create_error(dc_data->msg,
531 g_dbus_send_message(dc_data->conn, reply);
535 reply = g_dbus_create_reply(dc_data->msg, DBUS_TYPE_UNIX_FD,
537 g_dbus_send_message(dc_data->conn, reply);
539 g_dbus_emit_signal(dc_data->conn,
540 device_get_path(dc_data->hdp_chann->dev->dev),
542 DBUS_TYPE_OBJECT_PATH, &dc_data->hdp_chann->path,
577 struct hdp_tmp_dc_data *dc_data = data;
582 reply = g_dbus_create_error(dc_data->msg,
585 g_dbus_send_message(dc_data->conn, reply);
589 dc_data->cb = hdp_mdl_reconn_cb;
591 if (hdp_get_dcpsm(dc_data->hdp_chann->dev, hdp_get_dcpsm_cb,
592 hdp_tmp_dc_data_ref(dc_data),
598 reply = g_dbus_create_error(dc_data->msg,
601 g_dbus_send_message(dc_data->conn, reply);
602 hdp_tmp_dc_data_unref(dc_data);
645 struct hdp_tmp_dc_data *dc_data = data;
651 g_dbus_send_message(dc_data->conn, reply);
658 struct hdp_tmp_dc_data *dc_data;
662 dc_data = g_new0(struct hdp_tmp_dc_data, 1);
663 dc_data->conn = dbus_connection_ref(conn);
664 dc_data->msg = dbus_message_ref(msg);
665 dc_data->hdp_chann = hdp_channel_ref(chan);
668 reply = channel_acquire_continue(hdp_tmp_dc_data_ref(dc_data),
670 hdp_tmp_dc_data_unref(dc_data);
675 hdp_tmp_dc_data_ref(dc_data),
681 hdp_tmp_dc_data_unref(dc_data);
1482 struct hdp_create_dc *dc_data = data;
1484 hdp_create_data_unref(dc_data);
1860 struct hdp_create_dc *dc_data, *user_data = data;
1872 dc_data = hdp_create_data_ref(user_data);
1873 dc_data->mdep = mdep;
1876 device_create_dc_cb(dc_data, NULL);
1877 hdp_create_data_unref(dc_data);
1881 if (hdp_establish_mcl(dc_data->dev, device_create_dc_cb,
1882 dc_data, destroy_create_dc_data, &gerr))
1888 hdp_create_data_unref(dc_data);