-static DBusMessage *set_property(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- struct connman_element *element = data;
- DBusMessageIter iter;
- DBusMessageIter value;
- const char *name;
-
- DBG("conn %p", conn);
-
- if (dbus_message_iter_init(msg, &iter) == FALSE)
- return __connman_error_invalid_arguments(msg);
-
- dbus_message_iter_get_basic(&iter, &name);
- dbus_message_iter_next(&iter);
- dbus_message_iter_recurse(&iter, &value);
-
- if (__connman_security_check_privileges(msg) < 0)
- return __connman_error_permission_denied(msg);
-
- set_common_property(element, name, &value);
-
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
-}
-
-static DBusMessage *clear_property(DBusConnection *conn,
- DBusMessage *msg, void *data)
-{
- struct connman_element *element = data;
- const char *name;
- GSList *list;
-
- DBG("conn %p", conn);
-
- if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &name,
- DBUS_TYPE_INVALID) == FALSE)
- return __connman_error_invalid_arguments(msg);
-
- if (__connman_security_check_privileges(msg) < 0)
- return __connman_error_permission_denied(msg);
-
- __connman_element_lock(element);
-
- for (list = element->properties; list; list = list->next) {
- struct connman_property *property = list->data;
-
- if (g_str_equal(property->name, name) == FALSE)
- continue;
-
- if (property->flags & CONNMAN_PROPERTY_FLAG_STATIC)
- continue;
-
- if (property->flags & CONNMAN_PROPERTY_FLAG_REFERENCE)
- continue;
-
- property->flags |= CONNMAN_PROPERTY_FLAG_REFERENCE;
-
- if (property->type == DBUS_TYPE_STRING)
- g_free(property->value);
-
- property->value = NULL;
- }
-
- __connman_element_unlock(element);
-
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
-}
-
-static GDBusMethodTable element_methods[] = {
- { "GetProperties", "", "a{sv}", get_properties },
- { "SetProperty", "sv", "", set_property },
- { "ClearProperty", "s", "", clear_property },
- { "Update", "", "", do_update },
- { "Enable", "", "", do_enable },
- { "Disable", "", "", do_disable },
- { },
-};
-#endif
-
-static GDBusSignalTable element_signals[] = {
- { "PropertyChanged", "sv" },
- { },
-};
-