Lines Matching defs:hal_ctx
49 LibHalContext *hal_ctx;
75 get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
79 prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
93 get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
98 props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL);
127 device_added(LibHalContext *hal_ctx, const char *udi)
145 driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
152 path = get_prop_string(hal_ctx, udi, "input.device");
159 name = get_prop_string(hal_ctx, udi, "info.product");
165 attrs.vendor = get_prop_string(hal_ctx, udi, "info.vendor");
166 hal_tags = get_prop_string(hal_ctx, udi, "input.tags");
170 if (libhal_device_query_capability(hal_ctx, udi, "input.keys", NULL))
172 if (libhal_device_query_capability(hal_ctx, udi, "input.mouse", NULL))
174 if (libhal_device_query_capability(hal_ctx, udi, "input.joystick", NULL))
176 if (libhal_device_query_capability(hal_ctx, udi, "input.tablet", NULL))
178 if (libhal_device_query_capability(hal_ctx, udi, "input.touchpad", NULL))
180 if (libhal_device_query_capability(hal_ctx, udi, "input.touchscreen", NULL))
183 parent = get_prop_string(hal_ctx, udi, "info.parent");
187 attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
190 usb_vendor = libhal_device_get_property_int(hal_ctx, parent,
195 usb_product = libhal_device_get_property_int(hal_ctx, parent,
244 set = libhal_device_get_all_properties(hal_ctx, udi, &error);
264 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
310 (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key)))
320 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
351 tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
434 if (info->hal_ctx) {
437 if (!libhal_ctx_shutdown(info->hal_ctx, &error))
442 libhal_ctx_free(info->hal_ctx);
445 info->hal_ctx = NULL;
456 if (info->hal_ctx)
463 info->hal_ctx = libhal_ctx_new();
464 if (!info->hal_ctx) {
469 if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
473 if (!libhal_ctx_init(info->hal_ctx, &error)) {
479 if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
485 libhal_ctx_set_device_added(info->hal_ctx, device_added);
486 libhal_ctx_set_device_removed(info->hal_ctx, device_removed);
488 devices = libhal_find_device_by_capability(info->hal_ctx, "input",
498 device_added(info->hal_ctx, devices[i]);
508 if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
518 if (info->hal_ctx) {
519 libhal_ctx_free(info->hal_ctx);
522 info->hal_ctx = NULL;
638 hal_info.hal_ctx = NULL;