Integrate shared C transport with desktop and Android frontends, add radio probes and detailed Windows diagnostics, and fix GUI build dependencies and early configuration startup errors.
18 lines
752 B
C
18 lines
752 B
C
/* Объявление VibeChat: VC, версия 1, node_id BE64, имя UTF-8 до 13 байт.
|
|
* encode возвращает размер 11..24 либо -1; decode возвращает 0 либо -1.
|
|
* Имя сокращается по целому символу; decode отклоняет неверный UTF-8 и нулевой ID. */
|
|
#ifndef VIBECHAT_BLE_IDENTITY_H
|
|
#define VIBECHAT_BLE_IDENTITY_H
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
struct ble_identity { uint64_t node_id; char name[14]; };
|
|
int ble_identity_encode(uint8_t output[24], uint64_t node_id, const char* name);
|
|
int ble_identity_decode(struct ble_identity* output, const uint8_t* data, size_t size);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|