static DBusMessage * properties_handler(DBusMessage *message, struct wpa_dbus_object_desc *obj_dsc) { DBusMessageIter iter; char *interface; const char *method; method = dbus_message_get_member(message); dbus_message_iter_init(message, &iter); if (!os_strncmp(WPA_DBUS_PROPERTIES_GET, method, WPAS_DBUS_METHOD_SIGNAL_PROP_MAX) || !os_strncmp(WPA_DBUS_PROPERTIES_SET, method, WPAS_DBUS_METHOD_SIGNAL_PROP_MAX) || !os_strncmp(WPA_DBUS_PROPERTIES_GETALL, method, WPAS_DBUS_METHOD_SIGNAL_PROP_MAX)) { /* First argument: interface name (DBUS_TYPE_STRING) */ if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) { return dbus_message_new_error(message, DBUS_ERROR_INVALID_ARGS, NULL); } dbus_message_iter_get_basic(&iter, &interface); if (!os_strncmp(WPA_DBUS_PROPERTIES_GETALL, method, WPAS_DBUS_METHOD_SIGNAL_PROP_MAX)) { /* GetAll */ return properties_get_all(message, interface, obj_dsc); } /* Get or Set */ return properties_get_or_set(message, &iter, interface, obj_dsc); } return dbus_message_new_error(message, DBUS_ERROR_UNKNOWN_METHOD, NULL); }
/* Properties access methods */ GVariant *proximity_monitor_get_properties(ProximityMonitor *self, GError **error) { g_assert(PROXIMITY_MONITOR_IS(self)); g_assert(self->priv->properties != NULL); return properties_get_all(self->priv->properties, PROXIMITY_MONITOR_DBUS_INTERFACE, error); }
/* Properties access methods */ GVariant *network_get_properties(Network *self, GError **error) { g_assert(NETWORK_IS(self)); g_assert(self->priv->properties != NULL); return properties_get_all(self->priv->properties, NETWORK_DBUS_INTERFACE, error); }
/* Properties access methods */ GVariant *obex_session_get_properties(ObexSession *self, GError **error) { g_assert(OBEX_SESSION_IS(self)); g_assert(self->priv->properties != NULL); return properties_get_all(self->priv->properties, OBEX_SESSION_DBUS_INTERFACE, error); }
/* Properties access methods */ GVariant *health_device_get_properties(HealthDevice *self, GError **error) { g_assert(HEALTH_DEVICE_IS(self)); g_assert(self->priv->properties != NULL); return properties_get_all(self->priv->properties, HEALTH_DEVICE_DBUS_INTERFACE, error); }