summaryrefslogtreecommitdiffstats
path: root/utils/atj2137/atjboottool/afi.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/atj2137/atjboottool/afi.h')
-rw-r--r--utils/atj2137/atjboottool/afi.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/atj2137/atjboottool/afi.h b/utils/atj2137/atjboottool/afi.h
index bb264cefdf..6756364d2a 100644
--- a/utils/atj2137/atjboottool/afi.h
+++ b/utils/atj2137/atjboottool/afi.h
@@ -23,7 +23,13 @@
#include <stdint.h>
-/* Check if a file looks like a FWU file */
+uint32_t afi_checksum(void *ptr, size_t size);
+/* Unpack an AFI file: the callback function will be called once for each file in the archive with
+ * its name and content. If the callback returns a nonzero value, the function will stop and return
+ * that value. Returns 0 on success */
+typedef int (*afi_extract_callback_t)(const char *name, uint8_t *buf, size_t size);
+int afi_unpack(uint8_t *buf, size_t size, afi_extract_callback_t cb);
+/* Check if a file looks like an AFI file */
bool afi_check(uint8_t *buf, size_t size);
#endif /* __AFI_H__ */