udev_queue

## udev_queue udev_queue — access to currently active events |

## Synopsis

    struct              udev_queue;
    struct udev_queue * udev_queue_ref                      (struct udev_queue *udev_queue);
    struct udev_queue * udev_queue_unref                    (struct udev_queue *udev_queue);
    struct udev *       udev_queue_get_udev                 (struct udev_queue *udev_queue);
    struct udev_queue * udev_queue_new                      (struct udev *udev);
    int                 udev_queue_get_udev_is_active       (struct udev_queue *udev_queue);
    int                 udev_queue_get_queue_is_empty       (struct udev_queue *udev_queue);
    int                 udev_queue_get_seqnum_is_finished   (struct udev_queue *udev_queue,
                                                             unsigned long long int seqnum);
    int                 udev_queue_get_seqnum_sequence_is_finished
                                                            (struct udev_queue *udev_queue,
                                                             unsigned long long int start,
                                                             unsigned long long int end);
    struct udev_list_entry * udev_queue_get_queued_list_entry
                                                            (struct udev_queue *udev_queue);
    unsigned long long int udev_queue_get_kernel_seqnum     (struct udev_queue *udev_queue);
    unsigned long long int udev_queue_get_udev_seqnum       (struct udev_queue *udev_queue);
    int                 udev_queue_get_fd                   (struct udev_queue *udev_queue);
    int                 udev_queue_flush                    (struct udev_queue *udev_queue);

## Description

This exports the current state of the udev processing queue.

## Details

### struct udev_queue

    struct udev_queue;

Opaque object representing the current event queue in the udev daemon.

### udev_queue_ref ()

    struct udev_queue * udev_queue_ref                      (struct udev_queue *udev_queue);

Take a reference of a udev queue context.

`udev_queue` : | udev queue context
Returns : | the same udev queue context.

### udev_queue_unref ()

    struct udev_queue * udev_queue_unref                    (struct udev_queue *udev_queue);

Drop a reference of a udev queue context. If the refcount reaches zero, the resources of the queue context will be released.

`udev_queue` : | udev queue context
Returns : | NULL

### udev_queue_get_udev ()

    struct udev *       udev_queue_get_udev                 (struct udev_queue *udev_queue);

Retrieve the udev library context the queue context was created with.

`udev_queue` : | udev queue context
Returns : | the udev library context.

### udev_queue_new ()

    struct udev_queue * udev_queue_new                      (struct udev *udev);

The initial refcount is 1, and needs to be decremented to release the resources of the udev queue context.

`udev` : | udev library context
Returns : | the udev queue context, or NULL on error.

### udev_queue_get_udev_is_active ()

    int                 udev_queue_get_udev_is_active       (struct udev_queue *udev_queue);

Check if udev is active on the system.

`udev_queue` : | udev queue context
Returns : | a flag indicating if udev is active.

### udev_queue_get_queue_is_empty ()

    int                 udev_queue_get_queue_is_empty       (struct udev_queue *udev_queue);

Check if udev is currently processing any events.

`udev_queue` : | udev queue context
Returns : | a flag indicating if udev is currently handling events.

### udev_queue_get_seqnum_is_finished ()

    int                 udev_queue_get_seqnum_is_finished   (struct udev_queue *udev_queue,
                                                             unsigned long long int seqnum);

This function is deprecated, it just returns the result of `udev_queue_get_queue_is_empty()`.

`udev_queue` : | udev queue context
`seqnum` : | sequence number
Returns : | a flag indicating if udev is currently handling events.

### udev_queue_get_seqnum_sequence_is_finished ()

    int                 udev_queue_get_seqnum_sequence_is_finished
                                                            (struct udev_queue *udev_queue,
                                                             unsigned long long int start,
                                                             unsigned long long int end);

This function is deprecated, it just returns the result of `udev_queue_get_queue_is_empty()`.

`udev_queue` : | udev queue context
`start` : | first event sequence number
`end` : | last event sequence number
Returns : | a flag indicating if udev is currently handling events.

### udev_queue_get_queued_list_entry ()

    struct udev_list_entry * udev_queue_get_queued_list_entry
                                                            (struct udev_queue *udev_queue);

This function is deprecated.

`udev_queue` : | udev queue context
Returns : | NULL.

### udev_queue_get_kernel_seqnum ()

    unsigned long long int udev_queue_get_kernel_seqnum     (struct udev_queue *udev_queue);

This function is deprecated.

`udev_queue` : | udev queue context
Returns : | 0.

### udev_queue_get_udev_seqnum ()

    unsigned long long int udev_queue_get_udev_seqnum       (struct udev_queue *udev_queue);

This function is deprecated.

`udev_queue` : | udev queue context
Returns : | 0.

### udev_queue_get_fd ()

    int                 udev_queue_get_fd                   (struct udev_queue *udev_queue);

### udev_queue_flush ()

    int                 udev_queue_flush                    (struct udev_queue *udev_queue);