Loading...
Searching...
No Matches
application_manifest.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <stdint.h>
8#include <stdbool.h>
9#include "elf/elf_api_interface.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define FAP_MANIFEST_MAGIC 0x52474448
16#define FAP_MANIFEST_SUPPORTED_VERSION 1
17
18#define FAP_MANIFEST_MAX_APP_NAME_LENGTH 32
19#define FAP_MANIFEST_MAX_ICON_SIZE 32 // TODO FL-3524: reduce size?
20
21#pragma pack(push, 1)
22
23typedef struct {
24 uint32_t manifest_magic;
25 uint32_t manifest_version;
26 union {
27 struct {
28 uint16_t minor;
29 uint16_t major;
30 };
31 uint32_t version;
32 } api_version;
33 uint16_t hardware_target_id;
35
36typedef struct {
38 uint16_t stack_size;
39 uint32_t app_version;
40 char name[FAP_MANIFEST_MAX_APP_NAME_LENGTH];
41 char has_icon;
42 char icon[FAP_MANIFEST_MAX_ICON_SIZE];
44
46
47#pragma pack(pop)
48
56
65 const FlipperApplicationManifest* manifest,
66 const ElfApiInterface* api_interface);
67
76 const FlipperApplicationManifest* manifest,
77 const ElfApiInterface* api_interface);
78
86
87#ifdef __cplusplus
88}
89#endif
bool flipper_application_manifest_is_too_old(const FlipperApplicationManifest *manifest, const ElfApiInterface *api_interface)
Check if API Version declared in manifest is older than firmware ELF API interface.
Definition application_manifest.c:17
bool flipper_application_manifest_is_too_new(const FlipperApplicationManifest *manifest, const ElfApiInterface *api_interface)
Check if API Version declared in manifest is newer than firmware ELF API interface.
Definition application_manifest.c:31
bool flipper_application_manifest_is_target_compatible(const FlipperApplicationManifest *manifest)
Check if application is compatible with current hardware.
Definition application_manifest.c:45
bool flipper_application_manifest_is_valid(const FlipperApplicationManifest *manifest)
Check if manifest is valid.
Definition application_manifest.c:6
Interface for ELF loader to resolve symbols.
Definition elf_api_interface.h:9
Definition application_manifest.h:23
Definition application_manifest.h:36