summaryrefslogtreecommitdiff
path: root/src/uuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uuid.cpp')
-rw-r--r--src/uuid.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uuid.cpp b/src/uuid.cpp
index 69af5b4..d34a989 100644
--- a/src/uuid.cpp
+++ b/src/uuid.cpp
@@ -45,6 +45,16 @@ Bu::String Bu::Uuid::toString()
45 return mb.getString(); 45 return mb.getString();
46} 46}
47 47
48Bu::String Bu::Uuid::toUrn()
49{
50 return "urn:uuid:" + toString();
51}
52
53int Bu::Uuid::getVersion()
54{
55 return (data[6]&((8|4|2|1)<<4))>>4;
56}
57
48#define msb( i ) (1<<(7-i)) 58#define msb( i ) (1<<(7-i))
49 59
50void Bu::Uuid::clear() 60void Bu::Uuid::clear()