UDisks Reference Manual: UDisksCrypttabMonitor

## UDisksCrypttabMonitor UDisksCrypttabMonitor — Monitors entries in the crypttab file |

## Functions

const gchar * | udisks_crypttab_entry_get_name ()
const gchar * | udisks_crypttab_entry_get_device ()
const gchar * | udisks_crypttab_entry_get_passphrase_path ()
const gchar * | udisks_crypttab_entry_get_options ()
gint | udisks_crypttab_entry_compare ()
UDisksCrypttabMonitor * | udisks_crypttab_monitor_new ()
GList * | udisks_crypttab_monitor_get_entries ()

## Signals

void | entry-added | Has Details
void | entry-removed | Has Details

## Types and Values

| UDisksCrypttabEntry
| UDisksCrypttabMonitor

## Object Hierarchy

        GObject
        ├── UDisksCrypttabEntry
        ╰── UDisksCrypttabMonitor

## Description

This type is used for monitoring entries in the `/etc/crypttab` file.

## Functions

### udisks_crypttab_entry_get_name ()

    const gchar *
    udisks_crypttab_entry_get_name (UDisksCrypttabEntry *entry);

Gets the name field of `entry` .

#### Parameters

entry | A UDisksCrypttabEntry. |

#### Returns

The name field.

### udisks_crypttab_entry_get_device ()

    const gchar *
    udisks_crypttab_entry_get_device (UDisksCrypttabEntry *entry);

Gets the device field of `entry` .

#### Parameters

entry | A UDisksCrypttabEntry. |

#### Returns

The device field.

### udisks_crypttab_entry_get_passphrase_path ()

    const gchar *
    udisks_crypttab_entry_get_passphrase_path
                                   (UDisksCrypttabEntry *entry);

Gets the passphrase path field of `entry` .

#### Parameters

entry | A UDisksCrypttabEntry. |

#### Returns

The passphrase path field.

### udisks_crypttab_entry_get_options ()

    const gchar *
    udisks_crypttab_entry_get_options (UDisksCrypttabEntry *entry);

Gets the options field of `entry` .

#### Parameters

entry | A UDisksCrypttabEntry. |

#### Returns

The options field.

### udisks_crypttab_entry_compare ()

    gint
    udisks_crypttab_entry_compare (UDisksCrypttabEntry *entry,
                                   UDisksCrypttabEntry *other_entry);

Comparison function for comparing two UDisksCrypttabEntry objects.

#### Parameters

entry | A UDisksCrypttabEntry |
other_entry | Another UDisksCrypttabEntry. |

#### Returns

Negative value if `entry` < `other_entry` ; zero if `entry` = `other_entry` ; positive value if `entry` > `other_entry` .

### udisks_crypttab_monitor_new ()

    UDisksCrypttabMonitor *
    udisks_crypttab_monitor_new (void);

Creates a new UDisksCrypttabMonitor object.

Signals are emitted in the thread-default main loop that this function is called from.

#### Returns

A UDisksCrypttabMonitor. Free with `g_object_unref()`.

### udisks_crypttab_monitor_get_entries ()

    GList *
    udisks_crypttab_monitor_get_entries (UDisksCrypttabMonitor *monitor);

Gets all /etc/crypttab entries

#### Parameters

monitor | A UDisksCrypttabMonitor. |

#### Returns

A list of UDisksCrypttabEntry objects that must be freed with `g_list_free()` after each element has been freed with `g_object_unref()`.

[transfer full][element-type UDisksCrypttabEntry]

## Types and Values

### UDisksCrypttabEntry

    typedef struct _UDisksCrypttabEntry UDisksCrypttabEntry;

The UDisksCrypttabEntry structure contains only private data and should only be accessed using the provided API.

### UDisksCrypttabMonitor

    typedef struct _UDisksCrypttabMonitor UDisksCrypttabMonitor;

The UDisksCrypttabMonitor structure contains only private data and should only be accessed using the provided API.

## Signal Details

### The `“entry-added”` signal

    void
    user_function (UDisksCrypttabMonitor *monitor,
                   UDisksCrypttabEntry   *entry,
                   gpointer               user_data)

Emitted when a crypttab entry is added.

This signal is emitted in the

thread-default main loop

that `monitor` was created in.

#### Parameters

monitor | A UDisksCrypttabMonitor. |
entry | The UDisksCrypttabEntry that was added. |
user_data | user data set when the signal handler was connected. |

Flags: Has Details

### The `“entry-removed”` signal

    void
    user_function (UDisksCrypttabMonitor *monitor,
                   UDisksCrypttabEntry   *entry,
                   gpointer               user_data)

Emitted when a crypttab entry is removed.

This signal is emitted in the

thread-default main loop

that `monitor` was created in.

#### Parameters

monitor | A UDisksCrypttabMonitor. |
entry | The UDisksCrypttabEntry that was removed. |
user_data | user data set when the signal handler was connected. |

Flags: Has Details