static dbus_bool_t __ni_objectmodel_macvlan_get_mode(const ni_dbus_object_t *object, const ni_dbus_property_t *property, ni_dbus_variant_t *result, DBusError *error) { ni_macvlan_t *macvlan; if (!(macvlan = ni_objectmodel_macvlan_handle(object, FALSE, error))) return FALSE; ni_dbus_variant_set_uint32(result, macvlan->mode); return TRUE; }
static dbus_bool_t ni_objectmodel_infiniband_get_mode( const ni_dbus_object_t *object, const ni_dbus_property_t *property, ni_dbus_variant_t *result, DBusError *error) { ni_infiniband_t *ib; if (!(ib = __ni_objectmodel_infiniband_handle(object, FALSE, error))) return FALSE; ni_dbus_variant_set_uint32(result, ib->mode); return TRUE; }
static dbus_bool_t ni_objectmodel_ppp_config_get_holdoff(const ni_dbus_object_t *object, const ni_dbus_property_t *property, ni_dbus_variant_t *result, DBusError *error) { const ni_ppp_config_t *conf; if (!(conf = ni_objectmodel_get_ppp_config(object, FALSE, error))) return FALSE; if (conf->holdoff == -1U) return FALSE; ni_dbus_variant_set_uint32(result, conf->holdoff); return TRUE; }
/* * Send Eventlog.connected() signal */ static void ni_testbus_eventlog_signal_eventsAdded(ni_dbus_object_t *eventlog_object, uint32_t last_seq) { ni_dbus_variant_t arg = NI_DBUS_VARIANT_INIT; ni_dbus_variant_set_uint32(&arg, last_seq); /* Send the signal */ ni_dbus_server_send_signal(ni_dbus_object_get_server(eventlog_object), eventlog_object, NI_TESTBUS_EVENTLOG_INTERFACE, "eventsAdded", 1, &arg); ni_dbus_variant_destroy(&arg); }
static dbus_bool_t __ni_objectmodel_gre_get_flags(const ni_dbus_object_t *object, const ni_dbus_property_t *property, ni_dbus_variant_t *result, DBusError *error) { uint32_t flags = 0; ni_gre_t *gre; if (!(gre = ni_objectmodel_get_gre(object, FALSE, error))) return FALSE; flags = gre->flags & ~(NI_BIT(NI_GRE_FLAG_IKEY)|NI_BIT(NI_GRE_FLAG_OKEY)); if (!flags) return FALSE; ni_dbus_variant_set_uint32(result, flags); return TRUE; }