mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 04:30:09 +01:00
glib-aux: add nm_g_variant_tuple_get_u() helper
This commit is contained in:
parent
3b08e27f08
commit
7d33540316
1 changed files with 12 additions and 0 deletions
|
|
@ -252,4 +252,16 @@ nm_dbus_connection_call_blocking_callback(GObject *source, GAsyncResult *res, gp
|
|||
|
||||
GVariant *nm_dbus_connection_call_blocking(NMDBusConnectionCallBlockingData *data, GError **error);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
nm_g_variant_tuple_get_u(GVariant *v, guint32 *out_u)
|
||||
{
|
||||
if (g_variant_is_of_type(v, G_VARIANT_TYPE("(u)"))) {
|
||||
g_variant_get(v, "(u)", out_u);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* __NM_DBUS_AUX_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue