Files
utun2/lib/ble/ble_identity.h
T
evgeny ba1c4cf160 Add cross-platform BLE transport and Bluetooth settings
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.
2026-10-29 10:51:19 +01:00

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