Remove unused secondary feature of devices and networks
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Dec 2009 08:09:11 +0000 (09:09 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Dec 2009 08:09:11 +0000 (09:09 +0100)
include/device.h
src/device.c
src/network.c

index 4474448..29949e8 100644 (file)
@@ -76,9 +76,6 @@ void connman_device_set_ident(struct connman_device *device,
 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);
index 3959ac9..fde5fd6 100644 (file)
@@ -36,7 +36,6 @@ struct connman_device {
        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;
@@ -811,10 +810,9 @@ struct connman_device *connman_device_create(const char *node,
 
        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;
 
@@ -1025,30 +1023,6 @@ enum connman_device_mode connman_device_get_mode(struct connman_device *device)
 }
 
 /**
- * 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
  * @powered: powered state
index c3f4a8d..cfde551 100644 (file)
@@ -36,7 +36,6 @@ struct connman_network {
        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;
@@ -380,7 +379,6 @@ struct connman_network *connman_network_create(const char *identifier,
        connman_element_set_uint8(&network->element, "Strength", strength);
 
        network->type       = type;
-       network->secondary  = FALSE;
        network->identifier = g_strdup(temp);
 
        return network;
@@ -495,9 +493,6 @@ void connman_network_set_protocol(struct connman_network *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:
@@ -552,9 +547,6 @@ const char *__connman_network_get_ident(struct connman_network *network)
 
 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:
@@ -1282,8 +1274,6 @@ static int network_probe(struct connman_element *element)
                return err;
        }
 
-       network->secondary = connman_device_get_secondary(network->device);
-
        switch (network->type) {
        case CONNMAN_NETWORK_TYPE_UNKNOWN:
        case CONNMAN_NETWORK_TYPE_VENDOR:
@@ -1296,7 +1286,7 @@ static int network_probe(struct connman_element *element)
        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;
        }
@@ -1328,7 +1318,7 @@ static void network_remove(struct connman_element *element)
        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);