From: Denis Kenzior Date: Wed, 29 Jul 2009 15:26:55 +0000 (-0500) Subject: Rename dbus_gsm_dict_append X-Git-Tag: 0.3~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6728542a012fc57afd051bdac8f26c89b707b4a2;p=platform%2Fupstream%2Fofono.git Rename dbus_gsm_dict_append --- diff --git a/include/dbus.h b/include/dbus.h index 064f5e9..8df49e2 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -38,6 +38,9 @@ extern "C" { DBusConnection *ofono_dbus_get_connection(); +void ofono_dbus_dict_append(DBusMessageIter *dict, const char *key, int type, + void *value); + int ofono_dbus_signal_property_changed(DBusConnection *conn, const char *path, const char *interface, const char *name, int type, void *value); diff --git a/src/call-barring.c b/src/call-barring.c index 9113541..b67ca0c 100644 --- a/src/call-barring.c +++ b/src/call-barring.c @@ -167,7 +167,7 @@ static void cb_ss_property_append(struct call_barring_data *cb, bearer_class_to_string(i), cb_locks[lock].name); - dbus_gsm_dict_append(dict, property_name, DBUS_TYPE_STRING, + ofono_dbus_dict_append(dict, property_name, DBUS_TYPE_STRING, &strvalue); } } @@ -627,7 +627,7 @@ static inline void cb_append_property(struct call_barring_data *cb, snprintf(property_name, sizeof(property_name), "%s%s", bearer_class_to_string(cls), property); - dbus_gsm_dict_append(dict, property_name, DBUS_TYPE_STRING, + ofono_dbus_dict_append(dict, property_name, DBUS_TYPE_STRING, &value); } diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 9ef460a..0a9f9ed 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -336,10 +336,10 @@ static inline void property_append_cf_condition(DBusMessageIter *dict, int cls, sprintf(tattr, "%s%sTimeout", bearer_class_to_string(cls), postfix); - dbus_gsm_dict_append(dict, attr, DBUS_TYPE_STRING, &value); + ofono_dbus_dict_append(dict, attr, DBUS_TYPE_STRING, &value); if (addt) - dbus_gsm_dict_append(dict, tattr, DBUS_TYPE_UINT16, &timeout); + ofono_dbus_dict_append(dict, tattr, DBUS_TYPE_UINT16, &timeout); } static void property_append_cf_conditions(DBusMessageIter *dict, diff --git a/src/call-meter.c b/src/call-meter.c index a1adb36..1d93cc0 100644 --- a/src/call-meter.c +++ b/src/call-meter.c @@ -181,18 +181,18 @@ static void cm_get_properties_reply(struct ofono_modem *modem) OFONO_PROPERTIES_ARRAY_SIGNATURE, &dict); - dbus_gsm_dict_append(&dict, "CallMeter", DBUS_TYPE_UINT32, + ofono_dbus_dict_append(&dict, "CallMeter", DBUS_TYPE_UINT32, &cm->call_meter); - dbus_gsm_dict_append(&dict, "AccumulatedCallMeter", DBUS_TYPE_UINT32, + ofono_dbus_dict_append(&dict, "AccumulatedCallMeter", DBUS_TYPE_UINT32, &cm->acm); - dbus_gsm_dict_append(&dict, "AccumulatedCallMeterMaximum", + ofono_dbus_dict_append(&dict, "AccumulatedCallMeterMaximum", DBUS_TYPE_UINT32, &cm->acm_max); - dbus_gsm_dict_append(&dict, "PricePerUnit", DBUS_TYPE_DOUBLE, &cm->ppu); + ofono_dbus_dict_append(&dict, "PricePerUnit", DBUS_TYPE_DOUBLE, &cm->ppu); - dbus_gsm_dict_append(&dict, "Currency", DBUS_TYPE_STRING, ¤cy); + ofono_dbus_dict_append(&dict, "Currency", DBUS_TYPE_STRING, ¤cy); dbus_message_iter_close_container(&iter, &dict); diff --git a/src/call-settings.c b/src/call-settings.c index e28b9ea..1368f1d 100644 --- a/src/call-settings.c +++ b/src/call-settings.c @@ -295,7 +295,7 @@ static void property_append_cw_conditions(DBusMessageIter *dict, else value = "disabled"; - dbus_gsm_dict_append(dict, prop, DBUS_TYPE_STRING, &value); + ofono_dbus_dict_append(dict, prop, DBUS_TYPE_STRING, &value); } } @@ -785,23 +785,23 @@ static DBusMessage *generate_get_properties_reply(struct ofono_modem *modem, &dict); str = clip_status_to_string(cs->clip); - dbus_gsm_dict_append(&dict, "CallingLinePresentation", + ofono_dbus_dict_append(&dict, "CallingLinePresentation", DBUS_TYPE_STRING, &str); str = colp_status_to_string(cs->colp); - dbus_gsm_dict_append(&dict, "CalledLinePresentation", + ofono_dbus_dict_append(&dict, "CalledLinePresentation", DBUS_TYPE_STRING, &str); str = colr_status_to_string(cs->colr); - dbus_gsm_dict_append(&dict, "CalledLineRestriction", + ofono_dbus_dict_append(&dict, "CalledLineRestriction", DBUS_TYPE_STRING, &str); str = clir_status_to_string(cs->clir); - dbus_gsm_dict_append(&dict, "CallingLineRestriction", + ofono_dbus_dict_append(&dict, "CallingLineRestriction", DBUS_TYPE_STRING, &str); str = hide_callerid_to_string(cs->clir_setting); - dbus_gsm_dict_append(&dict, "HideCallerId", DBUS_TYPE_STRING, &str); + ofono_dbus_dict_append(&dict, "HideCallerId", DBUS_TYPE_STRING, &str); property_append_cw_conditions(&dict, cs->cw, BEARER_CLASS_VOICE); diff --git a/src/dbus-gsm.c b/src/dbus-gsm.c index 6ac3cd7..ed708cc 100644 --- a/src/dbus-gsm.c +++ b/src/dbus-gsm.c @@ -52,7 +52,7 @@ void dbus_gsm_append_variant(DBusMessageIter *iter, dbus_message_iter_close_container(iter, &valueiter); } -void dbus_gsm_dict_append(DBusMessageIter *dict, +void ofono_dbus_dict_append(DBusMessageIter *dict, const char *key, int type, void *value) { DBusMessageIter keyiter; diff --git a/src/dbus-gsm.h b/src/dbus-gsm.h index 5af654f..5cc611c 100644 --- a/src/dbus-gsm.h +++ b/src/dbus-gsm.h @@ -24,9 +24,6 @@ #define MAX_DBUS_PATH_LEN 64 -void dbus_gsm_dict_append(DBusMessageIter *dict, const char *key, int type, - void *value); - void dbus_gsm_append_variant(DBusMessageIter *iter, int type, void *value); void dbus_gsm_append_array_variant(DBusMessageIter *iter, int type, void *val); diff --git a/src/modem.c b/src/modem.c index 6fe13b0..3555ae6 100644 --- a/src/modem.c +++ b/src/modem.c @@ -147,19 +147,19 @@ static DBusMessage *generate_properties_reply(struct ofono_modem *modem, &dict); if (info->manufacturer) - dbus_gsm_dict_append(&dict, "Manufacturer", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Manufacturer", DBUS_TYPE_STRING, &info->manufacturer); if (info->model) - dbus_gsm_dict_append(&dict, "Model", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Model", DBUS_TYPE_STRING, &info->model); if (info->revision) - dbus_gsm_dict_append(&dict, "Revision", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Revision", DBUS_TYPE_STRING, &info->revision); if (info->serial) - dbus_gsm_dict_append(&dict, "Serial", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Serial", DBUS_TYPE_STRING, &info->serial); interfaces = g_new0(char *, g_slist_length(info->interface_list) + 1); diff --git a/src/network.c b/src/network.c index 3f747b4..faf034e 100644 --- a/src/network.c +++ b/src/network.c @@ -512,19 +512,19 @@ static DBusMessage *network_operator_get_properties(DBusConnection *conn, OFONO_PROPERTIES_ARRAY_SIGNATURE, &dict); - dbus_gsm_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name); + ofono_dbus_dict_append(&dict, "Name", DBUS_TYPE_STRING, &name); - dbus_gsm_dict_append(&dict, "Status", DBUS_TYPE_STRING, &status); + ofono_dbus_dict_append(&dict, "Status", DBUS_TYPE_STRING, &status); if (*opd->info->mcc != '\0') { const char *mcc = opd->info->mcc; - dbus_gsm_dict_append(&dict, "MobileCountryCode", + ofono_dbus_dict_append(&dict, "MobileCountryCode", DBUS_TYPE_STRING, &mcc); } if (*opd->info->mnc != '\0') { const char *mnc = opd->info->mnc; - dbus_gsm_dict_append(&dict, "MobileNetworkCode", + ofono_dbus_dict_append(&dict, "MobileNetworkCode", DBUS_TYPE_STRING, &mnc); } @@ -532,14 +532,14 @@ static DBusMessage *network_operator_get_properties(DBusConnection *conn, const char *technology = registration_tech_to_string(opd->info->tech); - dbus_gsm_dict_append(&dict, "Technology", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Technology", DBUS_TYPE_STRING, &technology); } if (opd->eons_info && opd->eons_info->info) { const char *additional = opd->eons_info->info; - dbus_gsm_dict_append(&dict, "AdditionalInformation", + ofono_dbus_dict_append(&dict, "AdditionalInformation", DBUS_TYPE_STRING, &additional); } @@ -702,20 +702,20 @@ static DBusMessage *network_get_properties(DBusConnection *conn, dbus_message_iter_init_append(reply, &iter); dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, - PROPERTIES_ARRAY_SIGNATURE, - &dict); + OFONO_PROPERTIES_ARRAY_SIGNATURE, + &dict); - dbus_gsm_dict_append(&dict, "Status", DBUS_TYPE_STRING, &status); + ofono_dbus_dict_append(&dict, "Status", DBUS_TYPE_STRING, &status); if (netreg->location != -1) { dbus_uint16_t location = netreg->location; - dbus_gsm_dict_append(&dict, "LocationAreaCode", + ofono_dbus_dict_append(&dict, "LocationAreaCode", DBUS_TYPE_UINT16, &location); } if (netreg->cellid != -1) { dbus_uint32_t cellid = netreg->cellid; - dbus_gsm_dict_append(&dict, "CellId", + ofono_dbus_dict_append(&dict, "CellId", DBUS_TYPE_UINT32, &cellid); } @@ -723,12 +723,12 @@ static DBusMessage *network_get_properties(DBusConnection *conn, const char *technology = registration_tech_to_string(netreg->technology); - dbus_gsm_dict_append(&dict, "Technology", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "Technology", DBUS_TYPE_STRING, &technology); } operator = get_operator_display_name(modem); - dbus_gsm_dict_append(&dict, "Operator", DBUS_TYPE_STRING, &operator); + ofono_dbus_dict_append(&dict, "Operator", DBUS_TYPE_STRING, &operator); network_operator_populate_registered(modem, &network_operators); @@ -740,7 +740,7 @@ static DBusMessage *network_get_properties(DBusConnection *conn, if (netreg->signal_strength != -1) { dbus_uint16_t strength = netreg->signal_strength; - dbus_gsm_dict_append(&dict, "Strength", DBUS_TYPE_UINT16, + ofono_dbus_dict_append(&dict, "Strength", DBUS_TYPE_UINT16, &strength); } diff --git a/src/sim.c b/src/sim.c index c993089..25fca1e 100644 --- a/src/sim.c +++ b/src/sim.c @@ -149,7 +149,7 @@ static DBusMessage *sim_get_properties(DBusConnection *conn, &dict); if (sim->imsi) - dbus_gsm_dict_append(&dict, "SubscriberIdentity", + ofono_dbus_dict_append(&dict, "SubscriberIdentity", DBUS_TYPE_STRING, &sim->imsi); own_numbers = get_own_numbers(sim->own_numbers); diff --git a/src/sms.c b/src/sms.c index 9423764..1b412a2 100644 --- a/src/sms.c +++ b/src/sms.c @@ -144,7 +144,7 @@ static DBusMessage *generate_get_properties_reply(struct ofono_modem *modem, sca = phone_number_to_string(&sms->sca); - dbus_gsm_dict_append(&dict, "ServiceCenterAddress", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "ServiceCenterAddress", DBUS_TYPE_STRING, &sca); dbus_message_iter_close_container(&iter, &dict); @@ -506,14 +506,14 @@ static void dispatch_text_message(struct ofono_modem *modem, strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&ts)); buf[127] = '\0'; - dbus_gsm_dict_append(&dict, "LocalSentTime", DBUS_TYPE_STRING, &str); + ofono_dbus_dict_append(&dict, "LocalSentTime", DBUS_TYPE_STRING, &str); strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", &remote); buf[127] = '\0'; - dbus_gsm_dict_append(&dict, "SentTime", DBUS_TYPE_STRING, &str); + ofono_dbus_dict_append(&dict, "SentTime", DBUS_TYPE_STRING, &str); str = sms_address_to_string(addr); - dbus_gsm_dict_append(&dict, "Sender", DBUS_TYPE_STRING, &str); + ofono_dbus_dict_append(&dict, "Sender", DBUS_TYPE_STRING, &str); dbus_message_iter_close_container(&iter, &dict); diff --git a/src/voicecall.c b/src/voicecall.c index 859374d..b1919e8 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -168,9 +168,9 @@ static DBusMessage *voicecall_get_properties(DBusConnection *conn, OFONO_PROPERTIES_ARRAY_SIGNATURE, &dict); - dbus_gsm_dict_append(&dict, "State", DBUS_TYPE_STRING, &status); + ofono_dbus_dict_append(&dict, "State", DBUS_TYPE_STRING, &status); - dbus_gsm_dict_append(&dict, "LineIdentification", + ofono_dbus_dict_append(&dict, "LineIdentification", DBUS_TYPE_STRING, &callerid); if (call->status == CALL_STATUS_ACTIVE || @@ -178,7 +178,7 @@ static DBusMessage *voicecall_get_properties(DBusConnection *conn, call->status == CALL_STATUS_HELD) { timestr = time_to_str(&v->start_time); - dbus_gsm_dict_append(&dict, "StartTime", DBUS_TYPE_STRING, + ofono_dbus_dict_append(&dict, "StartTime", DBUS_TYPE_STRING, ×tr); }