Pebble Foundation Classes
0.2.0
C++ for Pebble
|
Macros | |
#define | UUID_SIZE 16 |
#define | UuidMake(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) |
#define | UuidMakeFromBEBytes(b) |
#define | UuidMakeFromLEBytes(b) |
#define | UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1) |
The minimum required length of a string used to hold a uuid (including null). | |
#define | UUID_SIZE 16 |
#define | UuidMake(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) |
#define | UuidMakeFromBEBytes(b) |
#define | UuidMakeFromLEBytes(b) |
#define | UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1) |
The minimum required length of a string used to hold a uuid (including null). | |
Functions | |
bool | uuid_equal (const Uuid *uu1, const Uuid *uu2) |
void | uuid_to_string (const Uuid *uuid, char *buffer) |
struct | __attribute__ ((__packed__)) |
Variables | |
Uuid | |
Uuid | |
#define UuidMake | ( | p0, | |
p1, | |||
p2, | |||
p3, | |||
p4, | |||
p5, | |||
p6, | |||
p7, | |||
p8, | |||
p9, | |||
p10, | |||
p11, | |||
p12, | |||
p13, | |||
p14, | |||
p15 | |||
) | ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) |
Make a Uuid object from sixteen bytes.
#define UuidMake | ( | p0, | |
p1, | |||
p2, | |||
p3, | |||
p4, | |||
p5, | |||
p6, | |||
p7, | |||
p8, | |||
p9, | |||
p10, | |||
p11, | |||
p12, | |||
p13, | |||
p14, | |||
p15 | |||
) | ((Uuid) {p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15}) |
Make a Uuid object from sixteen bytes.
#define UuidMakeFromBEBytes | ( | b | ) |
Creates a Uuid from an array of bytes with 16 bytes in Big Endian order.
#define UuidMakeFromBEBytes | ( | b | ) |
Creates a Uuid from an array of bytes with 16 bytes in Big Endian order.
#define UuidMakeFromLEBytes | ( | b | ) |
Creates a Uuid from an array of bytes with 16 bytes in Little Endian order.
#define UuidMakeFromLEBytes | ( | b | ) |
Creates a Uuid from an array of bytes with 16 bytes in Little Endian order.
struct __attribute__ | ( | (__packed__) | ) |
Data structure for one serialized key/value tuple
The key
The type of data that the .value
fields contains.
The length of .value
in bytes
The value itself.
The different union fields are provided for convenience, avoiding the need for manual casts.
The byte array value. Valid when .type
is TUPLE_BYTE_ARRAY.
The C-string value. Valid when .type
is TUPLE_CSTRING.
The 8-bit unsigned integer value. Valid when .type
is TUPLE_UINT and .length
is 1 byte.
The 16-bit unsigned integer value. Valid when .type
is TUPLE_UINT and .length
is 2 byte.
The 32-bit unsigned integer value. Valid when .type
is TUPLE_UINT and .length
is 4 byte.
The 8-bit signed integer value. Valid when .type
is TUPLE_INT and .length
is 1 byte.
The 16-bit signed integer value. Valid when .type
is TUPLE_INT and .length
is 2 byte.
The 32-bit signed integer value. Valid when .type
is TUPLE_INT and .length
is 4 byte.
bool uuid_equal | ( | const Uuid * | uu1, |
const Uuid * | uu2 | ||
) |
Compares two UUIDs.
void uuid_to_string | ( | const Uuid * | uuid, |
char * | buffer | ||
) |
Writes UUID in a string form into buffer that looks like the following... {12345678-1234-5678-1234-567812345678} or {NULL UUID} if NULL was passed.
uuid | The Uuid to write into the buffer as human-readable string |
buffer | Memory to write the string to. Must be at least UUID_STRING_BUFFER_LENGTH bytes long. |