debug logs
This commit is contained in:
		@@ -92,6 +92,7 @@ guint32
 | 
			
		||||
radio_base_reserve_serial(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /*
 | 
			
		||||
     * Using a static counter practically guarantees that different
 | 
			
		||||
     * serials would never be in use simultanously by different
 | 
			
		||||
@@ -114,6 +115,7 @@ radio_base_unlink_request(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    RadioRequest* prev)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequest* next = req->queue_next;
 | 
			
		||||
 | 
			
		||||
    if (prev) {
 | 
			
		||||
@@ -134,6 +136,7 @@ radio_base_dequeue_request(
 | 
			
		||||
    RadioBasePriv* q,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequest* ptr = q->queue_first;
 | 
			
		||||
    RadioRequest* prev = NULL;
 | 
			
		||||
 | 
			
		||||
@@ -154,6 +157,7 @@ radio_base_deactivate_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    g_hash_table_remove(priv->pending, KEY(req->serial2));
 | 
			
		||||
@@ -177,6 +181,7 @@ radio_base_drop_req(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_base_cancel_request(self, req);
 | 
			
		||||
    radio_base_deactivate_request(self, req);
 | 
			
		||||
    radio_base_reset_timeout(self);
 | 
			
		||||
@@ -192,6 +197,7 @@ radio_base_detach_req(
 | 
			
		||||
    gpointer value,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequest* req = value;
 | 
			
		||||
 | 
			
		||||
    radio_base_cancel_request(THIS(user_data), req);
 | 
			
		||||
@@ -206,6 +212,7 @@ radio_base_fail_request(
 | 
			
		||||
    RADIO_REQUEST_STATE state,
 | 
			
		||||
    RADIO_TX_STATUS status)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_request_ref(req);
 | 
			
		||||
    req->state = state;
 | 
			
		||||
    if (req->complete) {
 | 
			
		||||
@@ -225,6 +232,7 @@ radio_base_request_failed(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_base_fail_request(self, req,
 | 
			
		||||
        RADIO_REQUEST_STATE_FAILED,
 | 
			
		||||
        RADIO_TX_STATUS_FAILED);
 | 
			
		||||
@@ -237,6 +245,7 @@ radio_base_request_sent(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    int status)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    req->tx_id = 0;
 | 
			
		||||
    if (status != GBINDER_STATUS_OK) {
 | 
			
		||||
        g_object_ref(self);
 | 
			
		||||
@@ -251,6 +260,7 @@ radio_base_submit_transaction(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    if (req->serial2) {
 | 
			
		||||
@@ -300,6 +310,7 @@ radio_base_can_set_owner(
 | 
			
		||||
    RadioBasePriv* priv,
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /*
 | 
			
		||||
     * Caller has verified that the group isn't already the owner.
 | 
			
		||||
     * It's also been checked that either the owner queue is empty,
 | 
			
		||||
@@ -340,6 +351,7 @@ void
 | 
			
		||||
radio_base_move_owner_queue(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    if (!priv->owner && priv->owner_queue) {
 | 
			
		||||
@@ -362,6 +374,7 @@ radio_base_can_submit_request(
 | 
			
		||||
    RadioBasePriv* priv,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (priv->block_req) {
 | 
			
		||||
        /* The current blocker can be resubmitted */
 | 
			
		||||
        return priv->block_req == req;
 | 
			
		||||
@@ -401,6 +414,7 @@ radio_base_queue_request(
 | 
			
		||||
    RadioBasePriv* priv,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    req->state = RADIO_REQUEST_STATE_QUEUED;
 | 
			
		||||
    if (priv->queue_last) {
 | 
			
		||||
        priv->queue_last->queue_next = req;
 | 
			
		||||
@@ -415,6 +429,7 @@ guint
 | 
			
		||||
radio_base_submit_queued_requests(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
    guint submitted = 0;
 | 
			
		||||
 | 
			
		||||
@@ -461,6 +476,7 @@ gboolean
 | 
			
		||||
radio_base_timeout(
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBase* self = THIS(user_data);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
    const gint64 now = g_get_monotonic_time();
 | 
			
		||||
@@ -529,6 +545,7 @@ void
 | 
			
		||||
radio_base_initialize(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
@@ -536,6 +553,7 @@ radio_base_register_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller makes sure that both arguments are not NULL */
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
@@ -549,6 +567,7 @@ radio_base_unregister_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller doesn't check base for NULL */
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        RadioBasePriv* priv = self->priv;
 | 
			
		||||
@@ -566,6 +585,7 @@ radio_base_submit_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /*
 | 
			
		||||
     * Caller makes sure that both arguments are not NULL. Note that if the
 | 
			
		||||
     * base is dead, request stays in the NEW state and can be resubmitted
 | 
			
		||||
@@ -603,6 +623,7 @@ radio_base_retry_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller makes sure that both arguments are not NULL */
 | 
			
		||||
    if (req->state == RADIO_REQUEST_STATE_PENDING &&
 | 
			
		||||
        radio_base_can_retry(req)) {
 | 
			
		||||
@@ -627,6 +648,7 @@ void
 | 
			
		||||
radio_base_request_dropped(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (req->object) {
 | 
			
		||||
        radio_base_drop_req(req->object, req);
 | 
			
		||||
    }
 | 
			
		||||
@@ -637,6 +659,7 @@ radio_base_timeout_ms(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller checks object pointer for NULL */
 | 
			
		||||
    return req->timeout_ms ? req->timeout_ms : self->priv->default_timeout_ms;
 | 
			
		||||
}
 | 
			
		||||
@@ -645,6 +668,7 @@ void
 | 
			
		||||
radio_base_reset_timeout(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    if (g_hash_table_size(priv->active)) {
 | 
			
		||||
@@ -707,6 +731,7 @@ radio_base_block_status(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    /* Caller checks object pointer for NULL */
 | 
			
		||||
@@ -724,6 +749,7 @@ radio_base_block(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
    /* Caller checks object pointer for NULL */
 | 
			
		||||
@@ -750,6 +776,7 @@ radio_base_unblock(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Parameters are checked by the caller */
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
@@ -778,6 +805,7 @@ radio_base_handle_resp(
 | 
			
		||||
    const RadioResponseInfo* info,
 | 
			
		||||
    const GBinderReader* reader)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
    RadioRequest* req = g_hash_table_lookup(priv->active, KEY(info->serial));
 | 
			
		||||
 | 
			
		||||
@@ -829,6 +857,7 @@ radio_base_handle_ack(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    guint32 serial)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
    RadioRequest* req = g_hash_table_lookup(priv->active, KEY(serial));
 | 
			
		||||
 | 
			
		||||
@@ -844,6 +873,7 @@ void
 | 
			
		||||
radio_base_handle_death(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
    RadioRequest* dead = NULL;
 | 
			
		||||
    RadioRequest* req;
 | 
			
		||||
@@ -890,6 +920,7 @@ void
 | 
			
		||||
radio_base_submit_requests(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (radio_base_submit_queued_requests(self)) {
 | 
			
		||||
        radio_base_reset_timeout(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -900,6 +931,7 @@ radio_base_cancel_request(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    req->scheduled = 0;
 | 
			
		||||
    if (req->tx_id) {
 | 
			
		||||
        RADIO_BASE_GET_CLASS(self)->cancel_request(self, req->tx_id);
 | 
			
		||||
@@ -912,6 +944,7 @@ radio_base_set_default_timeout(
 | 
			
		||||
    RadioBase* self,
 | 
			
		||||
    int ms)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller checks object pointer for NULL */
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
@@ -948,6 +981,7 @@ radio_base_add_owner_changed_handler(
 | 
			
		||||
    RadioBaseFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    /* Caller checks object pointer for NULL */
 | 
			
		||||
    return G_LIKELY(fn) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self, radio_base_signals[SIGNAL_OWNER],
 | 
			
		||||
@@ -963,6 +997,7 @@ void
 | 
			
		||||
radio_base_init(
 | 
			
		||||
    RadioBase* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBasePriv* priv = G_TYPE_INSTANCE_GET_PRIVATE(self, RADIO_TYPE_BASE,
 | 
			
		||||
        RadioBasePriv);
 | 
			
		||||
 | 
			
		||||
@@ -980,6 +1015,7 @@ void
 | 
			
		||||
radio_base_object_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBase* self = THIS(object);
 | 
			
		||||
    RadioBasePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
@@ -998,6 +1034,7 @@ void
 | 
			
		||||
radio_base_class_init(
 | 
			
		||||
    RadioBaseClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    g_type_class_add_private(klass, sizeof(RadioBasePriv));
 | 
			
		||||
    G_OBJECT_CLASS(klass)->finalize = radio_base_object_finalize;
 | 
			
		||||
    radio_base_signals[SIGNAL_OWNER] = g_signal_new(SIGNAL_OWNER_NAME,
 | 
			
		||||
 
 | 
			
		||||
@@ -96,6 +96,7 @@ void
 | 
			
		||||
radio_client_call_free(
 | 
			
		||||
    RadioClientCall* call)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_request_unref(call->req);
 | 
			
		||||
    gutil_slice_free(call);
 | 
			
		||||
}
 | 
			
		||||
@@ -106,6 +107,7 @@ radio_client_call_destroy(
 | 
			
		||||
    void* user_data1,
 | 
			
		||||
    void* user_data2)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_client_call_free(user_data2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -118,6 +120,7 @@ radio_client_call_complete(
 | 
			
		||||
    void* user_data1,
 | 
			
		||||
    void* user_data2)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioClientCall* call = user_data2;
 | 
			
		||||
 | 
			
		||||
    call->callback(RADIO_BASE(user_data1), call->req, status);
 | 
			
		||||
@@ -129,6 +132,7 @@ radio_client_handle_death(
 | 
			
		||||
    RadioInstance* instance,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBase* base = RADIO_BASE(user_data);
 | 
			
		||||
 | 
			
		||||
    g_object_ref(base);
 | 
			
		||||
@@ -143,6 +147,7 @@ radio_client_handle_connected(
 | 
			
		||||
    RadioInstance* instance,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    g_signal_emit(THIS(user_data), radio_client_signals[SIGNAL_CONNECTED], 0);
 | 
			
		||||
    radio_base_submit_requests(RADIO_BASE(user_data));
 | 
			
		||||
}
 | 
			
		||||
@@ -154,6 +159,7 @@ radio_client_handle_ack(
 | 
			
		||||
    guint32 serial,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_base_handle_ack(RADIO_BASE(user_data), serial);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -166,6 +172,7 @@ radio_client_handle_ind(
 | 
			
		||||
    const GBinderReader* reader,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    g_signal_emit(THIS(user_data), radio_client_signals[SIGNAL_INDICATION],
 | 
			
		||||
        radio_instance_ind_quark(instance, code), code, reader);
 | 
			
		||||
}
 | 
			
		||||
@@ -179,6 +186,7 @@ radio_client_handle_resp(
 | 
			
		||||
    const GBinderReader* reader,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!radio_base_handle_resp(RADIO_BASE(user_data), code, info, reader)) {
 | 
			
		||||
        const char* name = radio_resp_name2(instance, code);
 | 
			
		||||
 | 
			
		||||
@@ -196,6 +204,7 @@ radio_client_add_handler(
 | 
			
		||||
    RadioClientFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(fn)) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self, radio_client_signals[sig], 0,
 | 
			
		||||
             g_cclosure_new(G_CALLBACK(fn), user_data, NULL), FALSE) : 0;
 | 
			
		||||
@@ -209,6 +218,7 @@ RadioClient*
 | 
			
		||||
radio_client_new(
 | 
			
		||||
    RadioInstance* instance)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioClient* self = NULL;
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(instance)) {
 | 
			
		||||
@@ -238,6 +248,7 @@ RadioClient*
 | 
			
		||||
radio_client_ref(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_ref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -248,6 +259,7 @@ void
 | 
			
		||||
radio_client_unref(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_unref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -257,6 +269,7 @@ const char*
 | 
			
		||||
radio_client_slot(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(self) ? self->instance->slot : NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -264,6 +277,7 @@ gboolean
 | 
			
		||||
radio_client_dead(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return !self || self->instance->dead;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -271,6 +285,7 @@ gboolean
 | 
			
		||||
radio_client_connected(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return self && self->instance->connected;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -278,6 +293,7 @@ RADIO_INTERFACE
 | 
			
		||||
radio_client_interface(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(self) ? self->instance->version : RADIO_INTERFACE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -285,6 +301,7 @@ RADIO_AIDL_INTERFACE
 | 
			
		||||
radio_client_aidl_interface(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(self) ? self->instance->interface_aidl : RADIO_AIDL_INTERFACE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -293,6 +310,7 @@ radio_client_set_default_timeout(
 | 
			
		||||
    RadioClient* self,
 | 
			
		||||
    int milliseconds)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        radio_base_set_default_timeout(&self->base, milliseconds);
 | 
			
		||||
    }
 | 
			
		||||
@@ -305,6 +323,7 @@ radio_client_add_indication_handler(
 | 
			
		||||
    RadioClientIndicationFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(fn)) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self,
 | 
			
		||||
            radio_client_signals[SIGNAL_INDICATION],
 | 
			
		||||
@@ -318,6 +337,7 @@ radio_client_add_owner_changed_handler(
 | 
			
		||||
    RadioClientFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return self ? radio_base_add_owner_changed_handler(&self->base,
 | 
			
		||||
        (RadioBaseFunc) fn, user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -328,6 +348,7 @@ radio_client_add_death_handler(
 | 
			
		||||
    RadioClientFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_client_add_handler(self, SIGNAL_DEATH, fn, user_data);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -337,6 +358,7 @@ radio_client_add_connected_handler(
 | 
			
		||||
    RadioClientFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_client_add_handler(self, SIGNAL_CONNECTED, fn, user_data);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -345,6 +367,7 @@ radio_client_remove_handler(
 | 
			
		||||
    RadioClient* self,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(id) && G_LIKELY(self)) {
 | 
			
		||||
        g_signal_handler_disconnect(self, id);
 | 
			
		||||
    }
 | 
			
		||||
@@ -356,6 +379,7 @@ radio_client_remove_handlers(
 | 
			
		||||
    gulong* ids,
 | 
			
		||||
    int count)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gutil_disconnect_handlers(self, ids, count);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -368,6 +392,7 @@ gboolean
 | 
			
		||||
radio_client_is_dead(
 | 
			
		||||
    RadioBase* base)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return THIS(base)->instance->dead;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -376,6 +401,7 @@ gboolean
 | 
			
		||||
radio_client_can_submit_requests(
 | 
			
		||||
    RadioBase* base)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return THIS(base)->instance->connected;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -385,6 +411,7 @@ radio_client_new_request(
 | 
			
		||||
    RadioBase* base,
 | 
			
		||||
    guint32 code)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_new_request(THIS(base)->instance, code);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -395,6 +422,7 @@ radio_client_send_request(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    RadioBaseRequestSentFunc callback)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioClientCall* call = g_slice_new(RadioClientCall);
 | 
			
		||||
    gulong tx_id;
 | 
			
		||||
 | 
			
		||||
@@ -417,6 +445,7 @@ radio_client_cancel_request(
 | 
			
		||||
    RadioBase* base,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_instance_cancel_request(THIS(base)->instance, id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -429,6 +458,7 @@ void
 | 
			
		||||
radio_client_init(
 | 
			
		||||
    RadioClient* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static
 | 
			
		||||
@@ -436,6 +466,7 @@ void
 | 
			
		||||
radio_client_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioClient* self = THIS(object);
 | 
			
		||||
 | 
			
		||||
    radio_instance_remove_all_handlers(self->instance, self->event_ids);
 | 
			
		||||
@@ -448,6 +479,7 @@ void
 | 
			
		||||
radio_client_class_init(
 | 
			
		||||
    RadioClientClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBaseClass* base_class = RADIO_BASE_CLASS(klass);
 | 
			
		||||
    GObjectClass* object_class = G_OBJECT_CLASS(klass);
 | 
			
		||||
    GType type = G_OBJECT_CLASS_TYPE(klass);
 | 
			
		||||
 
 | 
			
		||||
@@ -223,6 +223,7 @@ void
 | 
			
		||||
radio_config_call_free(
 | 
			
		||||
    RadioConfigCall* call)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_request_unref(call->req);
 | 
			
		||||
    gutil_slice_free(call);
 | 
			
		||||
}
 | 
			
		||||
@@ -235,6 +236,7 @@ radio_config_call_complete(
 | 
			
		||||
    int status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfigCall* call = user_data;
 | 
			
		||||
 | 
			
		||||
    call->callback(call->object, call->req, status);
 | 
			
		||||
@@ -246,6 +248,7 @@ radio_config_known_req_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(self) || self->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (req) {
 | 
			
		||||
        case RADIO_CONFIG_REQ_SET_RESPONSE_FUNCTIONS: return "setResponseFunctions";
 | 
			
		||||
@@ -278,6 +281,7 @@ radio_config_known_resp_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(self) || self->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (resp) {
 | 
			
		||||
#define RADIO_CONFIG_RESP_(req,resp,Name,NAME) \
 | 
			
		||||
@@ -309,6 +313,7 @@ radio_config_known_ind_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(self) || self->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (ind) {
 | 
			
		||||
#define RADIO_CONFIG_IND_(code,Name,NAME) \
 | 
			
		||||
@@ -339,6 +344,7 @@ radio_config_req_quark(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GQuark q = 0;
 | 
			
		||||
 | 
			
		||||
    if (req != RADIO_CONFIG_REQ_ANY) {
 | 
			
		||||
@@ -365,6 +371,7 @@ radio_config_resp_quark(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GQuark q = 0;
 | 
			
		||||
 | 
			
		||||
    if (resp != RADIO_CONFIG_RESP_ANY) {
 | 
			
		||||
@@ -391,6 +398,7 @@ radio_config_ind_quark(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GQuark q = 0;
 | 
			
		||||
 | 
			
		||||
    if (ind != RADIO_CONFIG_IND_ANY) {
 | 
			
		||||
@@ -421,6 +429,7 @@ radio_config_indication(
 | 
			
		||||
    int* status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = THIS(user_data);
 | 
			
		||||
    const char* iface = gbinder_remote_request_interface(req);
 | 
			
		||||
 | 
			
		||||
@@ -466,6 +475,7 @@ radio_config_response(
 | 
			
		||||
    int* status,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = THIS(user_data);
 | 
			
		||||
    const char* iface = gbinder_remote_request_interface(req);
 | 
			
		||||
    const RadioResponseInfo* info = NULL;
 | 
			
		||||
@@ -534,6 +544,7 @@ void
 | 
			
		||||
radio_config_drop_binder(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (self->indication) {
 | 
			
		||||
        gbinder_local_object_drop(self->indication);
 | 
			
		||||
        self->indication = NULL;
 | 
			
		||||
@@ -556,6 +567,7 @@ radio_config_died(
 | 
			
		||||
    GBinderRemoteObject* obj,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = THIS(user_data);
 | 
			
		||||
 | 
			
		||||
    GWARN("IRadioConfig died");
 | 
			
		||||
@@ -576,6 +588,7 @@ radio_config_gone(
 | 
			
		||||
    gpointer user_data,
 | 
			
		||||
    GObject* dead)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GObject** shared_instance = user_data;
 | 
			
		||||
 | 
			
		||||
    if (*shared_instance == dead) {
 | 
			
		||||
@@ -591,6 +604,7 @@ radio_config_create(
 | 
			
		||||
    GBinderRemoteObject* remote,
 | 
			
		||||
    const RadioConfigInterfaceDesc* desc)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = g_object_new(THIS_TYPE, NULL);
 | 
			
		||||
    GBinderLocalRequest* req;
 | 
			
		||||
    GBinderWriter writer;
 | 
			
		||||
@@ -643,6 +657,7 @@ RadioConfig*
 | 
			
		||||
radio_config_new(
 | 
			
		||||
    void)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_config_new_with_version(RADIO_CONFIG_INTERFACE_MAX);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -650,6 +665,7 @@ RadioConfig*
 | 
			
		||||
radio_config_new_with_version(
 | 
			
		||||
    RADIO_CONFIG_INTERFACE max_version)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_config_new_with_version_and_interface_type(max_version,
 | 
			
		||||
        RADIO_INTERFACE_TYPE_HIDL);
 | 
			
		||||
}
 | 
			
		||||
@@ -659,6 +675,7 @@ radio_config_new_with_version_and_interface_type(
 | 
			
		||||
    RADIO_CONFIG_INTERFACE max_version,
 | 
			
		||||
    RADIO_INTERFACE_TYPE interface_type)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    static RadioConfig** instances = NULL;
 | 
			
		||||
    const RadioConfigInterfaceDesc* interfaces = NULL;
 | 
			
		||||
    gsize num_interfaces = 0;
 | 
			
		||||
@@ -740,6 +757,7 @@ RadioConfig*
 | 
			
		||||
radio_config_ref(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_ref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -750,6 +768,7 @@ void
 | 
			
		||||
radio_config_unref(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_unref(self);
 | 
			
		||||
    }
 | 
			
		||||
@@ -759,6 +778,7 @@ gboolean
 | 
			
		||||
radio_config_dead(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_UNLIKELY(!self) || self->dead;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -766,6 +786,7 @@ RADIO_INTERFACE_TYPE
 | 
			
		||||
radio_config_interface_type(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(self) ? self->interface_type : RADIO_INTERFACE_TYPE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -773,6 +794,7 @@ RADIO_CONFIG_INTERFACE
 | 
			
		||||
radio_config_interface(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(self) ? self->version : RADIO_CONFIG_INTERFACE_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -781,6 +803,7 @@ radio_config_rpc_header_size(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        GBytes* header = gbinder_client_rpc_header(self->client, req);
 | 
			
		||||
 | 
			
		||||
@@ -796,6 +819,7 @@ radio_config_req_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_config_known_req_name(self, req);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -815,6 +839,7 @@ radio_config_resp_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_config_known_resp_name(self, resp);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -834,6 +859,7 @@ radio_config_ind_name(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    RADIO_CONFIG_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_config_known_ind_name(self, ind);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -854,6 +880,7 @@ radio_config_add_death_handler(
 | 
			
		||||
    RadioConfigFunc fn,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(fn)) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self,
 | 
			
		||||
             radio_config_signals[SIGNAL_DEATH], 0,
 | 
			
		||||
@@ -867,6 +894,7 @@ radio_config_add_request_observer(
 | 
			
		||||
    RadioConfigRequestObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_config_add_request_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -879,6 +907,7 @@ radio_config_add_request_observer_with_priority(
 | 
			
		||||
    RadioConfigRequestObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint index = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_CONFIG_SIGNAL sig = SIGNAL_OBSERVE_REQUEST_0 + index;
 | 
			
		||||
@@ -907,6 +936,7 @@ radio_config_add_response_observer(
 | 
			
		||||
    RadioConfigResponseObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_config_add_response_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -919,6 +949,7 @@ radio_config_add_response_observer_with_priority(
 | 
			
		||||
    RadioConfigResponseObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint index = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_CONFIG_SIGNAL sig = SIGNAL_OBSERVE_RESPONSE_0 + index;
 | 
			
		||||
@@ -947,6 +978,7 @@ radio_config_add_indication_observer(
 | 
			
		||||
    RadioConfigIndicationObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_config_add_indication_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -959,6 +991,7 @@ radio_config_add_indication_observer_with_priority(
 | 
			
		||||
    RadioConfigIndicationObserverFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint pi = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_CONFIG_SIGNAL sig = SIGNAL_OBSERVE_INDICATION_0 + pi;
 | 
			
		||||
@@ -985,6 +1018,7 @@ radio_config_remove_handler(
 | 
			
		||||
    RadioConfig* self,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(id)) {
 | 
			
		||||
        g_signal_handler_disconnect(self, id);
 | 
			
		||||
    }
 | 
			
		||||
@@ -996,6 +1030,7 @@ radio_config_remove_handlers(
 | 
			
		||||
    gulong* ids,
 | 
			
		||||
    int count)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gutil_disconnect_handlers(self, ids, count);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1008,6 +1043,7 @@ gboolean
 | 
			
		||||
radio_config_is_dead(
 | 
			
		||||
    RadioBase* base)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return THIS(base)->dead;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1016,6 +1052,7 @@ gboolean
 | 
			
		||||
radio_config_can_submit_requests(
 | 
			
		||||
    RadioBase* base)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return !radio_config_is_dead(base);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1025,6 +1062,7 @@ radio_config_new_request(
 | 
			
		||||
    RadioBase* base,
 | 
			
		||||
    guint32 code)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return gbinder_client_new_request2(THIS(base)->client, code);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1035,6 +1073,7 @@ radio_config_send_request(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    RadioBaseRequestSentFunc callback)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = THIS(base);
 | 
			
		||||
    RadioConfigCall* call = g_slice_new(RadioConfigCall);
 | 
			
		||||
    GQuark quark = 0;
 | 
			
		||||
@@ -1075,6 +1114,7 @@ radio_config_cancel_request(
 | 
			
		||||
    RadioBase* base,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gbinder_client_cancel(THIS(base)->client, id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1087,6 +1127,7 @@ void
 | 
			
		||||
radio_config_init(
 | 
			
		||||
    RadioConfig* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    self->version = RADIO_CONFIG_INTERFACE_NONE;
 | 
			
		||||
    self->pool = gutil_idle_pool_new();
 | 
			
		||||
    self->req_quarks = g_hash_table_new(g_direct_hash, g_direct_equal);
 | 
			
		||||
@@ -1099,6 +1140,7 @@ void
 | 
			
		||||
radio_config_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioConfig* self = THIS(object);
 | 
			
		||||
 | 
			
		||||
    radio_config_drop_binder(self);
 | 
			
		||||
@@ -1115,6 +1157,7 @@ void
 | 
			
		||||
radio_config_class_init(
 | 
			
		||||
    RadioConfigClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioBaseClass* base_class = RADIO_BASE_CLASS(klass);
 | 
			
		||||
    GObjectClass* object_class = G_OBJECT_CLASS(klass);
 | 
			
		||||
    GType type = G_OBJECT_CLASS_TYPE(klass);
 | 
			
		||||
 
 | 
			
		||||
@@ -1021,6 +1021,7 @@ radio_instance_new_with_modem_slot_and_version(
 | 
			
		||||
    int slot,
 | 
			
		||||
    RADIO_INTERFACE version) /* Since 1.2.1 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_new_with_modem_slot_version_and_interface(
 | 
			
		||||
        dev, name, modem, slot, version, RADIO_AIDL_INTERFACE_NONE);
 | 
			
		||||
}
 | 
			
		||||
@@ -1034,6 +1035,7 @@ radio_instance_new_with_modem_slot_version_and_interface(
 | 
			
		||||
    RADIO_INTERFACE version,
 | 
			
		||||
    RADIO_AIDL_INTERFACE aidl_interface) /* Since 1.6.0 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (dev && dev[0] && name && name[0]) {
 | 
			
		||||
        /* HIDL and AIDL would use different binder devices */
 | 
			
		||||
        char* key = radio_instance_make_key(dev, name, version, aidl_interface);
 | 
			
		||||
@@ -1069,6 +1071,7 @@ radio_instance_get(
 | 
			
		||||
    const char* dev,
 | 
			
		||||
    const char* name)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_get_with_version(dev, name, DEFAULT_INTERFACE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1078,6 +1081,7 @@ radio_instance_get_with_interface(
 | 
			
		||||
    const char* name,
 | 
			
		||||
    RADIO_INTERFACE version) /* 1.2.1, deprecated */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_get_with_version(dev, name, version);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1087,6 +1091,7 @@ radio_instance_get_with_version(
 | 
			
		||||
    const char* name,
 | 
			
		||||
    RADIO_INTERFACE version) /* Since 1.2.2 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioInstance* self = NULL;
 | 
			
		||||
 | 
			
		||||
    if (dev && dev[0] && name && name[0] && radio_instance_table) {
 | 
			
		||||
@@ -1102,6 +1107,7 @@ RadioInstance* const*
 | 
			
		||||
radio_instance_get_all(
 | 
			
		||||
    void)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (radio_instance_table) {
 | 
			
		||||
        /* If the table exists, it must be non-empty */
 | 
			
		||||
        const guint n = g_hash_table_size(radio_instance_table);
 | 
			
		||||
@@ -1127,6 +1133,7 @@ RadioInstance*
 | 
			
		||||
radio_instance_ref(
 | 
			
		||||
    RadioInstance* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_ref(RADIO_INSTANCE(self));
 | 
			
		||||
        return self;
 | 
			
		||||
@@ -1139,6 +1146,7 @@ void
 | 
			
		||||
radio_instance_unref(
 | 
			
		||||
    RadioInstance* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_unref(RADIO_INSTANCE(self));
 | 
			
		||||
    }
 | 
			
		||||
@@ -1149,6 +1157,7 @@ radio_instance_rpc_header_size(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    RADIO_REQ req) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        RadioInstancePriv* priv = self->priv;
 | 
			
		||||
        GBytes* header = gbinder_client_rpc_header(priv->client, req);
 | 
			
		||||
@@ -1165,6 +1174,7 @@ radio_instance_req_name(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    RADIO_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_req_name2(self, req);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -1184,6 +1194,7 @@ radio_instance_resp_name(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    RADIO_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_resp_name2(self, resp);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -1203,6 +1214,7 @@ radio_instance_ind_name(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    RADIO_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    const char* known = radio_ind_name2(self, ind);
 | 
			
		||||
 | 
			
		||||
    if (known) {
 | 
			
		||||
@@ -1221,6 +1233,7 @@ gboolean
 | 
			
		||||
radio_instance_is_dead(
 | 
			
		||||
    RadioInstance* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_UNLIKELY(!self) || self->dead;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1228,6 +1241,7 @@ gboolean
 | 
			
		||||
radio_instance_ack(
 | 
			
		||||
    RadioInstance* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        GBinderClient* client = self->priv->client;
 | 
			
		||||
        const RADIO_REQ code = RADIO_REQ_RESPONSE_ACKNOWLEDGEMENT;
 | 
			
		||||
@@ -1243,6 +1257,7 @@ radio_instance_new_request(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    RADIO_REQ code)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        return gbinder_client_new_request2(self->priv->client, code);
 | 
			
		||||
    }
 | 
			
		||||
@@ -1255,6 +1270,7 @@ radio_instance_send_request_sync(
 | 
			
		||||
    RADIO_REQ code,
 | 
			
		||||
    GBinderLocalRequest* args)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        GBinderClient* client = self->priv->client;
 | 
			
		||||
 | 
			
		||||
@@ -1269,6 +1285,7 @@ radio_instance_set_enabled(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    gboolean enabled) /* Since 1.0.7 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && self->enabled != enabled) {
 | 
			
		||||
        self->enabled = enabled;
 | 
			
		||||
        GDEBUG("%s %sabled", self->slot, enabled ? "en" : "dis");
 | 
			
		||||
@@ -1283,6 +1300,7 @@ radio_instance_add_request_observer(
 | 
			
		||||
    RadioRequestObserverFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_add_request_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -1295,6 +1313,7 @@ radio_instance_add_request_observer_with_priority(
 | 
			
		||||
    RadioRequestObserverFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint index = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_INSTANCE_SIGNAL sig = SIGNAL_OBSERVE_REQUEST_0 + index;
 | 
			
		||||
@@ -1324,6 +1343,7 @@ radio_instance_add_response_observer(
 | 
			
		||||
    RadioResponseObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_add_response_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -1336,6 +1356,7 @@ radio_instance_add_response_observer_with_priority(
 | 
			
		||||
    RadioResponseObserverFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint index = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_INSTANCE_SIGNAL sig = SIGNAL_OBSERVE_RESPONSE_0 + index;
 | 
			
		||||
@@ -1365,6 +1386,7 @@ radio_instance_add_indication_observer(
 | 
			
		||||
    RadioIndicationObserverFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_instance_add_indication_observer_with_priority(self,
 | 
			
		||||
        RADIO_OBSERVER_PRIORITY_DEFAULT, code, func, user_data);
 | 
			
		||||
}
 | 
			
		||||
@@ -1377,6 +1399,7 @@ radio_instance_add_indication_observer_with_priority(
 | 
			
		||||
    RadioIndicationObserverFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        const guint index = radio_observer_priority_index(priority);
 | 
			
		||||
        const RADIO_INSTANCE_SIGNAL sig = SIGNAL_OBSERVE_INDICATION_0 + index;
 | 
			
		||||
@@ -1406,6 +1429,7 @@ radio_instance_add_response_handler(
 | 
			
		||||
    RadioResponseHandlerFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self,
 | 
			
		||||
            radio_instance_signals[SIGNAL_HANDLE_RESPONSE],
 | 
			
		||||
@@ -1420,6 +1444,7 @@ radio_instance_add_indication_handler(
 | 
			
		||||
    RadioIndicationHandlerFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ?
 | 
			
		||||
        g_signal_connect_closure_by_id(self,
 | 
			
		||||
            radio_instance_signals[SIGNAL_HANDLE_INDICATION],
 | 
			
		||||
@@ -1433,6 +1458,7 @@ radio_instance_add_ack_handler(
 | 
			
		||||
    RadioAckFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_ACK_NAME, G_CALLBACK(func), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1443,6 +1469,7 @@ radio_instance_add_death_handler(
 | 
			
		||||
    RadioInstanceFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_DEATH_NAME, G_CALLBACK(func), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1453,6 +1480,7 @@ radio_instance_add_enabled_handler(
 | 
			
		||||
    RadioInstanceFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.0.7 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_ENABLED_NAME, G_CALLBACK(func), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1463,6 +1491,7 @@ radio_instance_add_connected_handler(
 | 
			
		||||
    RadioInstanceFunc func,
 | 
			
		||||
    gpointer user_data) /* Since 1.4.3 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return (G_LIKELY(self) && G_LIKELY(func)) ? g_signal_connect(self,
 | 
			
		||||
        SIGNAL_CONNECTED_NAME, G_CALLBACK(func), user_data) : 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1472,6 +1501,7 @@ radio_instance_remove_handler(
 | 
			
		||||
    RadioInstance* self,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(id)) {
 | 
			
		||||
        g_signal_handler_disconnect(self, id);
 | 
			
		||||
    }
 | 
			
		||||
@@ -1483,6 +1513,7 @@ radio_instance_remove_handlers(
 | 
			
		||||
    gulong* ids,
 | 
			
		||||
    int count)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gutil_disconnect_handlers(self, ids, count);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1495,6 +1526,7 @@ void
 | 
			
		||||
radio_instance_init(
 | 
			
		||||
    RadioInstance* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioInstancePriv* priv = G_TYPE_INSTANCE_GET_PRIVATE
 | 
			
		||||
        (self, RADIO_TYPE_INSTANCE, RadioInstancePriv);
 | 
			
		||||
 | 
			
		||||
@@ -1510,6 +1542,7 @@ void
 | 
			
		||||
radio_instance_finalize(
 | 
			
		||||
    GObject* object)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioInstance* self = RADIO_INSTANCE(object);
 | 
			
		||||
    RadioInstancePriv* priv = self->priv;
 | 
			
		||||
 | 
			
		||||
@@ -1531,6 +1564,7 @@ void
 | 
			
		||||
radio_instance_class_init(
 | 
			
		||||
    RadioInstanceClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GObjectClass* object_class = G_OBJECT_CLASS(klass);
 | 
			
		||||
    GType type = G_OBJECT_CLASS_TYPE(klass);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -71,6 +71,7 @@ void
 | 
			
		||||
radio_registry_instance_added(
 | 
			
		||||
    RadioInstance* radio)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRegistry* self = radio_registry_instance;
 | 
			
		||||
 | 
			
		||||
    if (self) {
 | 
			
		||||
@@ -85,6 +86,7 @@ void
 | 
			
		||||
radio_registry_instance_removed(
 | 
			
		||||
    const char* key)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRegistry* self = radio_registry_instance;
 | 
			
		||||
 | 
			
		||||
    if (self) {
 | 
			
		||||
@@ -103,6 +105,7 @@ RadioRegistry*
 | 
			
		||||
radio_registry_new(
 | 
			
		||||
    void)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (radio_registry_instance) {
 | 
			
		||||
        radio_registry_ref(radio_registry_instance);
 | 
			
		||||
    } else {
 | 
			
		||||
@@ -118,6 +121,7 @@ RadioRegistry*
 | 
			
		||||
radio_registry_ref(
 | 
			
		||||
    RadioRegistry* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_ref(RADIO_REGISTRY(self));
 | 
			
		||||
        return self;
 | 
			
		||||
@@ -130,6 +134,7 @@ void
 | 
			
		||||
radio_registry_unref(
 | 
			
		||||
    RadioRegistry* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        g_object_unref(RADIO_REGISTRY(self));
 | 
			
		||||
    }
 | 
			
		||||
@@ -142,6 +147,7 @@ radio_registry_add_instance_added_handler(
 | 
			
		||||
    RadioRegistryInstanceFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        return g_signal_connect_closure_by_id(self,
 | 
			
		||||
            radio_registry_signals[SIGNAL_INSTANCE_ADDED],
 | 
			
		||||
@@ -158,6 +164,7 @@ radio_registry_add_instance_removed_handler(
 | 
			
		||||
    RadioRegistryStrFunc func,
 | 
			
		||||
    gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(func)) {
 | 
			
		||||
        return g_signal_connect_closure_by_id(self,
 | 
			
		||||
            radio_registry_signals[SIGNAL_INSTANCE_REMOVED],
 | 
			
		||||
@@ -172,6 +179,7 @@ radio_registry_remove_handler(
 | 
			
		||||
    RadioRegistry* self,
 | 
			
		||||
    gulong id)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self) && G_LIKELY(id)) {
 | 
			
		||||
        g_signal_handler_disconnect(self, id);
 | 
			
		||||
    }
 | 
			
		||||
@@ -183,6 +191,7 @@ radio_registry_remove_handlers(
 | 
			
		||||
    gulong* ids,
 | 
			
		||||
    int count)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    gutil_disconnect_handlers(self, ids, count);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -195,6 +204,7 @@ void
 | 
			
		||||
radio_registry_init(
 | 
			
		||||
    RadioRegistry* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static
 | 
			
		||||
@@ -202,6 +212,7 @@ void
 | 
			
		||||
radio_registry_class_init(
 | 
			
		||||
    RadioRegistryClass* klass)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_registry_signals[SIGNAL_INSTANCE_ADDED] =
 | 
			
		||||
        g_signal_new(SIGNAL_INSTANCE_ADDED_NAME, G_OBJECT_CLASS_TYPE(klass),
 | 
			
		||||
            G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED, 0, NULL, NULL, NULL,
 | 
			
		||||
 
 | 
			
		||||
@@ -70,6 +70,7 @@ void
 | 
			
		||||
radio_request_object_cancel(
 | 
			
		||||
    RadioRequestObject* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequest* req = &self->pub;
 | 
			
		||||
 | 
			
		||||
    radio_base_cancel_request(req->object, req);
 | 
			
		||||
@@ -86,6 +87,7 @@ void
 | 
			
		||||
radio_request_free(
 | 
			
		||||
    RadioRequestObject* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequest* req = &self->pub;
 | 
			
		||||
 | 
			
		||||
    GVERBOSE_("%u (%08x) %p", req->code, req->serial, req);
 | 
			
		||||
@@ -115,6 +117,7 @@ void
 | 
			
		||||
radio_request_object_unref(
 | 
			
		||||
    RadioRequestObject* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
        GASSERT(self->refcount > 0);
 | 
			
		||||
        if (g_atomic_int_dec_and_test(&self->refcount)) {
 | 
			
		||||
@@ -133,6 +136,7 @@ radio_request_default_retry(
 | 
			
		||||
    const GBinderReader* reader,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (status != RADIO_TX_STATUS_OK) {
 | 
			
		||||
        GVERBOSE_("req %p %u (%08x) status %d", req, req->code, req->serial,
 | 
			
		||||
            status);
 | 
			
		||||
@@ -157,6 +161,7 @@ radio_request_object_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestObject* self = g_slice_new0(RadioRequestObject);
 | 
			
		||||
    RadioRequest* req = &self->pub;
 | 
			
		||||
    GBinderWriter tmp;
 | 
			
		||||
@@ -192,6 +197,7 @@ void
 | 
			
		||||
radio_request_unref_func(
 | 
			
		||||
    gpointer req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_request_object_unref(radio_request_cast(req));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -200,6 +206,7 @@ radio_request_update_serial(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    guint32 serial)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    GBinderWriter writer;
 | 
			
		||||
 | 
			
		||||
    gbinder_local_request_init_writer(req->args, &writer);
 | 
			
		||||
@@ -220,6 +227,7 @@ radio_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return client ? radio_request_object_new(RADIO_BASE(client), NULL,
 | 
			
		||||
        code, writer, (RadioRequestGenericCompleteFunc) complete,
 | 
			
		||||
        destroy, user_data) : NULL;
 | 
			
		||||
@@ -234,6 +242,7 @@ radio_request_new2(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return group ? radio_request_object_new(RADIO_BASE(group->client), group,
 | 
			
		||||
        code, writer, (RadioRequestGenericCompleteFunc) complete,
 | 
			
		||||
        destroy, user_data) : NULL;
 | 
			
		||||
@@ -248,6 +257,7 @@ radio_config_request_new(
 | 
			
		||||
    GDestroyNotify destroy,
 | 
			
		||||
    void* user_data) /* Since 1.4.6 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return config ? radio_request_object_new(RADIO_BASE(config), NULL,
 | 
			
		||||
        code, writer, (RadioRequestGenericCompleteFunc) complete,
 | 
			
		||||
        destroy, user_data) : NULL;
 | 
			
		||||
@@ -257,6 +267,7 @@ RadioRequest*
 | 
			
		||||
radio_request_ref(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestObject* self = radio_request_cast(req);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -270,6 +281,7 @@ void
 | 
			
		||||
radio_request_unref(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    radio_request_object_unref(radio_request_cast(req));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -278,6 +290,7 @@ radio_request_set_blocking(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    gboolean blocking)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(req)) {
 | 
			
		||||
        req->blocking = blocking;
 | 
			
		||||
    }
 | 
			
		||||
@@ -288,6 +301,7 @@ radio_request_set_timeout(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    guint ms)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(req) && req->timeout_ms != ms) {
 | 
			
		||||
        RadioBase* base = req->object;
 | 
			
		||||
 | 
			
		||||
@@ -307,6 +321,7 @@ radio_request_set_retry(
 | 
			
		||||
    guint delay_ms,     /* Delay before each retry, in milliseconds */
 | 
			
		||||
    int max_count)      /* Negative count to keep retrying indefinitely */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(req)) {
 | 
			
		||||
        req->retry_delay_ms = delay_ms;
 | 
			
		||||
        req->max_retries = max_count;
 | 
			
		||||
@@ -318,6 +333,7 @@ radio_request_set_retry_func(
 | 
			
		||||
    RadioRequest* req,
 | 
			
		||||
    RadioRequestRetryFunc retry)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(req)) {
 | 
			
		||||
        req->retry = retry ? retry : radio_request_default_retry;
 | 
			
		||||
    }
 | 
			
		||||
@@ -327,6 +343,7 @@ gboolean
 | 
			
		||||
radio_request_submit(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (req && req->object && radio_base_submit_request(req->object, req)) {
 | 
			
		||||
        radio_request_cast(req)->flags |= RADIO_REQUEST_FLAG_SUBMITTED;
 | 
			
		||||
        return TRUE;
 | 
			
		||||
@@ -338,6 +355,7 @@ gboolean
 | 
			
		||||
radio_request_retry(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return req && req->object && radio_base_retry_request(req->object, req);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -345,6 +363,7 @@ void
 | 
			
		||||
radio_request_cancel(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestObject* self = radio_request_cast(req);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -357,6 +376,7 @@ void
 | 
			
		||||
radio_request_drop(
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestObject* self = radio_request_cast(req);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -370,6 +390,7 @@ void*
 | 
			
		||||
radio_request_user_data(
 | 
			
		||||
    RadioRequest* req) /* Since 1.4.11 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return G_LIKELY(req) ? req->user_data : NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,7 @@ void
 | 
			
		||||
radio_request_group_unlink_func(
 | 
			
		||||
    gpointer req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    ((RadioRequest*)req)->group = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -68,6 +69,7 @@ void
 | 
			
		||||
radio_request_group_free(
 | 
			
		||||
    RadioRequestGroupObject* self)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroup* group = &self->pub;
 | 
			
		||||
 | 
			
		||||
    radio_base_unblock(RADIO_BASE(group->client), group);
 | 
			
		||||
@@ -85,6 +87,7 @@ radio_request_group_add(
 | 
			
		||||
    RadioRequestGroup* group,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroupObject* self = radio_request_group_cast(group);
 | 
			
		||||
 | 
			
		||||
    /* Request is never NULL but the group may be */
 | 
			
		||||
@@ -99,6 +102,7 @@ radio_request_group_remove(
 | 
			
		||||
    RadioRequestGroup* group,
 | 
			
		||||
    RadioRequest* req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroupObject* self = radio_request_group_cast(group);
 | 
			
		||||
 | 
			
		||||
    /* Request is never NULL but the group may be */
 | 
			
		||||
@@ -115,6 +119,7 @@ RadioRequestGroup*
 | 
			
		||||
radio_request_group_new(
 | 
			
		||||
    RadioClient* client)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (G_LIKELY(client)) {
 | 
			
		||||
        RadioRequestGroupObject* self = g_slice_new0(RadioRequestGroupObject);
 | 
			
		||||
        RadioRequestGroup* group = &self->pub;
 | 
			
		||||
@@ -132,6 +137,7 @@ RadioRequestGroup*
 | 
			
		||||
radio_request_group_ref(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroupObject* self = radio_request_group_cast(group);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -145,6 +151,7 @@ void
 | 
			
		||||
radio_request_group_unref(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroupObject* self = radio_request_group_cast(group);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -159,6 +166,7 @@ void
 | 
			
		||||
radio_request_group_cancel(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    RadioRequestGroupObject* self = radio_request_group_cast(group);
 | 
			
		||||
 | 
			
		||||
    if (G_LIKELY(self)) {
 | 
			
		||||
@@ -194,6 +202,7 @@ RADIO_BLOCK
 | 
			
		||||
radio_request_group_block_status(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return group ? radio_base_block_status(RADIO_BASE(group->client), group) :
 | 
			
		||||
        RADIO_BLOCK_NONE;
 | 
			
		||||
}
 | 
			
		||||
@@ -202,6 +211,7 @@ RADIO_BLOCK
 | 
			
		||||
radio_request_group_block(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return group ? radio_base_block(RADIO_BASE(group->client), group) :
 | 
			
		||||
        RADIO_BLOCK_NONE;
 | 
			
		||||
}
 | 
			
		||||
@@ -210,6 +220,7 @@ void
 | 
			
		||||
radio_request_group_unblock(
 | 
			
		||||
    RadioRequestGroup* group)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (group) {
 | 
			
		||||
        radio_base_unblock(RADIO_BASE(group->client), group);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -44,6 +44,7 @@ guint
 | 
			
		||||
radio_observer_priority_index(
 | 
			
		||||
    RADIO_OBSERVER_PRIORITY priority)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (priority < RADIO_OBSERVER_PRIORITY_LOWEST) {
 | 
			
		||||
        return 0;
 | 
			
		||||
    } else if (priority > RADIO_OBSERVER_PRIORITY_HIGHEST) {
 | 
			
		||||
@@ -57,6 +58,7 @@ const char*
 | 
			
		||||
radio_req_name(
 | 
			
		||||
    RADIO_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_req_name2(NULL, req);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -65,6 +67,7 @@ radio_req_name2(
 | 
			
		||||
    RadioInstance* instance,
 | 
			
		||||
    RADIO_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(instance) || instance->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (req) {
 | 
			
		||||
        case RADIO_REQ_SET_RESPONSE_FUNCTIONS:   return "setResponseFunctions";
 | 
			
		||||
@@ -175,6 +178,7 @@ const char*
 | 
			
		||||
radio_resp_name(
 | 
			
		||||
    RADIO_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_resp_name2(NULL, resp);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -183,6 +187,7 @@ radio_resp_name2(
 | 
			
		||||
    RadioInstance* instance,
 | 
			
		||||
    RADIO_RESP resp)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(instance) || instance->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (resp) {
 | 
			
		||||
        case RADIO_RESP_ACKNOWLEDGE_REQUEST: return "acknowledgeRequest";
 | 
			
		||||
@@ -305,6 +310,7 @@ const char*
 | 
			
		||||
radio_ind_name(
 | 
			
		||||
    RADIO_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    return radio_ind_name2(NULL, ind);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -313,6 +319,7 @@ radio_ind_name2(
 | 
			
		||||
    RadioInstance* instance,
 | 
			
		||||
    RADIO_IND ind)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    if (!G_LIKELY(instance) || instance->interface_type == RADIO_INTERFACE_TYPE_HIDL) {
 | 
			
		||||
        switch (ind) {
 | 
			
		||||
#define RADIO_IND_(code,Name,NAME) \
 | 
			
		||||
@@ -408,6 +415,7 @@ RADIO_RESP
 | 
			
		||||
radio_req_resp(
 | 
			
		||||
    RADIO_REQ req)
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (req) {
 | 
			
		||||
#define RADIO_REQ_RESP_(req,resp,Name,NAME) \
 | 
			
		||||
    case RADIO_REQ_##NAME: return RADIO_RESP_##NAME;
 | 
			
		||||
@@ -455,6 +463,7 @@ radio_req_resp2(
 | 
			
		||||
    RADIO_REQ req,
 | 
			
		||||
    RADIO_INTERFACE iface) /* Since 1.4.5 */
 | 
			
		||||
{
 | 
			
		||||
    DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
 | 
			
		||||
    switch (req) {
 | 
			
		||||
    /*
 | 
			
		||||
     * Requests expecting a response from a previous version of the
 | 
			
		||||
@@ -531,7 +540,7 @@ radio_req_resp2(
 | 
			
		||||
        return RADIO_RESP_NONE;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
     * getCurrentCalls
 | 
			
		||||
     * getCurrentCalls{
 | 
			
		||||
     * getCurrentCallsResponse
 | 
			
		||||
     * getCurrentCallsResponse_1_2 <= the last one
 | 
			
		||||
     * getCurrentCalls_1_6
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user