Crashpad
|
A universally unique identifier (UUID). More...
#include "util/misc/uuid.h"
Public Member Functions | |
bool | operator== (const UUID &that) const |
bool | operator!= (const UUID &that) const |
void | InitializeToZero () |
Initializes the UUID to zero. | |
void | InitializeFromBytes (const uint8_t *bytes) |
Initializes the UUID from a sequence of bytes. More... | |
bool | InitializeFromString (const base::StringPiece &string) |
Initializes the UUID from a RFC 4122 §3 formatted string. More... | |
bool | InitializeFromString (const base::StringPiece16 &string) |
bool | InitializeWithNew () |
Initializes the UUID using a standard system facility to generate the value. More... | |
void | InitializeFromSystemUUID (const ::UUID *system_uuid) |
Initializes the UUID from a system UUID or GUID structure. More... | |
std::string | ToString () const |
Formats the UUID per RFC 4122 §3. More... | |
base::string16 | ToString16 () const |
The same as ToString, but returned as a string16. | |
Public Attributes | |
uint32_t | data_1 |
uint16_t | data_2 |
uint16_t | data_3 |
uint8_t | data_4 [2] |
uint8_t | data_5 [6] |
A universally unique identifier (UUID).
An alternate term for UUID is “globally unique identifier” (GUID), used primarily by Microsoft.
A UUID is a unique 128-bit number specified by RFC 4122.
This is a POD structure.
void crashpad::UUID::InitializeFromBytes | ( | const uint8_t * | bytes | ) |
Initializes the UUID from a sequence of bytes.
bytes is taken as a UUID laid out in big-endian format in memory. On little-endian machines, appropriate byte-swapping will be performed to initialize an object’s data members.
[in] | bytes | A buffer of exactly 16 bytes that will be assigned to the UUID. |
bool crashpad::UUID::InitializeFromString | ( | const base::StringPiece & | string | ) |
Initializes the UUID from a RFC 4122 §3 formatted string.
[in] | string | A string of the form "00112233-4455-6677-8899-aabbccddeeff" . |
true
if the string was formatted correctly and the object has been initialized with the data. false
if the string could not be parsed, with the object state untouched. void crashpad::UUID::InitializeFromSystemUUID | ( | const ::UUID * | system_uuid | ) |
bool crashpad::UUID::InitializeWithNew | ( | ) |
Initializes the UUID using a standard system facility to generate the value.
true
if the UUID was initialized correctly, false
otherwise with a message logged. std::string crashpad::UUID::ToString | ( | ) | const |
Formats the UUID per RFC 4122 §3.
"00112233-4455-6677-8899-aabbccddeeff"
.