Samsung Internal API reference  2.0
uuid.h
Go to the documentation of this file.
1 
9 #ifndef _TZSL_UUID_H_
10 #define _TZSL_UUID_H_
11 
12 #include <stdint.h>
13 
14 #ifndef __TEE__UUID_T__
15 
17 #define __TEE__UUID_T__
18 
21 struct __uuid_t {
22  uint32_t timeLow;
23  uint16_t timeMid;
24  uint16_t timeHiAndVersion;
25  uint8_t clockSeqAndNode[8];
26 } __attribute__ ((packed));
27 
31 typedef struct __uuid_t __uuid_t;
32 
33 #endif /* !__TEE__UUID_T__ */
34 
38 typedef __uuid_t uuid_t;
39 
40 #ifndef UUID_STRING_LEN
41 
47 #define UUID_STRING_LEN 37
48 #endif /* !UUID_STRING_LEN */
49 
55 void uuid_unparse(const uuid_t *uu, char *out);
56 
61 #define uuid_unparse_lower(uu, out) uuid_unparse((uu), (out))
62 
68 void uuid_unparse_upper(const uuid_t *uu, char *out);
69 
83 int uuid_parse(const char *in, uuid_t *uu);
84 
88 void uuid_generate(uuid_t *out);
89 
94 #define uuid_generate_time(x) uuid_generate(x)
95 
101 int uuid_is_null(const uuid_t *uu);
102 
106 void uuid_clear(uuid_t *uu);
107 
115 int uuid_compare(const uuid_t *uu1, const uuid_t *uu2);
116 
117 #endif /* _TZSL_UUID_H_ */
118 
wrapper for uuid type.
Definition: uuid.h:21
uint16_t timeMid
Definition: uuid.h:23
int uuid_compare(const uuid_t *uu1, const uuid_t *uu2)
Compare the two supplied uuid variables uu1 and uu2 to each other.
__uuid_t uuid_t
Definition: uuid.h:38
uint8_t clockSeqAndNode[8]
Definition: uuid.h:25
void uuid_generate(uuid_t *out)
The uuid_generate function creates a new universally unique identifier (UUID).
uint32_t timeLow
Definition: uuid.h:22
uint16_t timeHiAndVersion
Definition: uuid.h:24
int uuid_is_null(const uuid_t *uu)
Check if UUID is null.
void uuid_clear(uuid_t *uu)
set value to zero UUID.
void uuid_unparse(const uuid_t *uu, char *out)
Convert binary representation of UUID to string.
int uuid_parse(const char *in, uuid_t *uu)
Convert an input UUID string into binary representation.
void uuid_unparse_upper(const uuid_t *uu, char *out)
Convert binary representation of UUID to string.