mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-28 19:18:03 -04:00
lib: Add xdg_app_ref_format_ref
This commit is contained in:
@@ -233,3 +233,18 @@ xdg_app_ref_get_kind (XdgAppRef *self)
|
||||
|
||||
return priv->kind;
|
||||
}
|
||||
|
||||
char *
|
||||
xdg_app_ref_format_ref (XdgAppRef *self)
|
||||
{
|
||||
XdgAppRefPrivate *priv = xdg_app_ref_get_instance_private (self);
|
||||
|
||||
if (priv->kind == XDG_APP_REF_KIND_APP)
|
||||
return xdg_app_build_app_ref (priv->name,
|
||||
priv->branch,
|
||||
priv->arch);
|
||||
else
|
||||
return xdg_app_build_runtime_ref (priv->name,
|
||||
priv->branch,
|
||||
priv->arch);
|
||||
}
|
||||
|
||||
@@ -58,5 +58,6 @@ XDG_APP_EXTERN const char * xdg_app_ref_get_arch (XdgAppRef *self);
|
||||
XDG_APP_EXTERN const char * xdg_app_ref_get_branch (XdgAppRef *self);
|
||||
XDG_APP_EXTERN const char * xdg_app_ref_get_commit (XdgAppRef *self);
|
||||
XDG_APP_EXTERN XdgAppRefKind xdg_app_ref_get_kind (XdgAppRef *self);
|
||||
XDG_APP_EXTERN char * xdg_app_ref_format_ref (XdgAppRef *self);
|
||||
|
||||
#endif /* __XDG_APP_REF_H__ */
|
||||
|
||||
Reference in New Issue
Block a user