Rather than having every property getter method have code to fetch
that specific property's value, just call the new
_nm_object_ensure_inited() (which makes sure that we've read all the
property values on the object at least once), and then return the
cached value. (After we've read the initial property values, the
PropertiesChanged signal handler will ensure that the values are kept
up to date, so we can always just return cached property values after
that point.)
This then lets us get rid of _nm_object_get_property() and its
wrappers.
Rename _nm_object_handle_properties_changed(), etc, to be about
properties in general, rather than just property changes.
Interpret func==NULL in NMPropertiesInfo as meaning "use
_nm_object_demarshal_generic", and then reorder the fields so that you
can just leave that field out in the declarations when it's NULL.
Add a way to register properties that exist in D-Bus but aren't
tracked by the NMObjects, and use that for NMDevice's D-Bus Ip4Address
property, replacing the existing hack.
Also add a few other missing properties noticed along the way.
- the first uses dbus-glib and D-Bus "NameOwnerChanged" signal directly
- the second uses GIO's g_bus_watch_name()
- the third uses Qt and QDBusServiceWatcher class
Most of the code was using dbus_g_proxy_call() directly, but there
were some leftover uses of the generated bindings. Make things more
consistent by using dbus_g_proxy_call() everywhere, and stop building
the -bindings.h files.
All of the information in the configuration files for local caching
dnsmasq or BIND servers are accessible already over the D-Bus
interface, so there's no sensitive information here.
Allows clients to retrieve the reason a device changed to
the given state along with the state itself, preventing
race conditions if the state were retrieved separately
from the reason. Reason codes were not previously
accessible without listening to the StateChanged signal.
We do not want to break other methods, when EAP-FAST specific error condition
is detected: no PAC file provided and automatic PAC provisioning is disabled.
This is a proposal to include the NMActiveConnection master property in
nmcli con status.
Feel free to suggest a more user friendly method of printing this
information.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Adds a new "master" property to NMActiveConnection containing the path
of the master NMDevice if the connection has a master.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Speed is gotten via ethtool on 'carrier on' event. If there is a more suitable
netlink event we should use it instead. Nonetheless, it appears to be working
fine with carrier change, because interface speed change does emit carrier offi
and on events.
If the route already exists and the kernel tells us that, we
don't need to do anything. We certainly don't need to warn
about it in the logs.
There was a typo in the IPv6 default route replace function that
ignored a returned error, and thus we didn't suppress the NLE_EXIST
error like we wanted to. Do the same for the IPv4 default route
while we're at it.
Callers of this function have a better idea of they want to
log errors or not. Let them handle it, since they already
do, and having a warning here was causing duplicate log
messages.
Don't set default values for the properties, which didn't allow users to
switch off sending echo-request packets. Rather set defaults in editor
or while completing connection for modems.