summaryrefslogtreecommitdiff
path: root/libappstream-builder/asb-utils.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-04-01 19:32:00 +0100
committerRichard Hughes <richard@hughsie.com>2015-04-01 19:32:04 +0100
commitcdee74d2335675eb3519a361d015553068179d44 (patch)
tree8e120fc9c50c7eef20c4b26ff34d7e76fb788a58 /libappstream-builder/asb-utils.c
parent1c44250ca6cf5aad7cace691dc56cc4ed7170e5b (diff)
downloadappstream-glib-cdee74d2335675eb3519a361d015553068179d44.tar.gz
Remove --extra-appstream from the builder
There is no need to merge these into one file as we can just install the other AppStream files manually.
Diffstat (limited to 'libappstream-builder/asb-utils.c')
-rw-r--r--libappstream-builder/asb-utils.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c
index 5f1871b..ca90e62 100644
--- a/libappstream-builder/asb-utils.c
+++ b/libappstream-builder/asb-utils.c
@@ -538,73 +538,6 @@ asb_utils_write_archive_dir (const gchar *filename,
}
/**
- * asb_utils_add_apps_from_file:
- * @apps: (element-type AsbApp): applications
- * @filename: XML file to load
- * @error: A #GError or %NULL
- *
- * Add applications from a file.
- *
- * Returns: %TRUE for success, %FALSE otherwise
- *
- * Since: 0.1.0
- **/
-gboolean
-asb_utils_add_apps_from_file (GList **apps, const gchar *filename, GError **error)
-{
- AsApp *app;
- GPtrArray *array;
- guint i;
- _cleanup_object_unref_ AsStore *store = NULL;
- _cleanup_object_unref_ GFile *file = NULL;
-
- /* parse file */
- store = as_store_new ();
- file = g_file_new_for_path (filename);
- if (!as_store_from_file (store, file, NULL, NULL, error))
- return FALSE;
-
- /* copy Asapp's into AsbApp's */
- array = as_store_get_apps (store);
- for (i = 0; i < array->len; i++) {
- app = g_ptr_array_index (array, i);
- as_app_set_source_file (app, filename);
- asb_plugin_add_app (apps, app);
- }
- return TRUE;
-}
-
-/**
- * asb_utils_add_apps_from_dir:
- * @apps: (element-type AsbApp): applications
- * @path: path to read
- * @error: A #GError or %NULL
- *
- * Add applications from a directory.
- *
- * Returns: %TRUE for success, %FALSE otherwise
- *
- * Since: 0.1.0
- **/
-gboolean
-asb_utils_add_apps_from_dir (GList **apps, const gchar *path, GError **error)
-{
- const gchar *tmp;
- _cleanup_dir_close_ GDir *dir = NULL;
-
- dir = g_dir_open (path, 0, error);
- if (dir == NULL)
- return FALSE;
- while ((tmp = g_dir_read_name (dir)) != NULL) {
- _cleanup_free_ gchar *filename = NULL;
- filename = g_build_filename (path, tmp, NULL);
- if (!asb_utils_add_apps_from_file (apps, filename, error))
- return FALSE;
- }
- return TRUE;
-}
-
-/**
* asb_string_replace:
* @string: Source string
* @search: utf8 string to search for