Commit 57f8c996 authored by spiiroin's avatar spiiroin

[dbus] Expose dynamic mode configuration on D-Bus. JB#43928

When usb-moded causes network interfaces to be brought up/down, firewall
rules should be adjusted accordingly. However currently there is no way
for connman to know which interface changes might be related to for
example developer mode activation.

Expose dynamic usb mode configuration (attributes relevant to connman)
on D-Bus.

Broadcast a signal whenever target mode changes (mode transition begins,
or fallback mode gets activated due to mode transition errors).

Also provide a method call for querying the current target configuration.
Signed-off-by: spiiroin's avatarSimo Piiroinen <>
parent 7061235e
......@@ -25,6 +25,8 @@
send_interface="com.meego.usb_moded" send_member="get_net_config"/>
<allow send_destination="com.meego.usb_moded"
send_interface="com.meego.usb_moded" send_member="rescue_off"/>
<allow send_destination="com.meego.usb_moded"
send_interface="com.meego.usb_moded" send_member="get_target_mode_config"/>
<deny send_destination="com.meego.usb_moded"
send_interface="com.meego.usb_moded" send_member="set_whitelist"/>
<deny send_destination="com.meego.usb_moded"
......@@ -90,5 +90,11 @@
<signal name="sig_usb_whitelisted_modes_ind">
<arg name="modes" type="s"/>
<signal name="sig_usb_taget_mode_config_ind">
<arg name="config" type="a{sv}"/>
<method name="get_target_mode_config">
<arg name="config" type="a{sv}" direction="out"/>
This diff is collapsed.
......@@ -56,6 +56,7 @@
# define USB_MODE_HIDDEN_MODES_SIGNAL_NAME "sig_usb_hidden_modes_ind"
# define USB_MODE_WHITELISTED_MODES_SIGNAL_NAME "sig_usb_whitelisted_modes_ind"
# define USB_MODE_AVAILABLE_MODES_SIGNAL_NAME "sig_usb_available_modes_ind"
# define USB_MODE_TARGET_CONFIG_SIGNAL_NAME "sig_usb_taget_mode_config_ind"
/* supported methods */
# define USB_MODE_STATE_REQUEST "mode_request" /* returns the current mode */
......@@ -74,6 +75,7 @@
# define USB_MODE_WHITELISTED_MODES_SET "set_whitelisted_modes" /* set the list of whitelisted modes */
# define USB_MODE_WHITELISTED_SET "set_whitelisted" /* sets whether an specific mode is in the whitelist */
# define USB_MODE_AVAILABLE_MODES_GET "get_available_modes" /* returns a comma separated list of modes which are currently available for selection */
# define USB_MODE_TARGET_CONFIG_GET "get_target_mode_config" /* returns current target mode configuration */
* (Transient) states reported by "sig_usb_state_ind" that are not modes.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment