diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-03-11 21:10:13 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-03-11 21:10:13 +0100 |
commit | dd5db19baeec6c4d586b23cd590cce53bfea044d (patch) | |
tree | 8139113fabbd28da5cfd6298c88eb3fa46354b84 | |
parent | 64e21423a7872663e23bb369af56c6d0776b3658 (diff) | |
download | connman-dd5db19baeec6c4d586b23cd590cce53bfea044d.tar.gz connman-dd5db19baeec6c4d586b23cd590cce53bfea044d.tar.bz2 connman-dd5db19baeec6c4d586b23cd590cce53bfea044d.zip |
Add type for GPS based devices (just for power control)
-rw-r--r-- | include/device.h | 1 | ||||
-rw-r--r-- | src/detect.c | 2 | ||||
-rw-r--r-- | src/device.c | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/include/device.h b/include/device.h index 0f30100b..e4a735f1 100644 --- a/include/device.h +++ b/include/device.h @@ -41,6 +41,7 @@ enum connman_device_type { CONNMAN_DEVICE_TYPE_WIFI = 2, CONNMAN_DEVICE_TYPE_WIMAX = 3, CONNMAN_DEVICE_TYPE_BLUETOOTH = 4, + CONNMAN_DEVICE_TYPE_GPS = 5, CONNMAN_DEVICE_TYPE_HSO = 15, CONNMAN_DEVICE_TYPE_NOZOMI = 16, CONNMAN_DEVICE_TYPE_HUAWEI = 17, diff --git a/src/detect.c b/src/detect.c index 01e67b1f..d26dc29f 100644 --- a/src/detect.c +++ b/src/detect.c @@ -189,6 +189,7 @@ static void detect_newlink(unsigned short type, int index, name = index2ident(index, "dev_"); break; case CONNMAN_DEVICE_TYPE_BLUETOOTH: + case CONNMAN_DEVICE_TYPE_GPS: case CONNMAN_DEVICE_TYPE_HSO: case CONNMAN_DEVICE_TYPE_NOZOMI: case CONNMAN_DEVICE_TYPE_HUAWEI: @@ -211,6 +212,7 @@ static void detect_newlink(unsigned short type, int index, case CONNMAN_DEVICE_TYPE_NOZOMI: case CONNMAN_DEVICE_TYPE_HUAWEI: case CONNMAN_DEVICE_TYPE_NOVATEL: + case CONNMAN_DEVICE_TYPE_GPS: mode = CONNMAN_DEVICE_MODE_UNKNOWN; break; case CONNMAN_DEVICE_TYPE_ETHERNET: diff --git a/src/device.c b/src/device.c index 93a076f5..a07726a9 100644 --- a/src/device.c +++ b/src/device.c @@ -88,6 +88,8 @@ static const char *type2description(enum connman_device_type type) return "WiMAX"; case CONNMAN_DEVICE_TYPE_BLUETOOTH: return "Bluetooth"; + case CONNMAN_DEVICE_TYPE_GPS: + return "GPS"; case CONNMAN_DEVICE_TYPE_HSO: case CONNMAN_DEVICE_TYPE_NOZOMI: case CONNMAN_DEVICE_TYPE_HUAWEI: @@ -112,6 +114,8 @@ static const char *type2string(enum connman_device_type type) return "wimax"; case CONNMAN_DEVICE_TYPE_BLUETOOTH: return "bluetooth"; + case CONNMAN_DEVICE_TYPE_GPS: + return "gps"; case CONNMAN_DEVICE_TYPE_HSO: case CONNMAN_DEVICE_TYPE_HUAWEI: case CONNMAN_DEVICE_TYPE_NOZOMI: @@ -863,6 +867,10 @@ struct connman_device *connman_device_create(const char *node, device->priority = 50; device->scan_interval = 0; break; + case CONNMAN_DEVICE_TYPE_GPS: + device->priority = 0; + device->scan_interval = 0; + break; case CONNMAN_DEVICE_TYPE_HSO: case CONNMAN_DEVICE_TYPE_NOZOMI: case CONNMAN_DEVICE_TYPE_HUAWEI: |