diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-19 12:38:03 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-19 12:38:03 -0800 |
commit | ee9ffa509ee08cd6599c13f2d8a39c215fd991ca (patch) | |
tree | 26618fbf060fdc83a305a82a65e5120b769a331c /src/profile.c | |
parent | 2bd9cd76b63a3e6ef2d5a3278b9ff6cde65f355f (diff) | |
download | connman-ee9ffa509ee08cd6599c13f2d8a39c215fd991ca.tar.gz connman-ee9ffa509ee08cd6599c13f2d8a39c215fd991ca.tar.bz2 connman-ee9ffa509ee08cd6599c13f2d8a39c215fd991ca.zip |
Use helper for basic property changed signals
Diffstat (limited to 'src/profile.c')
-rw-r--r-- | src/profile.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/profile.c b/src/profile.c index 84059fc9..9e2c0c13 100644 --- a/src/profile.c +++ b/src/profile.c @@ -81,40 +81,16 @@ static void profiles_changed(void) static void name_changed(struct connman_profile *profile) { - DBusMessage *signal; - DBusMessageIter iter; - - DBG("profile %p", profile); - - signal = dbus_message_new_signal(profile->path, - CONNMAN_PROFILE_INTERFACE, "PropertyChanged"); - if (signal == NULL) - return; - - dbus_message_iter_init_append(signal, &iter); - connman_dbus_property_append_variant(&iter, "Name", + connman_dbus_property_changed_basic(profile->path, + CONNMAN_PROFILE_INTERFACE, "Name", DBUS_TYPE_STRING, &profile->name); - - g_dbus_send_message(connection, signal); } static void offlinemode_changed(struct connman_profile *profile) { - DBusMessage *signal; - DBusMessageIter iter; - - DBG("profile %p", profile); - - signal = dbus_message_new_signal(profile->path, - CONNMAN_PROFILE_INTERFACE, "PropertyChanged"); - if (signal == NULL) - return; - - dbus_message_iter_init_append(signal, &iter); - connman_dbus_property_append_variant(&iter, "OfflineMode", + connman_dbus_property_changed_basic(profile->path, + CONNMAN_PROFILE_INTERFACE, "OfflineMode", DBUS_TYPE_BOOLEAN, &profile->offlinemode); - - g_dbus_send_message(connection, signal); } connman_bool_t __connman_profile_get_offlinemode(void) |