void connman_device_set_mode(struct connman_device *device,
enum connman_device_mode mode);
enum connman_device_mode connman_device_get_mode(struct connman_device *device);
-void connman_device_set_secondary(struct connman_device *device,
- connman_bool_t secondary);
-connman_bool_t connman_device_get_secondary(struct connman_device *device);
int connman_device_set_powered(struct connman_device *device,
connman_bool_t powered);
struct connman_element element;
enum connman_device_type type;
enum connman_device_mode mode;
- connman_bool_t secondary;
connman_bool_t offlinemode;
connman_bool_t blocked;
connman_bool_t powered;
device->element.ipv4.method = CONNMAN_IPCONFIG_METHOD_DHCP;
- device->type = type;
- device->name = g_strdup(type2description(device->type));
- device->mode = CONNMAN_DEVICE_MODE_UNKNOWN;
- device->secondary = FALSE;
+ device->type = type;
+ device->name = g_strdup(type2description(device->type));
+ device->mode = CONNMAN_DEVICE_MODE_UNKNOWN;
device->powered_persistent = TRUE;
return device->mode;
}
-/**
- * connman_device_set_secondary:
- * @device: device structure
- * @secondary: secondary value
- *
- * Change secondary value of device
- */
-void connman_device_set_secondary(struct connman_device *device,
- connman_bool_t secondary)
-{
- device->secondary = secondary;
-}
-
-/**
- * connman_device_get_secondary:
- * @device: device structure
- *
- * Get secondary value of device
- */
-connman_bool_t connman_device_get_secondary(struct connman_device *device)
-{
- return device->secondary;
-}
-
/**
* connman_device_set_powered:
* @device: device structure
struct connman_element element;
enum connman_network_type type;
enum connman_network_protocol protocol;
- connman_bool_t secondary;
connman_bool_t available;
connman_bool_t connected;
connman_bool_t roaming;
connman_element_set_uint8(&network->element, "Strength", strength);
network->type = type;
- network->secondary = FALSE;
network->identifier = g_strdup(temp);
return network;
void connman_network_set_group(struct connman_network *network,
const char *group)
{
- if (network->secondary == TRUE)
- return;
-
switch (network->type) {
case CONNMAN_NETWORK_TYPE_UNKNOWN:
case CONNMAN_NETWORK_TYPE_VENDOR:
connman_bool_t __connman_network_get_weakness(struct connman_network *network)
{
- if (network->secondary == TRUE)
- return FALSE;
-
switch (network->type) {
case CONNMAN_NETWORK_TYPE_UNKNOWN:
case CONNMAN_NETWORK_TYPE_VENDOR:
return err;
}
- network->secondary = connman_device_get_secondary(network->device);
-
switch (network->type) {
case CONNMAN_NETWORK_TYPE_UNKNOWN:
case CONNMAN_NETWORK_TYPE_VENDOR:
case CONNMAN_NETWORK_TYPE_HSO:
case CONNMAN_NETWORK_TYPE_WIFI:
case CONNMAN_NETWORK_TYPE_WIMAX:
- if (network->group != NULL && network->secondary == FALSE)
+ if (network->group != NULL)
__connman_profile_add_network(network);
break;
}
case CONNMAN_NETWORK_TYPE_HSO:
case CONNMAN_NETWORK_TYPE_WIFI:
case CONNMAN_NETWORK_TYPE_WIMAX:
- if (network->group != NULL && network->secondary == FALSE) {
+ if (network->group != NULL) {
__connman_profile_remove_network(network);
g_free(network->group);