summaryrefslogtreecommitdiff
path: root/futility/updater.h
diff options
context:
space:
mode:
Diffstat (limited to 'futility/updater.h')
-rw-r--r--futility/updater.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/futility/updater.h b/futility/updater.h
index a6cb3a72..366ecf10 100644
--- a/futility/updater.h
+++ b/futility/updater.h
@@ -118,6 +118,20 @@ struct updater_config_arguments {
int verbosity;
};
+struct model_config {
+ char *name;
+ char *image, *ec_image, *pd_image;
+ char *signature_id;
+};
+
+struct manifest {
+ int num;
+ int default_model;
+ int has_keyset;
+ struct model_config *models;
+ struct archive *archive;
+};
+
enum updater_error_codes {
UPDATE_ERR_DONE,
UPDATE_ERR_NEED_RO_UPDATE,
@@ -265,4 +279,16 @@ int archive_has_entry(struct archive *ar, const char *name);
int archive_read_file(struct archive *ar, const char *fname,
uint8_t **data, uint32_t *size);
+/*
+ * Creates a new manifest object by scanning files in archive.
+ * Returns the manifest on success, otherwise NULL for failure.
+ */
+struct manifest *new_manifest_from_archive(struct archive *archive);
+
+/* Releases all resources allocated by given manifest object. */
+void delete_manifest(struct manifest *manifest);
+
+/* Prints the information of objects in manifest (models and images) in JSON. */
+void print_json_manifest(const struct manifest *manifest);
+
#endif /* VBOOT_REFERENCE_FUTILITY_UPDATER_H_ */