GUDev Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GUdevEnumerator; struct GUdevEnumeratorClass; GUdevEnumerator * g_udev_enumerator_new (GUdevClient *client
); GUdevEnumerator * g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
); GUdevEnumerator * g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
); GUdevEnumerator * g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
); GUdevEnumerator * g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
); GUdevEnumerator * g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
); GUdevEnumerator * g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator
,const gchar *name
); GUdevEnumerator * g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator
,const gchar *tag
); GUdevEnumerator * g_udev_enumerator_add_match_is_initialized (GUdevEnumerator *enumerator
); GUdevEnumerator * g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator
,const gchar *sysfs_path
); GList * g_udev_enumerator_execute (GUdevEnumerator *enumerator
);
typedef struct _GUdevEnumerator GUdevEnumerator;
The GUdevEnumerator struct is opaque and should not be accessed directly.
Since 165
struct GUdevEnumeratorClass { GObjectClass parent_class; };
Class structure for GUdevEnumerator.
GObjectClass |
Parent class. |
Since 165
GUdevEnumerator * g_udev_enumerator_new (GUdevClient *client
);
Constructs a GUdevEnumerator object that can be used to enumerate
and sort devices. Use the add_match_*() and add_nomatch_*() methods
and execute the query to get a list of devices with
g_udev_enumerator_execute()
.
|
A GUdevClient to enumerate devices from. |
Returns : |
A new GUdevEnumerator object. Free with g_object_unref() . |
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
);
All returned devices will match the given subsystem
.
|
A GUdevEnumerator. |
|
Wildcard for subsystem name e.g. 'scsi' or 'a*'. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator
,const gchar *subsystem
);
All returned devices will not match the given subsystem
.
|
A GUdevEnumerator. |
|
Wildcard for subsystem name e.g. 'scsi' or 'a*'. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will have a sysfs attribute matching the given name
and value
.
|
A GUdevEnumerator. |
|
Wildcard filter for sysfs attribute key. |
|
Wildcard filter for sysfs attribute value. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will not have a sysfs attribute matching the given name
and value
.
|
A GUdevEnumerator. |
|
Wildcard filter for sysfs attribute key. |
|
Wildcard filter for sysfs attribute value. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator
,const gchar *name
,const gchar *value
);
All returned devices will have a property matching the given name
and value
.
|
A GUdevEnumerator. |
|
Wildcard filter for property name. |
|
Wildcard filter for property value. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator
,const gchar *name
);
All returned devices will match the given name
.
|
A GUdevEnumerator. |
|
Wildcard filter for kernel name e.g. "sda*". |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator
,const gchar *tag
);
All returned devices will match the given tag
.
|
A GUdevEnumerator. |
|
A udev tag e.g. "udev-acl". |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_match_is_initialized
(GUdevEnumerator *enumerator
);
All returned devices will be initialized.
|
A GUdevEnumerator. |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GUdevEnumerator * g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator
,const gchar *sysfs_path
);
Add a device to the list of devices, to retrieve it back sorted in dependency order.
|
A GUdevEnumerator. |
|
A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda" |
Returns : |
The passed in enumerator . [transfer none]
|
Since 165
GList * g_udev_enumerator_execute (GUdevEnumerator *enumerator
);
Executes the query in enumerator
.
|
A GUdevEnumerator. |
Returns : |
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. [element-type GUdevDevice][transfer full]
|
Since 165
"client"
property"client" GUdevClient* : Read / Write / Construct Only
The GUdevClient to enumerate devices from.
Since 165