PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions
attribute_group.h File Reference
#include <pbl/services/timeline/item.h>
#include <stdint.h>
#include <stdbool.h>

Enumerations

enum  AttributeGroupType { AttributeGroupType_Action , AttributeGroupType_Address }
 Kind of group elements. More...
 

Functions

bool attribute_group_parse_serial_data (AttributeGroupType type, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *data, size_t size, size_t *string_alloc_size_out, uint8_t *attributes_per_group_type_element_out)
 Measure serialized group data.
 
size_t attribute_group_get_required_buffer_size (AttributeGroupType type, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element, size_t required_size_for_strings)
 Get the size of the buffer holding group data.
 
void attribute_group_init (AttributeGroupType type, AttributeList *attr_list, void *group_ptr, uint8_t **buffer, uint8_t num_attributes, uint8_t num_group_type_elements, const uint8_t *attributes_per_group_type_element)
 Lay out an attribute list and group in a buffer.
 
bool attribute_group_deserialize (AttributeGroupType type, AttributeList *attr_list, void *group_ptr, uint8_t *buffer, uint8_t *buf_end, const uint8_t *payload, size_t payload_size)
 Deserialize group data into a list and group set up with attribute_group_init().
 
size_t attribute_group_get_serialized_payload_size (AttributeGroupType type, AttributeList *attr_list, void *group_ptr)
 Get the serialized size of group data.
 
size_t attribute_group_serialize_payload (AttributeGroupType type, AttributeList *attr_list, void *group_ptr, uint8_t *buffer, size_t buffer_size)
 Serialize group data.