Top | ![]() |
![]() |
![]() |
![]() |
#define | NK_UUID_LENGTH |
#define | NK_UUID_FORMATTED_LENGTH |
NkUuid | |
#define | NK_UUID_INIT |
gboolean nk_uuid_parse (NkUuid *uuid
,const gchar *string
);
Parses an UUID stirng.
uuid |
an NkUuid. |
[out caller-allocates] |
string |
a string containing an UUID in the xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx format |
void nk_uuid_from_name (NkUuid *uuid
,const gchar *name
,gssize length
);
Generates a v5 (namespace) UUID.
uuid
must contains the namespace UUID and will be updated to the new UUID.
uuid |
an NkUuid. |
[inout] |
name |
an arbritrary name |
|
length |
the length of |
typedef struct { guchar data[NK_UUID_LENGTH]; gchar string[NK_UUID_FORMATTED_LENGTH + 1]; } NkUuid;
#define NK_UUID_INIT { .data = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .string = "00000000-0000-0000-0000-000000000000" }
You can use this macro to initialize an NkUuid structure:
1 |
NkUuid uuid = NK_UUID_INIT; |