asset: Add a method to retrieve the GError of an asset loaded with error

API:
    ges_asset_get_error
This commit is contained in:
Thibault Saunier 2015-11-08 22:49:43 +01:00
parent 5d82971eef
commit 5e069976f6
3 changed files with 19 additions and 0 deletions

View file

@ -1077,6 +1077,7 @@ ges_asset_request
ges_asset_request_async
ges_asset_request_finish
ges_asset_extract
ges_asset_get_error
ges_list_assets
<SUBSECTION Standard>
GESAssetPrivate

View file

@ -1039,3 +1039,20 @@ ges_list_assets (GType filter)
return ret;
}
/**
* ges_asset_get_error:
* @self: The asset to retrieve the error from
*
* Returns: (transfer none): The #GError of the asset or %NULL if the asset was
* loaded without issue
*
* Since: 1.8
*/
GError *
ges_asset_get_error (GESAsset * self)
{
g_return_val_if_fail (GES_IS_ASSET (self), NULL);
return self->priv->error;
}

View file

@ -95,6 +95,7 @@ GESAsset * ges_asset_request (GType extractable_type,
const gchar * ges_asset_get_id (GESAsset* self);
GESAsset * ges_asset_request_finish (GAsyncResult *res,
GError **error);
GError * ges_asset_get_error (GESAsset * self);
GESExtractable * ges_asset_extract (GESAsset * self,
GError **error);
GList * ges_list_assets (GType filter);