PebbleOS
Loading...
Searching...
No Matches
Modules | Data Structures | Functions
Contacts

Contacts stored in the contacts database by the phone. More...

Modules

 Contact addresses
 (De)serialization of attribute lists together with contact addresses.
 

Data Structures

struct  Contact
 Contact, allocated in a single block with its attributes, addresses and strings. More...
 

Functions

Contact * contacts_get_contact_by_uuid (const Uuid *uuid)
 Look up a contact.
 
void contacts_free_contact (Contact *contact)
 Free a contact.
 

Detailed Description

Contacts stored in the contacts database by the phone.

if (contact) {
for (int i = 0; i < contact->addr_list.num_addresses; i++) {
const Address *addr = &contact->addr_list.addresses[i];
// ...
}
}
Address * addresses
Addresses.
Definition attributes_address.h:63
uint8_t num_addresses
Number of entries in addresses.
Definition attributes_address.h:61
Contact address.
Definition attributes_address.h:49
AddressList addr_list
Addresses of the contact.
Definition contacts.h:39
Contact, allocated in a single block with its attributes, addresses and strings.
Definition contacts.h:31
void contacts_free_contact(Contact *contact)
Free a contact.
Contact * contacts_get_contact_by_uuid(const Uuid *uuid)
Look up a contact.

Data Structure Documentation

◆ Contact

struct Contact

Contact, allocated in a single block with its attributes, addresses and strings.

Data Fields
AddressList addr_list Addresses of the contact.
AttributeList attr_list Contact attributes (name, ...).
uint32_t flags Flags as stored in the contacts database.
Uuid id Contact UUID.

Function Documentation

◆ contacts_free_contact()

void contacts_free_contact ( Contact *  contact)

Free a contact.

Parameters
contactContact returned by contacts_get_contact_by_uuid().

◆ contacts_get_contact_by_uuid()

Contact * contacts_get_contact_by_uuid ( const Uuid *  uuid)

Look up a contact.

Parameters
uuidContact UUID.
Returns
Contact, to be freed with contacts_free_contact(), or NULL if not found or invalid.