summaryrefslogtreecommitdiff
path: root/src/utils/uuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/uuid.cpp')
-rw-r--r--src/utils/uuid.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/uuid.cpp b/src/utils/uuid.cpp
new file mode 100644
index 0000000..23b71fe
--- /dev/null
+++ b/src/utils/uuid.cpp
@@ -0,0 +1,14 @@
+#include <utils/uuid.hpp>
+#include <uuid/uuid.h>
+
+namespace utils
+{
+std::string gen_uuid()
+{
+ char uuid_str[37];
+ uuid_t uuid;
+ uuid_generate(uuid);
+ uuid_unparse(uuid, uuid_str);
+ return uuid_str;
+}
+}