Lines Matching defs:hal_ctx
48 LibHalContext *hal_ctx;
74 get_prop_string(LibHalContext * hal_ctx, const char *udi, const char *name)
78 prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
93 get_prop_string_array(LibHalContext * hal_ctx, const char *udi,
99 props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL);
128 device_added(LibHalContext * hal_ctx, const char *udi)
145 driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
153 path = get_prop_string(hal_ctx, udi, "input.device");
161 name = get_prop_string(hal_ctx, udi, "info.product");
167 attrs.vendor = get_prop_string(hal_ctx, udi, "info.vendor");
168 hal_tags = get_prop_string(hal_ctx, udi, "input.tags");
172 if (libhal_device_query_capability(hal_ctx, udi, "input.keys", NULL))
174 if (libhal_device_query_capability(hal_ctx, udi, "input.mouse", NULL))
176 if (libhal_device_query_capability(hal_ctx, udi, "input.joystick", NULL))
178 if (libhal_device_query_capability(hal_ctx, udi, "input.tablet", NULL))
180 if (libhal_device_query_capability(hal_ctx, udi, "input.tablet_pad", NULL))
182 if (libhal_device_query_capability(hal_ctx, udi, "input.touchpad", NULL))
184 if (libhal_device_query_capability(hal_ctx, udi, "input.touchscreen", NULL))
187 parent = get_prop_string(hal_ctx, udi, "info.parent");
193 usb_vendor = libhal_device_get_property_int(hal_ctx, parent,
198 usb_product = libhal_device_get_property_int(hal_ctx, parent,
208 attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
212 (parent = get_prop_string(hal_ctx, parent, "info.parent"))) {
213 attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id");
252 set = libhal_device_get_all_properties(hal_ctx, udi, &error);
274 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
322 get_prop_string_array(hal_ctx, udi, psi_key))) {
334 tmp_val = get_prop_string(hal_ctx, udi, psi_key);
364 tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
448 if (info->hal_ctx) {
451 if (!libhal_ctx_shutdown(info->hal_ctx, &error))
457 libhal_ctx_free(info->hal_ctx);
460 info->hal_ctx = NULL;
471 if (info->hal_ctx)
478 info->hal_ctx = libhal_ctx_new();
479 if (!info->hal_ctx) {
484 if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
489 if (!libhal_ctx_init(info->hal_ctx, &error)) {
496 if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
503 libhal_ctx_set_device_added(info->hal_ctx, device_added);
504 libhal_ctx_set_device_removed(info->hal_ctx, device_removed);
506 devices = libhal_find_device_by_capability(info->hal_ctx, "input",
516 device_added(info->hal_ctx, devices[i]);
526 if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
537 if (info->hal_ctx) {
538 libhal_ctx_free(info->hal_ctx);
541 info->hal_ctx = NULL;
658 hal_info.hal_ctx = NULL;