Change xdg_app_bundle_ref_get_appdata to xdg_app_bundle_ref_get_appstream

This is technically an ABI break, but nothing is using this yet.
tingping/wmclass
Alexander Larsson 2016-02-26 12:52:38 +01:00
parent b20e72e91c
commit d43d8cd8c8
2 changed files with 12 additions and 12 deletions

View File

@ -32,7 +32,7 @@ struct _XdgAppBundleRefPrivate
{ {
GFile *file; GFile *file;
GBytes *metadata; GBytes *metadata;
GBytes *appdata; GBytes *appstream;
GBytes *icon_64; GBytes *icon_64;
GBytes *icon_128; GBytes *icon_128;
guint64 installed_size; guint64 installed_size;
@ -157,20 +157,20 @@ xdg_app_bundle_ref_get_metadata (XdgAppBundleRef *self)
} }
/** /**
* xdg_app_bundle_ref_get_appdata: * xdg_app_bundle_ref_get_appstream:
* @self: a #XdgAppInstallation * @self: a #XdgAppInstallation
* *
* Get the compressed appdata for the app/runtime * Get the compressed appstream for the app/runtime
* *
* Returns: (transfer full) : an #GBytes with the appdata contents, or %NULL * Returns: (transfer full) : an #GBytes with the appstream contents, or %NULL
*/ */
GBytes * GBytes *
xdg_app_bundle_ref_get_appdata (XdgAppBundleRef *self) xdg_app_bundle_ref_get_appstream (XdgAppBundleRef *self)
{ {
XdgAppBundleRefPrivate *priv = xdg_app_bundle_ref_get_instance_private (self); XdgAppBundleRefPrivate *priv = xdg_app_bundle_ref_get_instance_private (self);
if (priv->appdata) if (priv->appstream)
return g_bytes_ref (priv->appdata); return g_bytes_ref (priv->appstream);
return NULL; return NULL;
} }
@ -219,7 +219,7 @@ xdg_app_bundle_ref_new (GFile *file,
g_autofree char *commit = NULL; g_autofree char *commit = NULL;
g_autofree char *full_ref = NULL; g_autofree char *full_ref = NULL;
g_autofree char *metadata_contents = NULL; g_autofree char *metadata_contents = NULL;
g_autoptr(GVariant) appdata = NULL; g_autoptr(GVariant) appstream = NULL;
g_autoptr(GVariant) icon_64 = NULL; g_autoptr(GVariant) icon_64 = NULL;
g_autoptr(GVariant) icon_128 = NULL; g_autoptr(GVariant) icon_128 = NULL;
guint64 installed_size; guint64 installed_size;
@ -254,9 +254,9 @@ xdg_app_bundle_ref_new (GFile *file,
strlen (metadata_contents)); strlen (metadata_contents));
metadata_contents = NULL; /* Stolen */ metadata_contents = NULL; /* Stolen */
appdata = g_variant_lookup_value (metadata, "appdata", G_VARIANT_TYPE_BYTESTRING); appstream = g_variant_lookup_value (metadata, "appdata", G_VARIANT_TYPE_BYTESTRING);
if (appdata) if (appstream)
priv->appdata = g_variant_get_data_as_bytes (appdata); priv->appstream = g_variant_get_data_as_bytes (appstream);
icon_64 = g_variant_lookup_value (metadata, "icon-64", G_VARIANT_TYPE_BYTESTRING); icon_64 = g_variant_lookup_value (metadata, "icon-64", G_VARIANT_TYPE_BYTESTRING);
if (icon_64) if (icon_64)

View File

@ -48,7 +48,7 @@ XDG_APP_EXTERN XdgAppBundleRef *xdg_app_bundle_ref_new (GFile *file,
GError **error); GError **error);
XDG_APP_EXTERN GFile *xdg_app_bundle_ref_get_file (XdgAppBundleRef *self); XDG_APP_EXTERN GFile *xdg_app_bundle_ref_get_file (XdgAppBundleRef *self);
XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_metadata (XdgAppBundleRef *self); XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_metadata (XdgAppBundleRef *self);
XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_appdata (XdgAppBundleRef *self); XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_appstream (XdgAppBundleRef *self);
XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_icon (XdgAppBundleRef *self, XDG_APP_EXTERN GBytes *xdg_app_bundle_ref_get_icon (XdgAppBundleRef *self,
int size); int size);
XDG_APP_EXTERN guint64 xdg_app_bundle_ref_get_installed_size (XdgAppBundleRef *self); XDG_APP_EXTERN guint64 xdg_app_bundle_ref_get_installed_size (XdgAppBundleRef *self);