2015-11-16 15:23:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2015 Red Hat, Inc
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2016-07-29 18:27:49 +00:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2015-11-16 15:23:23 +00:00
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Alexander Larsson <alexl@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __BUILDER_MANIFEST_H__
|
|
|
|
#define __BUILDER_MANIFEST_H__
|
|
|
|
|
|
|
|
#include <json-glib/json-glib.h>
|
|
|
|
|
2016-05-26 10:23:48 +00:00
|
|
|
#include "flatpak-run.h"
|
2015-11-16 15:23:23 +00:00
|
|
|
#include "builder-options.h"
|
|
|
|
#include "builder-module.h"
|
|
|
|
#include "builder-cache.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct BuilderManifest BuilderManifest;
|
|
|
|
|
2016-05-06 14:03:27 +00:00
|
|
|
#define BUILDER_TYPE_MANIFEST (builder_manifest_get_type ())
|
2015-11-16 15:23:23 +00:00
|
|
|
#define BUILDER_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUILDER_TYPE_MANIFEST, BuilderManifest))
|
|
|
|
#define BUILDER_IS_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUILDER_TYPE_MANIFEST))
|
|
|
|
|
|
|
|
/* Bump this if format changes in incompatible ways to force rebuild */
|
2017-02-16 14:52:25 +00:00
|
|
|
#define BUILDER_MANIFEST_CHECKSUM_VERSION "3"
|
2016-01-19 15:53:11 +00:00
|
|
|
#define BUILDER_MANIFEST_CHECKSUM_CLEANUP_VERSION "1"
|
|
|
|
#define BUILDER_MANIFEST_CHECKSUM_FINISH_VERSION "2"
|
|
|
|
#define BUILDER_MANIFEST_CHECKSUM_PLATFORM_VERSION "1"
|
2015-11-16 15:23:23 +00:00
|
|
|
|
|
|
|
GType builder_manifest_get_type (void);
|
|
|
|
|
2016-05-06 14:03:27 +00:00
|
|
|
const char * builder_manifest_get_id (BuilderManifest *self);
|
2016-10-26 18:57:57 +00:00
|
|
|
char * builder_manifest_get_locale_id (BuilderManifest *self);
|
|
|
|
char * builder_manifest_get_debug_id (BuilderManifest *self);
|
2016-05-06 14:03:27 +00:00
|
|
|
const char * builder_manifest_get_id_platform (BuilderManifest *self);
|
2016-10-26 18:57:57 +00:00
|
|
|
char * builder_manifest_get_locale_id_platform (BuilderManifest *self);
|
2016-05-06 14:03:27 +00:00
|
|
|
BuilderOptions *builder_manifest_get_build_options (BuilderManifest *self);
|
|
|
|
GList * builder_manifest_get_modules (BuilderManifest *self);
|
|
|
|
const char * builder_manifest_get_branch (BuilderManifest *self);
|
2015-11-16 15:23:23 +00:00
|
|
|
|
2016-05-06 14:03:27 +00:00
|
|
|
gboolean builder_manifest_start (BuilderManifest *self,
|
2016-10-07 22:42:25 +00:00
|
|
|
gboolean allow_missing_runtimes,
|
2016-05-06 14:03:27 +00:00
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_init_app_dir (BuilderManifest *self,
|
2017-02-16 09:51:00 +00:00
|
|
|
BuilderCache *cache,
|
2016-05-06 14:03:27 +00:00
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_download (BuilderManifest *self,
|
|
|
|
gboolean update_vcs,
|
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_build (BuilderManifest *self,
|
|
|
|
BuilderCache *cache,
|
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_run (BuilderManifest *self,
|
|
|
|
BuilderContext *context,
|
2016-05-26 10:23:48 +00:00
|
|
|
FlatpakContext *arg_context,
|
2016-05-06 14:03:27 +00:00
|
|
|
char **argv,
|
|
|
|
int argc,
|
|
|
|
GError **error);
|
2016-09-20 13:56:06 +00:00
|
|
|
gboolean builder_manifest_show_deps (BuilderManifest *self,
|
|
|
|
GError **error);
|
2016-05-06 14:03:27 +00:00
|
|
|
void builder_manifest_checksum (BuilderManifest *self,
|
|
|
|
BuilderCache *cache,
|
|
|
|
BuilderContext *context);
|
|
|
|
gboolean builder_manifest_cleanup (BuilderManifest *self,
|
|
|
|
BuilderCache *cache,
|
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_finish (BuilderManifest *self,
|
|
|
|
BuilderCache *cache,
|
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
|
|
|
gboolean builder_manifest_create_platform (BuilderManifest *self,
|
|
|
|
BuilderCache *cache,
|
|
|
|
BuilderContext *context,
|
|
|
|
GError **error);
|
2015-11-16 15:23:23 +00:00
|
|
|
|
2016-05-06 14:03:27 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BuilderManifest, g_object_unref)
|
2015-11-16 15:23:23 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __BUILDER_MANIFEST_H__ */
|