Add uuid methods to create canonical representation
To enable UUIDs to be printed in canonical form, this commit adds
functions to generate a canonical string from UUID octets in either
standard octet order or GUID octet order.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I43fb5cf82c11cb092ce8497568d6b84cdffaae9b
diff --git a/components/common/uuid/uuid.h b/components/common/uuid/uuid.h
index 33921ee..4333ad2 100644
--- a/components/common/uuid/uuid.h
+++ b/components/common/uuid/uuid.h
@@ -101,6 +101,19 @@
void uuid_guid_octets_from_canonical(struct uuid_octets *uuid_octets,
const char *canonical_form);
+/*
+ * Converts an octet representation in standard byte order to a canonical string.
+ */
+void uuid_canonical_from_octets(struct uuid_canonical *canonical_form,
+ const struct uuid_octets *uuid_octets);
+
+/*
+ * Converts an octet representation in GUID byte order to a canonical string.
+ */
+void uuid_canonical_from_guid_octets(struct uuid_canonical *canonical_form,
+ const struct uuid_octets *uuid_octets);
+
+
#ifdef __cplusplus
}
#endif