Loading...
Searching...
No Matches
ibutton_protocols.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <stdint.h>
10#include <stddef.h>
11
12#include "protocols/protocol_common.h"
13
14#include "ibutton_key.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
21
27
33
38
45
52iButtonProtocolId ibutton_protocols_get_id_by_name(iButtonProtocols* protocols, const char* name);
53
60const char* ibutton_protocols_get_manufacturer(iButtonProtocols* protocols, iButtonProtocolId id);
61
68const char* ibutton_protocols_get_name(iButtonProtocols* protocols, iButtonProtocolId id);
69
75uint32_t ibutton_protocols_get_features(iButtonProtocols* protocols, iButtonProtocolId id);
76
84
92
100
107
114
123 iButtonProtocols* protocols,
124 const iButtonKey* key,
125 const char* file_name);
126
134bool ibutton_protocols_load(iButtonProtocols* protocols, iButtonKey* key, const char* file_name);
135
143 iButtonProtocols* protocols,
144 const iButtonKey* key,
145 FuriString* result);
146
154 iButtonProtocols* protocols,
155 const iButtonKey* key,
156 FuriString* result);
157
165 iButtonProtocols* protocols,
166 const iButtonKey* key,
167 FuriString* result);
168
176 iButtonProtocols* protocols,
177 const iButtonKey* key,
178 FuriString* result);
179
186bool ibutton_protocols_is_valid(iButtonProtocols* protocols, const iButtonKey* key);
187
195 iButtonProtocols* protocols,
196 const iButtonKey* key,
197 iButtonEditableData* editable);
198
205
206#ifdef __cplusplus
207}
208#endif
iButton key data holder
bool ibutton_protocols_load(iButtonProtocols *protocols, iButtonKey *key, const char *file_name)
Load the key from a file.
Definition ibutton_protocols.c:244
size_t ibutton_protocols_get_max_data_size(iButtonProtocols *protocols)
Get maximum data size out of all protocols available.
Definition ibutton_protocols.c:111
bool ibutton_protocols_is_valid(iButtonProtocols *protocols, const iButtonKey *key)
Check whether the key data is valid.
Definition ibutton_protocols.c:346
bool ibutton_protocols_write_copy(iButtonProtocols *protocols, iButtonKey *key)
Write the key to another one of the same type.
Definition ibutton_protocols.c:174
uint32_t ibutton_protocols_get_features(iButtonProtocols *protocols, iButtonProtocolId id)
Get protocol features bitmask by protocol id.
Definition ibutton_protocols.c:103
const char * ibutton_protocols_get_manufacturer(iButtonProtocols *protocols, iButtonProtocolId id)
Get the manufacturer name based on the protocol id.
Definition ibutton_protocols.c:127
void ibutton_protocols_apply_edits(iButtonProtocols *protocols, const iButtonKey *key)
Make all necessary internal adjustments after editing the key.
Definition ibutton_protocols.c:372
void ibutton_protocols_emulate_start(iButtonProtocols *protocols, iButtonKey *key)
Start emulating the key.
Definition ibutton_protocols.c:185
uint32_t ibutton_protocols_get_protocol_count(void)
Get the total number of available protocols.
Definition ibutton_protocols.c:77
void ibutton_protocols_render_brief_data(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing device brief data.
Definition ibutton_protocols.c:316
void ibutton_protocols_render_data(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing device full data.
Definition ibutton_protocols.c:301
bool ibutton_protocols_read(iButtonProtocols *protocols, iButtonKey *key)
Read a physical device (a key or an emulator)
Definition ibutton_protocols.c:143
bool ibutton_protocols_save(iButtonProtocols *protocols, const iButtonKey *key, const char *file_name)
Save the key data to a file.
Definition ibutton_protocols.c:207
void ibutton_protocols_emulate_stop(iButtonProtocols *protocols, iButtonKey *key)
Stop emulating the key.
Definition ibutton_protocols.c:196
void ibutton_protocols_render_uid(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing defice UID.
Definition ibutton_protocols.c:290
iButtonProtocolId ibutton_protocols_get_id_by_name(iButtonProtocols *protocols, const char *name)
Get the protocol id based on its name.
Definition ibutton_protocols.c:87
void ibutton_protocols_render_error(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing error message (for invalid keys)
Definition ibutton_protocols.c:331
const char * ibutton_protocols_get_name(iButtonProtocols *protocols, iButtonProtocolId id)
Get the protocol name based on the protocol id.
Definition ibutton_protocols.c:135
void ibutton_protocols_get_editable_data(iButtonProtocols *protocols, const iButtonKey *key, iButtonEditableData *editable)
Get a pointer to the key's editable data (for in-place editing)
Definition ibutton_protocols.c:357
void ibutton_protocols_free(iButtonProtocols *protocols)
Destroy an iButtonProtocols object, free resources.
Definition ibutton_protocols.c:66
bool ibutton_protocols_write_id(iButtonProtocols *protocols, iButtonKey *key)
Write the key to a blank.
Definition ibutton_protocols.c:163
iButtonProtocols * ibutton_protocols_alloc(void)
Allocate an iButtonProtocols object.
Definition ibutton_protocols.c:54
Definition string.c:4
Definition protocol_common.h:18
Definition ibutton_key.c:4
Definition ibutton_protocols.c:24