diff options
author | louiz’ <louiz@louiz.org> | 2018-03-18 19:33:07 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-03-18 19:33:07 +0100 |
commit | 9500bfd4ccb21b261fd8204180d78553704f7acc (patch) | |
tree | d675c05fc54fdbce7cc72e2cac6131945c407c2c /src/utils | |
parent | 68e14800750042fdd371626c179692ba57076b73 (diff) | |
download | biboumi-9500bfd4ccb21b261fd8204180d78553704f7acc.tar.gz biboumi-9500bfd4ccb21b261fd8204180d78553704f7acc.tar.bz2 biboumi-9500bfd4ccb21b261fd8204180d78553704f7acc.tar.xz biboumi-9500bfd4ccb21b261fd8204180d78553704f7acc.zip |
Reflect message IDs in channel MUCs
fix #3283
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/uuid.cpp | 14 | ||||
-rw-r--r-- | src/utils/uuid.hpp | 8 |
2 files changed, 22 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; +} +} diff --git a/src/utils/uuid.hpp b/src/utils/uuid.hpp new file mode 100644 index 0000000..d550475 --- /dev/null +++ b/src/utils/uuid.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include <string> + +namespace utils +{ +std::string gen_uuid(); +} |