mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
Add gvdb_table_is_valid() API
Checks that the on-disk file is still valid.
This commit is contained in:
parent
afea703422
commit
df40747190
@ -534,6 +534,23 @@ gvdb_table_unref (GvdbTable *file)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gvdb_table_is_valid:
|
||||
* @table: a #GvdbTable
|
||||
* @returns: %TRUE if @table is still valid
|
||||
*
|
||||
* Checks if the table is still valid.
|
||||
*
|
||||
* An on-disk GVDB can be marked as invalid. This happens when the file
|
||||
* has been replaced. The appropriate action is typically to reopen the
|
||||
* file.
|
||||
**/
|
||||
gboolean
|
||||
gvdb_table_is_valid (GvdbTable *table)
|
||||
{
|
||||
return !!table->data;
|
||||
}
|
||||
|
||||
void
|
||||
gvdb_table_walk (GvdbTable *table,
|
||||
const gchar *key,
|
||||
|
@ -49,6 +49,9 @@ G_GNUC_INTERNAL
|
||||
gboolean gvdb_table_has_value (GvdbTable *table,
|
||||
const gchar *key);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
gboolean gvdb_table_is_valid (GvdbTable *table);
|
||||
|
||||
typedef void (*GvdbWalkValueFunc) (const gchar *name,
|
||||
gsize name_len,
|
||||
GVariant *value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user