Home | History | Annotate | Download | only in src

Lines Matching refs:device

24  * separated list of absolute paths to file that contain device descriptions for
27 * Device description files are standard GKeyFile's. Each device is a group. By
28 * convention, we use the device name as the group name. A device description
31 * [device]
32 * name=device
37 * The "parent" property on a device specifies a device path that will be looked
38 * up with g_udev_client_query_by_device_file() to find a parent device. This
39 * may be a real device that the real libgudev will return a device for, or it
40 * may be another fake device handled by this library.
128 /* Map from device paths (/dev/pts/1) to FakeGUdevDevice objects */
203 fake_g_udev_debug ("Loading fake device %s", group);
207 fake_g_udev_debug ("Warning: Device %s does not have a |%s|.",
215 fake_g_udev_debug ("Warning: Device %s does not have a |%s|.",
223 /* Ensure this device has not been seen before. */
245 /* Now add the fake device with all its properties. */
288 fake_g_udev_debug ("No device descriptor file given!");
322 /* If |device| is a FakeGUdevDevice registered earlier with the libarary, cast
323 * |device| into a FakeGUdevDevice, otherwise return NULL
326 get_fake_g_udev_device (GUdevDevice *device)
333 if (!FAKE_G_UDEV_IS_DEVICE (device))
335 fake_device = FAKE_G_UDEV_DEVICE (device);
396 * This is our hook. We look for a particular device path
483 * Our device data is a glib hash table with string keys and values;
489 * the device is "ours", and if not, delegate to the real library
493 g_udev_device_get_device_file (GUdevDevice *device)
498 fake_device = get_fake_g_udev_device (device);
505 return realfunc (device);
509 g_udev_device_get_devtype (GUdevDevice *device)
514 fake_device = get_fake_g_udev_device (device);
521 return realfunc (device);
525 g_udev_device_get_driver (GUdevDevice *device)
530 fake_device = get_fake_g_udev_device (device);
537 return realfunc (device);
541 g_udev_device_get_name (GUdevDevice *device)
546 fake_device = get_fake_g_udev_device (device);
553 return realfunc (device);
557 g_udev_device_get_parent (GUdevDevice *device)
562 fake_device = get_fake_g_udev_device (device);
575 return realfunc (device);
579 g_udev_device_get_property (GUdevDevice *device,
585 fake_device = get_fake_g_udev_device (device);
597 return realfunc (device, key);
608 g_udev_device_get_property_as_boolean (GUdevDevice *device,
611 g_udev_device_get_property_as_int (GUdevDevice *device,
613 guint64 g_udev_device_get_property_as_uint64 (FakeGUdevDevice *device,
615 gdouble g_udev_device_get_property_as_double (FakeGUdevDevice *device,
618 const gchar* const *g_udev_device_get_property_as_strv (FakeGUdevDevice *device,
623 g_udev_device_get_property_keys (GUdevDevice *device)
628 fake_device = get_fake_g_udev_device (device);
659 return realfunc (device);
664 g_udev_device_get_subsystem (GUdevDevice *device)
669 fake_device = get_fake_g_udev_device (device);
676 return realfunc (device);
684 g_udev_device_get_sysfs_attr (GUdevDevice *device, const gchar *name)
689 fake_device = get_fake_g_udev_device (device);
701 return realfunc (device, name);
706 g_udev_device_get_sysfs_path (GUdevDevice *device)
711 fake_device = get_fake_g_udev_device (device);
718 return realfunc (device);
723 const gchar *g_udev_device_get_number (FakeGUdevDevice *device);
724 const gchar *g_udev_device_get_action (FakeGUdevDevice *device);
725 guint64 g_udev_device_get_seqnum (FakeGUdevDevice *device);
726 FakeGUdevDeviceType g_udev_device_get_device_type (FakeGUdevDevice *device);
727 FakeGUdevDeviceNumber g_udev_device_get_device_number (FakeGUdevDevice *device);
729 g_udev_device_get_device_file_symlinks (FakeGUdevDevice *device);
731 g_udev_device_get_parent_with_subsystem (FakeGUdevDevice *device,
734 const gchar * const *g_udev_device_get_tags (FakeGUdevDevice *device);
735 gboolean g_udev_device_get_is_initialized (FakeGUdevDevice *device);
736 guint64 g_udev_device_get_usec_since_initialized (FakeGUdevDevice *device);
737 gboolean g_udev_device_has_property (FakeGUdevDevice *device, const gchar *key);
741 fake_g_udev_device_init (FakeGUdevDevice *device)
743 device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device,
747 device->priv->properties = g_hash_table_new_full (g_str_hash,
751 device->priv->propkeys = NULL;
752 device->priv->client = NULL;
758 FakeGUdevDevice *device = FAKE_G_UDEV_DEVICE (object);
760 if (device->priv->client)
761 g_object_unref (device->priv->client);
762 g_free (device->priv->propkeys);
763 g_hash_table_unref (device->priv->properties);