summaryrefslogtreecommitdiff
path: root/qmake/include/quuid.h
Unidiff
Diffstat (limited to 'qmake/include/quuid.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/quuid.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/qmake/include/quuid.h b/qmake/include/quuid.h
index 664c149..f5d8a86 100644
--- a/qmake/include/quuid.h
+++ b/qmake/include/quuid.h
@@ -1,5 +1,5 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of QUuid class 4** Definition of QUuid class
5** 5**
@@ -39,7 +39,7 @@
39#define QUUID_H 39#define QUUID_H
40 40
41#ifndef QT_H 41#ifndef QT_H
42#include <qstring.h> 42#include "qstring.h"
43#endif // QT_H 43#endif // QT_H
44 44
45#include <string.h> 45#include <string.h>
@@ -57,8 +57,25 @@ typedef struct _GUID
57#endif 57#endif
58#endif 58#endif
59 59
60
60struct Q_EXPORT QUuid 61struct Q_EXPORT QUuid
61{ 62{
63 enum Variant {
64 VarUnknown=-1,
65 NCS = 0, // 0 - -
66 DCE = 2, // 1 0 -
67 Microsoft= 6, // 1 1 0
68 Reserved= 7 // 1 1 1
69 };
70
71 enum Version {
72 VerUnknown=-1,
73 Time = 1, // 0 0 0 1
74 EmbeddedPOSIX= 2, // 0 0 1 0
75 Name = 3, // 0 0 1 1
76 Random = 4 // 0 1 0 0
77 };
78
62 QUuid() 79 QUuid()
63 { 80 {
64 memset( this, 0, sizeof(QUuid) ); 81 memset( this, 0, sizeof(QUuid) );
@@ -114,6 +131,9 @@ struct Q_EXPORT QUuid
114 return !( *this == orig ); 131 return !( *this == orig );
115 } 132 }
116 133
134 bool operator<(const QUuid &other ) const;
135 bool operator>(const QUuid &other ) const;
136
117#if defined(Q_OS_WIN32) 137#if defined(Q_OS_WIN32)
118 // On Windows we have a type GUID that is used by the platform API, so we 138 // On Windows we have a type GUID that is used by the platform API, so we
119 // provide convenience operators to cast from and to this type. 139 // provide convenience operators to cast from and to this type.
@@ -153,6 +173,9 @@ struct Q_EXPORT QUuid
153 return !( *this == guid ); 173 return !( *this == guid );
154 } 174 }
155#endif 175#endif
176 static QUuid createUuid();
177 QUuid::Variant variant() const;
178 QUuid::Version version() const;
156 179
157 uint data1; 180 uint data1;
158 ushort data2; 181 ushort data2;