Lines Matching full:guid
44 // This class is used to generate random GUID.
45 // Currently use random number to generate a GUID. This should be OK since
54 bool CreateGUID(GUID *guid) const { in CreateGUID()
55 guid->data1 = random(); in CreateGUID()
56 guid->data2 = (uint16_t)(random()); in CreateGUID()
57 guid->data3 = (uint16_t)(random()); in CreateGUID()
58 *reinterpret_cast<uint32_t*>(&guid->data4[0]) = random(); in CreateGUID()
59 *reinterpret_cast<uint32_t*>(&guid->data4[4]) = random(); in CreateGUID()
64 // Guid generator.
67 bool CreateGUID(GUID *guid) { in CreateGUID() argument
68 return kGuidGenerator.CreateGUID(guid); in CreateGUID()
71 // Parse guid to string.
72 bool GUIDToString(const GUID *guid, char *buf, int buf_len) { in GUIDToString() argument
73 // Should allow more space the the max length of GUID. in GUIDToString()
76 guid->data1, guid->data2, guid->data3, in GUIDToString()
77 *reinterpret_cast<const uint32_t *>(&(guid->data4[0])), in GUIDToString()
78 *reinterpret_cast<const uint32_t *>(&(guid->data4[4]))); in GUIDToString()