summaryrefslogtreecommitdiff
path: root/src/dkp-hid.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-10-23 13:54:33 +0100
committerRichard Hughes <richard@hughsie.com>2008-10-23 13:54:33 +0100
commit760dc570f25f8d3718984c8d509caddade784579 (patch)
tree51a89bc5ceea855d320c666be527112046865bac /src/dkp-hid.c
parentb43fa536fbd4a7b05ffddda25b461baf01038601 (diff)
trivial: 'unexport' dkp_acpi_to_device_technology
Diffstat (limited to 'src/dkp-hid.c')
-rw-r--r--src/dkp-hid.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/dkp-hid.c b/src/dkp-hid.c
index 69dfa95..90320fc 100644
--- a/src/dkp-hid.c
+++ b/src/dkp-hid.c
@@ -169,6 +169,20 @@ dkp_hid_get_string (DkpHid *hid, int sindex)
}
/**
+ * dkp_hid_convert_device_technology:
+ **/
+static DkpDeviceTechnology
+dkp_hid_convert_device_technology (const gchar *type)
+{
+ if (type == NULL)
+ return DKP_DEVICE_TECHNOLGY_UNKNOWN;
+ if (strcasecmp (type, "pb") == 0 ||
+ strcasecmp (type, "pbac") == 0)
+ return DKP_DEVICE_TECHNOLGY_LEAD_ACID;
+ return DKP_DEVICE_TECHNOLGY_UNKNOWN;
+}
+
+/**
* dkp_hid_set_obj:
**/
static gboolean
@@ -202,7 +216,7 @@ dkp_hid_set_obj (DkpHid *hid, int code, int value)
break;
case DKP_HID_CHEMISTRY:
type = dkp_hid_get_string (hid, value);
- obj->technology = dkp_acpi_to_device_technology (type);
+ obj->technology = dkp_hid_convert_device_technology (type);
break;
case DKP_HID_RECHARGEABLE:
obj->is_rechargeable = (value != 0);