Add fwupd_client_get_status()

This commit is contained in:
Richard Hughes 2016-08-17 17:31:51 +01:00
parent 876c007b1a
commit abf42df355
2 changed files with 19 additions and 0 deletions

View File

@ -860,6 +860,24 @@ fwupd_client_get_percentage (FwupdClient *client)
return priv->percentage;
}
/**
* fwupd_client_get_status:
* @client: A #FwupdClient
*
* Gets the last returned status value.
*
* Returns: a #FwupdStatus, or %FWUPD_STATUS_UNKNOWN for unknown.
*
* Since: 0.7.3
**/
FwupdStatus
fwupd_client_get_status (FwupdClient *client)
{
FwupdClientPrivate *priv = GET_PRIVATE (client);
g_return_val_if_fail (FWUPD_IS_CLIENT (client), FWUPD_STATUS_UNKNOWN);
return priv->status;
}
/**
* fwupd_client_update_metadata:
* @client: A #FwupdClient

View File

@ -98,6 +98,7 @@ gboolean fwupd_client_update_metadata (FwupdClient *client,
const gchar *signature_fn,
GCancellable *cancellable,
GError **error);
FwupdStatus fwupd_client_get_status (FwupdClient *client);
guint fwupd_client_get_percentage (FwupdClient *client);
G_END_DECLS