X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fgudev%2Fgudevclient.c;h=97b951adcd421e559c4a2d7b3b822eb95dd01f1d;hb=eabac232a51b8d8dc2f6897018968bfe96d2912d;hp=e829ca314bd8a97d1f452e33774047ad607d4b06;hpb=cbdf255e255adc0f30b40be296fbbf2f3cd2be80;p=elogind.git diff --git a/extras/gudev/gudevclient.c b/extras/gudev/gudevclient.c index e829ca314..97b951adc 100644 --- a/extras/gudev/gudevclient.c +++ b/extras/gudev/gudevclient.c @@ -47,12 +47,13 @@ * memory) and as such there are no asynchronous versions of the * provided methods. * - * To get information about a device, use + * To get #GUdevDevice objects, use * g_udev_client_query_by_subsystem(), * g_udev_client_query_by_device_number(), * g_udev_client_query_by_device_file(), - * g_udev_client_query_by_sysfs_path() or - * g_udev_client_query_by_subsystem_and_name(). + * g_udev_client_query_by_sysfs_path(), + * g_udev_client_query_by_subsystem_and_name() + * or the #GUdevEnumerator type. * * To listen to uevents, connect to the #GUdevClient::uevent signal. */ @@ -316,7 +317,7 @@ g_udev_client_init (GUdevClient *client) /** * g_udev_client_new: - * @subsystems: (allow-none): A %NULL terminated string array of subsystems to listen for uevents on, %NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the #GUdevClient:subsystems property for details on this parameter. + * @subsystems: (array zero-terminated=1) (element-type utf8) (transfer none) (allow-none): A %NULL terminated string array of subsystems to listen for uevents on, %NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the #GUdevClient:subsystems property for details on this parameter. * * Constructs a #GUdevClient object that can be used to query * information about devices. Connect to the #GUdevClient::uevent @@ -339,7 +340,7 @@ g_udev_client_new (const gchar * const *subsystems) * * Gets all devices belonging to @subsystem. * - * Returns: (element-type GUdevDevice): A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. + * Returns: (element-type GUdevDevice) (transfer full): A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. */ GList * g_udev_client_query_by_subsystem (GUdevClient *client, @@ -392,7 +393,7 @@ g_udev_client_query_by_subsystem (GUdevClient *client, * * Looks up a device for a type and device number. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_device_number (GUdevClient *client, @@ -424,7 +425,7 @@ g_udev_client_query_by_device_number (GUdevClient *client, * * Looks up a device for a device file. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_device_file (GUdevClient *client, @@ -460,7 +461,7 @@ g_udev_client_query_by_device_file (GUdevClient *client, * * Looks up a device for a sysfs path. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_sysfs_path (GUdevClient *client, @@ -492,7 +493,7 @@ g_udev_client_query_by_sysfs_path (GUdevClient *client, * * Looks up a device for a subsystem and name. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_subsystem_and_name (GUdevClient *client, @@ -518,3 +519,10 @@ g_udev_client_query_by_subsystem_and_name (GUdevClient *client, return device; } +struct udev * +_g_udev_client_get_udev (GUdevClient *client) +{ + g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL); + return client->priv->udev; +} +