From 7fd926f07e17a3da8fbb14aada40145bf0d0b3cc Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 27 Apr 2016 13:13:26 +0200 Subject: [PATCH] lib: Add xdg_app_get_default_arch --- lib/xdg-app-installation.c | 13 +++++++++++++ lib/xdg-app-installation.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/lib/xdg-app-installation.c b/lib/xdg-app-installation.c index f6453ac1..45666772 100644 --- a/lib/xdg-app-installation.c +++ b/lib/xdg-app-installation.c @@ -142,6 +142,19 @@ xdg_app_installation_new_for_dir (XdgAppDir *dir, return self; } +/** + * xdg_app_get_default_arch: + * + * Returns the canonical name for the arch of the current machine. + * + * Returns: an arch string + */ +const char * +xdg_app_get_default_arch (void) +{ + return xdg_app_get_arch (); +} + /** * xdg_app_installation_new_system: * @cancellable: (nullable): a #GCancellable diff --git a/lib/xdg-app-installation.h b/lib/xdg-app-installation.h index 025e018e..8a1595f8 100644 --- a/lib/xdg-app-installation.h +++ b/lib/xdg-app-installation.h @@ -64,6 +64,8 @@ typedef enum { G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppInstallation, g_object_unref) #endif +XDG_APP_EXTERN const char *xdg_app_get_default_arch (void); + XDG_APP_EXTERN XdgAppInstallation *xdg_app_installation_new_system (GCancellable *cancellable, GError **error); XDG_APP_EXTERN XdgAppInstallation *xdg_app_installation_new_user (GCancellable *cancellable,