mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-29 07:34:57 +02: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
|
void
|
||||||
gvdb_table_walk (GvdbTable *table,
|
gvdb_table_walk (GvdbTable *table,
|
||||||
const gchar *key,
|
const gchar *key,
|
||||||
|
@ -49,6 +49,9 @@ G_GNUC_INTERNAL
|
|||||||
gboolean gvdb_table_has_value (GvdbTable *table,
|
gboolean gvdb_table_has_value (GvdbTable *table,
|
||||||
const gchar *key);
|
const gchar *key);
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
gboolean gvdb_table_is_valid (GvdbTable *table);
|
||||||
|
|
||||||
typedef void (*GvdbWalkValueFunc) (const gchar *name,
|
typedef void (*GvdbWalkValueFunc) (const gchar *name,
|
||||||
gsize name_len,
|
gsize name_len,
|
||||||
GVariant *value,
|
GVariant *value,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user