When WPS is supported it is added to the security string array.
This property might be only present for WiFi and
Cellular services.
- string Security [readonly]
+ array{string} Security [readonly]
If the service type is WiFi, then this property is
- present and contains the security method or key
- management setting.
+ present and contains the list of security methods
+ or key management settings.
- Possible values are "none", "wep", "psk" and
- also "ieee8021x". Alternate values for "psk"
- can also be "wpa" and "rsn".
+ Possible values are "none", "wep", "psk", "ieee8021x"
+ and also "wps". Alternate values for "psk" can also
+ be "wpa" and "rsn".
This property might be only present for WiFi
services.
passphrase is needed, then this property will
be set to false.
- boolean WPS [readonly]
-
- If the service type is Wifi, then this property
- indicates if it provides WPS (Wifi Protected Setup).
-
- If this is set to true, then if no Passphrase is
- provided or if given Passphrase is wrong, WPS
- push-button or pin methods will be available through
- Agent API.
-
uint8 Strength [readonly]
Indicates the signal strength of the service. This
DBUS_TYPE_BOOLEAN, &required);
}
+static void append_security(DBusMessageIter *iter, void *user_data)
+{
+ struct connman_service *service = user_data;
+ const char *str;
+
+ str = security2string(service->security);
+ if (str != NULL)
+ dbus_message_iter_append_basic(iter,
+ DBUS_TYPE_STRING, &str);
+
+ str = "wps";
+ if (service->wps == TRUE)
+ dbus_message_iter_append_basic(iter,
+ DBUS_TYPE_STRING, &str);
+}
+
static void append_ethernet(DBusMessageIter *iter, void *user_data)
{
struct connman_service *service = user_data;
connman_dbus_dict_append_basic(dict, "Mode",
DBUS_TYPE_STRING, &str);
- str = security2string(service->security);
- if (str != NULL)
- connman_dbus_dict_append_basic(dict, "Security",
- DBUS_TYPE_STRING, &str);
+ connman_dbus_dict_append_array(dict, "Security",
+ DBUS_TYPE_STRING, append_security, service);
str = state2string(service->state);
if (str != NULL)
connman_dbus_dict_append_basic(dict, "PassphraseRequired",
DBUS_TYPE_BOOLEAN, &required);
- connman_dbus_dict_append_basic(dict, "WPS",
- DBUS_TYPE_BOOLEAN, &service->wps);
/* fall through */
case CONNMAN_SERVICE_TYPE_ETHERNET:
case CONNMAN_SERVICE_TYPE_WIMAX:
"Ethernet", "Provider"]:
val = extract_values(properties[key])
elif key in ["Nameservers", "Nameservers.Configuration",
- "Domains", "Domains.Configuration"]:
+ "Domains", "Domains.Configuration",
+ "Security"]:
val = extract_list(properties[key])
elif key in ["Favorite", "Immutable", "AutoConnect",
- "SetupRequired", "PassphraseRequired", "WPS"]:
+ "SetupRequired", "PassphraseRequired"]:
if properties[key] == dbus.Boolean(1):
val = "true"
else:
"Ethernet", "Provider"]:
val = extract_values(properties[key])
elif key in ["Nameservers", "Nameservers.Configuration",
- "Domains", "Domains.Configuration"]:
+ "Domains", "Domains.Configuration",
+ "Security"]:
val = extract_list(properties[key])
elif key in ["Favorite", "Immutable", "AutoConnect",
"LoginRequired", "SetupRequired",
- "PassphraseRequired", "WPS"]:
+ "PassphraseRequired"]:
if properties[key] == dbus.Boolean(1):
val = "true"
else:
"Proxy", "Proxy.Configuration", "Ethernet"]:
val = extract_values(value)
elif name in ["Nameservers", "Nameservers.Configuration",
- "Domains", "Domains.Configuration"]:
+ "Domains", "Domains.Configuration"
+ "Security"]:
val = extract_list(value)
elif name in ["Strength", "Priority"]:
val = int(value)
"Available", "Remember", "Default",
"Favorite", "Immutable", "AutoConnect",
"LoginRequired", "SetupRequired",
- "PassphraseRequired", "WPS"]:
+ "PassphraseRequired"]:
if properties[key] == dbus.Boolean(1):
val = "true"
else:
val = extract_values(properties[key])
elif key in ["Nameservers", "Nameservers.Configuration",
- "Domains", "Domains.Configuration"]:
+ "Domains", "Domains.Configuration",
+ "Security"]:
val = extract_list(properties[key])
elif key in ["Strength", "Priority"]: