Home | History | Annotate | Download | only in solaris

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 {
55 guid->data1 = random();
56 guid->data2 = (uint16_t)(random());
57 guid->data3 = (uint16_t)(random());
58 *reinterpret_cast<uint32_t*>(&guid->data4[0]) = random();
59 *reinterpret_cast<uint32_t*>(&guid->data4[4]) = random();
64 // Guid generator.
67 bool CreateGUID(GUID *guid) {
68 return kGuidGenerator.CreateGUID(guid);
71 // Parse guid to string.
72 bool GUIDToString(const GUID *guid, char *buf, int buf_len) {
73 // Should allow more space the the max length of GUID.
76 guid->data1, guid->data2, guid->data3,
77 *reinterpret_cast<const uint32_t *>(&(guid->data4[0])),
78 *reinterpret_cast<const uint32_t *>(&(guid->data4[4])));