Flipper Zero Firmware
Loading...
Searching...
No Matches
protocol_group_base.h
1#pragma once
2
3#include <stdbool.h>
4#include <flipper_format.h>
5
6#include "protocol_common_i.h"
7
8typedef void iButtonProtocolGroupData;
9typedef int32_t iButtonProtocolGroupId;
10
11typedef iButtonProtocolGroupData* (*iButtonProtocolGroupAllocFunc)(void);
12
13typedef void (*iButtonProtocolGroupFreeFunc)(iButtonProtocolGroupData*);
14
15typedef void (*iButtonProtocolGroupRenderFunc)(
16 iButtonProtocolGroupData*,
17 const iButtonProtocolData*,
18 iButtonProtocolLocalId,
19 FuriString*);
20
21typedef bool (*iButtonProtocolGroupIsValidFunc)(
22 iButtonProtocolGroupData*,
23 const iButtonProtocolData*,
24 iButtonProtocolLocalId);
25
26typedef void (*iButtonProtocolGroupGetDataFunc)(
27 iButtonProtocolGroupData*,
28 iButtonProtocolData*,
29 iButtonProtocolLocalId,
31
32typedef void (*iButtonProtocolGroupApplyFunc)(
33 iButtonProtocolGroupData*,
34 iButtonProtocolData*,
35 iButtonProtocolLocalId);
36
37typedef size_t (*iButtonProtocolGropuGetSizeFunc)(iButtonProtocolGroupData*);
38
39typedef uint32_t (
40 *iButtonProtocolGroupGetFeaturesFunc)(iButtonProtocolGroupData*, iButtonProtocolLocalId);
41
42typedef const char* (
43 *iButtonProtocolGroupGetStringFunc)(iButtonProtocolGroupData*, iButtonProtocolLocalId);
44
45typedef bool (*iButtonProtocolGroupGetIdFunc)(
46 iButtonProtocolGroupData*,
47 iButtonProtocolLocalId*,
48 const char*);
49
50typedef bool (*iButtonProtocolGroupReadFunc)(
51 iButtonProtocolGroupData*,
52 iButtonProtocolData*,
53 iButtonProtocolLocalId*);
54
55typedef bool (*iButtonProtocolGroupWriteFunc)(
56 iButtonProtocolGroupData*,
57 iButtonProtocolData*,
58 iButtonProtocolLocalId);
59
60typedef bool (*iButtonProtocolGroupSaveFunc)(
61 iButtonProtocolGroupData*,
62 const iButtonProtocolData*,
63 iButtonProtocolLocalId,
65
66typedef bool (*iButtonProtocolGroupLoadFunc)(
67 iButtonProtocolGroupData*,
68 iButtonProtocolData*,
69 iButtonProtocolLocalId,
70 uint32_t,
72
73typedef struct {
74 const uint32_t protocol_count;
75
76 iButtonProtocolGroupAllocFunc alloc;
77 iButtonProtocolGroupFreeFunc free;
78
79 iButtonProtocolGropuGetSizeFunc get_max_data_size;
80 iButtonProtocolGroupGetIdFunc get_id_by_name;
81 iButtonProtocolGroupGetFeaturesFunc get_features;
82
83 iButtonProtocolGroupGetStringFunc get_manufacturer;
84 iButtonProtocolGroupGetStringFunc get_name;
85
86 iButtonProtocolGroupReadFunc read;
87 iButtonProtocolGroupWriteFunc write_blank;
88 iButtonProtocolGroupWriteFunc write_copy;
89
90 iButtonProtocolGroupApplyFunc emulate_start;
91 iButtonProtocolGroupApplyFunc emulate_stop;
92
93 iButtonProtocolGroupSaveFunc save;
94 iButtonProtocolGroupLoadFunc load;
95
96 iButtonProtocolGroupRenderFunc render_uid;
97 iButtonProtocolGroupRenderFunc render_data;
98 iButtonProtocolGroupRenderFunc render_brief_data;
99 iButtonProtocolGroupRenderFunc render_error;
100
101 iButtonProtocolGroupIsValidFunc is_valid;
102 iButtonProtocolGroupGetDataFunc get_editable_data;
103
104 iButtonProtocolGroupApplyFunc apply_edits;
Flipper File Format helper library.
Definition flipper_format.c:12
Definition string.c:4
Definition protocol_common.h:18
Definition protocol_group_base.h:73