StoragedFstabMonitor

StoragedFstabMonitor — Monitors entries in the fstab file

Functions

Signals

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

Types and Values

Object Hierarchy

    GObject
    ├── StoragedFstabEntry
    ╰── StoragedFstabMonitor

Description

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

Functions

storaged_fstab_entry_get_fsname ()

const gchar *
storaged_fstab_entry_get_fsname (StoragedFstabEntry *entry);

Gets the fsname field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The fsname field.


storaged_fstab_entry_get_dir ()

const gchar *
storaged_fstab_entry_get_dir (StoragedFstabEntry *entry);

Gets the dir field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The dir field.


storaged_fstab_entry_get_fstype ()

const gchar *
storaged_fstab_entry_get_fstype (StoragedFstabEntry *entry);

Gets the type field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The type field.


storaged_fstab_entry_get_opts ()

const gchar *
storaged_fstab_entry_get_opts (StoragedFstabEntry *entry);

Gets the opts field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The opts field.


storaged_fstab_entry_get_freq ()

gint
storaged_fstab_entry_get_freq (StoragedFstabEntry *entry);

Gets the freq field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The freq field.


storaged_fstab_entry_get_passno ()

gint
storaged_fstab_entry_get_passno (StoragedFstabEntry *entry);

Gets the passno field of entry .

Parameters

entry

A StoragedFstabEntry.

 

Returns

The passno field.


storaged_fstab_entry_compare ()

gint
storaged_fstab_entry_compare (StoragedFstabEntry *entry,
                              StoragedFstabEntry *other_entry);

Comparison function for comparing two StoragedFstabEntry objects.

Parameters

entry

A StoragedFstabEntry

 

other_entry

Another StoragedFstabEntry.

 

Returns

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


storaged_fstab_monitor_new ()

StoragedFstabMonitor *
storaged_fstab_monitor_new (void);

Creates a new StoragedFstabMonitor object.

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

Returns

A StoragedFstabMonitor. Free with g_object_unref().


storaged_fstab_monitor_get_entries ()

GList *
storaged_fstab_monitor_get_entries (StoragedFstabMonitor *monitor);

Gets all /etc/fstab entries

Parameters

monitor

A StoragedFstabMonitor.

 

Returns

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

[transfer full][element-type StoragedFstabEntry]

Types and Values

StoragedFstabEntry

typedef struct _StoragedFstabEntry StoragedFstabEntry;

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


StoragedFstabMonitor

typedef struct _StoragedFstabMonitor StoragedFstabMonitor;

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

Signal Details

The “entry-added” signal

void
user_function (StoragedFstabMonitor *monitor,
               StoragedFstabEntry   *entry,
               gpointer              user_data)

Emitted when a fstab entry is added.

This signal is emitted in the

thread-default main loop

that monitor was created in.

Parameters

monitor

A StoragedFstabMonitor.

 

entry

The StoragedFstabEntry that was added.

 

user_data

user data set when the signal handler was connected.

 

Flags: Has Details


The “entry-removed” signal

void
user_function (StoragedFstabMonitor *monitor,
               StoragedFstabEntry   *entry,
               gpointer              user_data)

Emitted when a fstab entry is removed.

This signal is emitted in the

thread-default main loop

that monitor was created in.

Parameters

monitor

A StoragedFstabMonitor.

 

entry

The StoragedFstabEntry that was removed.

 

user_data

user data set when the signal handler was connected.

 

Flags: Has Details