diff options
author | Dan Williams <dcbw@redhat.com> | 2008-03-12 16:12:39 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-03-12 16:12:39 +0000 |
commit | f30cf17bf72ca883ef31d4c31250ccc0af56623c (patch) | |
tree | 8274fdf516f78cef05749002dcf3f2bb98932c2d /introspection | |
parent | 763913b20065d14fbb8e21701ed754ad7c5b6b42 (diff) | |
download | NetworkManager-f30cf17bf72ca883ef31d4c31250ccc0af56623c.tar.gz |
2008-03-12 Dan Williams <dcbw@redhat.com>
Move the 'carrier' property from NMDevice to NMDevice8023Ethernet;
convert the libnm-glib NMDevice8023Ethernet to cached properties
* introspection/nm-device-802-3-ethernet.xml
- New 'Carrier' property
- New 'PropertiesChanged' signal
* introspection/nm-device.xml
- Remove 'Carrier' property
- Remove 'CarrierChanged' signal
* src/nm-device-interface.c
src/nm-device-interface.h
- (nm_device_interface_init): remove 'carrier' property and
'carrier-changed' signal
* src/nm-device.c
src/nm-device.h
- (nm_device_get_carrier, nm_device_set_carrier): remove
- (nm_device_activate_stage5_ip_config_commit): don't bother updating
the link here; wired device will handle that
- (handle_dhcp_lease_change): don't bother updating link here
- (get_property, nm_device_class_init): remove carrier property
* src/nm-device-802-11-wireless.c
- (real_update_link, nm_device_802_11_wireless_class_init): remove
real_update_link(); wireless devices don't use carrier at all
- (link_timeout_cb, supplicant_iface_state_cb_handler,
supplicant_iface_connection_state_cb_handler,
supplicant_mgr_state_cb_handler): remove anything to do with carrier
* src/nm-device-802-3-ethernet.c
src/nm-device-802-3-ethernet.h
- (nm_device_802_3_ethernet_carrier_on,
nm_device_802_3_ethernet_carrier_off, constructor): use set_carrier()
instead of nm_device_set_carrier()
- (device_state_changed): update link from sysfs on activation;
replaces real_update_link()
- (real_update_link): remove, replaced by device_state_changed()
- (nm_device_802_3_ethernet_get_carrier, set_carrier): new functions
- (nm_device_802_3_ethernet_get_speed): move up with other getters/setters
- (real_get_generic_capabilities, real_can_interrupt_activation): use
new get_carrier function
- (get_property): add 'carrier' property
- (nm_device_802_3_ethernet_class_init): add 'carrier' property and
hook into property-changed signal helper
* src/NetworkManagerPolicy.c
- (device_carrier_changed): will only ever be called with a wired device
- (device_added): only hook up to carrier-changed for wired devices
* libnm-glib/nm-device.c
libnm-glib/nm-device.h
- (constructor, nm_device_class_init): remove carrier-changed signal
- (device_carrier_changed_proxy): remove; unused
- (nm_device_get_carrier): remove; carrier a property of wired devices
* libnm-glib/nm-device-802-3-ethernet.c
libnm-glib/nm-device-802-3-ethernet.h
- Convert to cached properties like AP and Wireless objects
- (nm_device_802_3_ethernet_get_hw_address): now returns a 'const char *'
instead of a 'char *', return value should not be freed
- (nm_device_802_3_ethernet_get_carrier): return current carrier status
- (constructor): hook into properties-changed helper
- (set_property, get_property): new functions
- (nm_device_802_3_ethernet_class_init): export GObject properties
* test/nm-tool.c
- (detail_device): strdup the wired hardware address too since it's
cached now
* libnm-glib/libnm-glib-test.c
- (dump_wired): strdup the wired hardware address too since it's
cached now
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'introspection')
-rw-r--r-- | introspection/nm-device-802-3-ethernet.xml | 17 | ||||
-rw-r--r-- | introspection/nm-device.xml | 12 |
2 files changed, 17 insertions, 12 deletions
diff --git a/introspection/nm-device-802-3-ethernet.xml b/introspection/nm-device-802-3-ethernet.xml index 7cd23fee37..cccae99b88 100644 --- a/introspection/nm-device-802-3-ethernet.xml +++ b/introspection/nm-device-802-3-ethernet.xml @@ -2,15 +2,32 @@ <node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> <interface name="org.freedesktop.NetworkManager.Device.Wired"> + <property name="HwAddress" type="s" access="read"> <tp:docstring> Hardware address of the device. </tp:docstring> </property> + <property name="Speed" type="u" access="read"> <tp:docstring> Design speed of the device. </tp:docstring> </property> + + <property name="Carrier" type="b" access="read"> + <tp:docstring> + Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not). + </tp:docstring> + </property> + + <signal name="PropertiesChanged"> + <arg name="properties" type="a{sv}" tp:type="String_Variant_Map"> + <tp:docstring> + A dictionary mapping property names to variant boxed values + </tp:docstring> + </arg> + </signal> + </interface> </node> diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index 531262894b..ecf1ec846c 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -44,11 +44,6 @@ Object path of the Ip4Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state. </tp:docstring> </property> - <property name="Carrier" type="b" access="read"> - <tp:docstring> - Indicates whether the physical carrier is found (e.g. the device is plugged in or associated to a network). - </tp:docstring> - </property> <!-- Ugh, but I see no other way of getting the type on the caller based on dbus object path only --> @@ -66,13 +61,6 @@ </arg> </signal> - <signal name="CarrierChanged"> - <arg name="carrier_on" type="b"> - <tp:docstring> - Boolean indicating whether the carrier is now on or off. - </tp:docstring> - </arg> - </signal> <tp:enum name="NM_DEVICE_STATE" type="u"> <tp:enumvalue suffix="UNKNOWN" value="0"> <tp:docstring> |