6#define VCARD_MAX_LEN 768
7#define VCARD_MAX_CARDS 100
42bool vcard_store_add(
const char* vcard,
size_t len,
char* err,
size_t err_len);
63bool vcard_store_update(uint16_t slot,
const char* vcard,
size_t len,
char* err,
size_t err_len);
Structured representation of an own vCard for editor/wizard use.
size_t vcard_store_get_own(char *out, size_t max_len)
Retrieves local own-vCard text.
bool vcard_store_has_own(void)
Returns whether local own-vCard exists.
bool vcard_store_set_own(const char *vcard, size_t len, char *err, size_t err_len)
Stores local own-vCard after validation and field filtering.
bool vcard_store_update(uint16_t slot, const char *vcard, size_t len, char *err, size_t err_len)
Overwrites the vCard stored at slot in place after validation.
size_t vcard_store_get(uint16_t slot, char *out, size_t max_len)
Retrieves raw vCard text from slot.
bool vcard_store_clear_own(void)
Deletes local own-vCard from storage.
bool vcard_parse_to_struct(const char *raw, vcard_data_t *out)
Parses vCard 4.0 raw text into a structured vcard_data_t.
bool vcard_store_add(const char *vcard, size_t len, char *err, size_t err_len)
Adds peer vCard to first free slot after validation and duplicate check.
uint16_t vcard_store_get_sorted(uint16_t *out_slots, uint16_t max_slots)
Returns slot indices of stored cards sorted by last name.
size_t vcard_filter_empty_fields(char *vcard, size_t len)
Removes empty optional fields from vCard text in-place.
uint16_t vcard_store_count(void)
Returns number of stored peer vCards.
bool vcard_store_contains(const char *vcard, size_t len)
Reports whether an exact-text vCard is already stored.
bool vcard_store_get_display_own(char *out, size_t max_len)
Retrieves display name derived from local own-vCard.
bool vcard_store_get_display(uint16_t slot, char *out, size_t max_len)
Retrieves cached display label for slot.
size_t vcard_generate_from_struct(const vcard_data_t *data, char *out_buf, size_t buf_len)
Generates vCard 4.0 text from a structured vcard_data_t. Empty fields are omitted....
void vcard_store_init(void)
Initializes metadata cache for stored peer vCards.
bool vcard_store_delete(uint16_t slot)
Deletes peer vCard at slot index.