efl/eeze: remove other traces of old libudev support.

SVN revision: 82101
This commit is contained in:
Gustavo Sverzut Barbieri 2013-01-03 20:42:37 +00:00
parent 68188ac0c8
commit e4654ee6cf
3 changed files with 2 additions and 125 deletions

View File

@ -165,34 +165,22 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
case EEZE_UDEV_TYPE_KEYBOARD:
udev_enumerate_add_match_subsystem(en, "input");
#ifndef OLD_UDEV_RRRRRRRRRRRRRR
udev_enumerate_add_match_property(en, "ID_INPUT_KEYBOARD", "1");
#else
udev_enumerate_add_match_property(en, "ID_CLASS", "kbd");
#endif
break;
case EEZE_UDEV_TYPE_MOUSE:
udev_enumerate_add_match_subsystem(en, "input");
#ifndef OLD_UDEV_RRRRRRRRRRRRRR
udev_enumerate_add_match_property(en, "ID_INPUT_MOUSE", "1");
#else
udev_enumerate_add_match_property(en, "ID_CLASS", "mouse");
#endif
break;
case EEZE_UDEV_TYPE_TOUCHPAD:
udev_enumerate_add_match_subsystem(en, "input");
#ifndef OLD_UDEV_RRRRRRRRRRRRRR
udev_enumerate_add_match_property(en, "ID_INPUT_TOUCHPAD", "1");
#endif
break;
case EEZE_UDEV_TYPE_JOYSTICK:
udev_enumerate_add_match_subsystem(en, "input");
#ifndef OLD_UDEV_RRRRRRRRRRRRRR
udev_enumerate_add_match_property(en, "ID_INPUT_JOYSTICK", "1");
#endif
break;
case EEZE_UDEV_TYPE_DRIVE_MOUNTABLE:

View File

@ -155,24 +155,12 @@ eeze_udev_syspath_is_mouse(const char *syspath)
if (!(device = _new_device(syspath)))
return EINA_FALSE;
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
mouse = _walk_parents_test_attr(device, "bInterfaceProtocol", "02");
if (!mouse)
{
test = udev_device_get_property_value(device, "ID_CLASS");
if ((test) && (!strcmp(test, "mouse")))
mouse = EINA_TRUE;
}
#else
test = udev_device_get_property_value(device, "ID_INPUT_MOUSE");
if (test && (test[0] == '1'))
mouse = EINA_TRUE;
#endif
udev_device_unref(device);
return mouse;
}
@ -189,24 +177,12 @@ eeze_udev_syspath_is_kbd(const char *syspath)
if (!(device = _new_device(syspath)))
return EINA_FALSE;
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
kbd = _walk_parents_test_attr(device, "bInterfaceProtocol", "01");
if (!kbd)
{
test = udev_device_get_property_value(device, "ID_CLASS");
if ((test) && (!strcmp(test, "kbd")))
kbd = EINA_TRUE;
}
#else
test = udev_device_get_property_value(device, "ID_INPUT_KEYBOARD");
if (test && (test[0] == '1'))
kbd = EINA_TRUE;
#endif
udev_device_unref(device);
return kbd;
}
@ -216,22 +192,19 @@ eeze_udev_syspath_is_touchpad(const char *syspath)
{
_udev_device *device = NULL;
Eina_Bool touchpad = EINA_FALSE;
const char *test;
if (!syspath)
return EINA_FALSE;
if (!(device = _new_device(syspath)))
return EINA_FALSE;
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
touchpad = _walk_parents_test_attr(device, "resolution", NULL);
#else
const char *test;
test = udev_device_get_property_value(device, "ID_INPUT_TOUCHPAD");
if (test && (test[0] == '1'))
touchpad = EINA_TRUE;
#endif
udev_device_unref(device);
return touchpad;
}
@ -248,18 +221,12 @@ eeze_udev_syspath_is_joystick(const char *syspath)
if (!(device = _new_device(syspath)))
return EINA_FALSE;
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
test = udev_device_get_property_value(device, "ID_CLASS");
if ((test) && (!strcmp(test, "joystick")))
joystick = EINA_TRUE;
#else
test = udev_device_get_property_value(device, "ID_INPUT_JOYSTICK");
if (test && (test[0] == '1'))
joystick = EINA_TRUE;
#endif
udev_device_unref(device);
return joystick;
}

View File

@ -111,19 +111,6 @@ _get_syspath_from_watch(void *data,
switch (store->type)
{
case EEZE_UDEV_TYPE_KEYBOARD:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "input")))
goto error;
test = udev_device_get_property_value(device, "ID_CLASS");
if ((_walk_parents_test_attr(device, "bInterfaceProtocol", "01"))
|| ((test) && (!strcmp(test, "kbd"))))
break;
goto error;
#endif
if ((!udev_device_get_property_value(device, "ID_INPUT_KEYBOARD")) &&
(!udev_device_get_property_value(device, "ID_INPUT_KEY")))
goto error;
@ -131,65 +118,24 @@ _get_syspath_from_watch(void *data,
break;
case EEZE_UDEV_TYPE_MOUSE:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "input")))
goto error;
test = udev_device_get_property_value(device, "ID_CLASS");
if ((_walk_parents_test_attr(device, "bInterfaceProtocol", "02"))
|| ((test) && (!strcmp(test, "mouse"))))
break;
goto error;
#endif
if (!udev_device_get_property_value(device, "ID_INPUT_MOUSE"))
goto error;
break;
case EEZE_UDEV_TYPE_TOUCHPAD:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "input")))
goto error;
if (_walk_parents_test_attr(device, "resolution", NULL))
break;
goto error;
#endif
if (!udev_device_get_property_value(device, "ID_INPUT_TOUCHPAD"))
goto error;
break;
case EEZE_UDEV_TYPE_JOYSTICK:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "input")))
goto error;
test = udev_device_get_property_value(device, "ID_CLASS");
if ((test) && (!strcmp(test, "joystick")))
break;
goto error;
#endif
if (!udev_device_get_property_value(device, "ID_INPUT_JOYSTICK"))
goto error;
break;
case EEZE_UDEV_TYPE_DRIVE_MOUNTABLE:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "block")))
goto error;
#endif
if (!(test = (udev_device_get_property_value(device, "ID_FS_USAGE"))) ||
(strcmp("filesystem", test)))
{
@ -237,31 +183,16 @@ _get_syspath_from_watch(void *data,
break;
case EEZE_UDEV_TYPE_POWER_AC:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "power_supply")))
goto error;
#endif
test = udev_device_get_property_value(device, "POWER_SUPPLY_ONLINE");
if (!test) goto error;
break;
case EEZE_UDEV_TYPE_POWER_BAT:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "power_supply")))
goto error;
#endif
test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT");
if ((!test) || (strcmp(test, "1"))) goto error;
break;
case EEZE_UDEV_TYPE_NET:
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "net")))
goto error;
#endif
break;
case EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR:
@ -269,11 +200,6 @@ _get_syspath_from_watch(void *data,
Eina_Bool one, two;
const char *t;
#ifdef OLD_UDEV_RRRRRRRRRRRRRR
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "hwmon")))
goto error;
#endif /* have to do stuff up here since we need info from the parent */
one = _walk_parents_test_attr(device, "temp1_input", NULL);
two = _walk_parents_test_attr(device, "temp2_input", NULL);
if ((!one) && (!two)) goto error;
@ -341,8 +267,6 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
if (!(mon = udev_monitor_new_from_netlink(udev, "udev")))
goto error;
#ifndef OLD_UDEV_RRRRRRRRRRRRRR
switch (type)
{
case EEZE_UDEV_TYPE_JOYSTICK:
@ -395,8 +319,6 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
break;
}
#endif
if (udev_monitor_enable_receiving(mon))
goto error;