OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_uuid.h versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_uuid.h 1.2 -> 1.3

--- as_uuid.h    2003/01/22 11:37:22     1.2
+++ as_uuid.h    2003/01/22 18:59:46     1.3
@@ -32,12 +32,14 @@
 #ifndef UUIDGEN_H
 #define UUIDGEN_H
 
-#include "as_gui.h"
+#include <string>
 
 #ifdef HAVE_CONFIG_H
 #include "ac_config.h"
 #endif
 
+namespace AS {
+
 #ifdef HAVE_CONFIG_H
 #if (SIZEOF_CHAR == 1)
 typedef unsigned char        __u8;
@@ -109,32 +111,28 @@
 #endif // HAVE_CONFIG_H
 
 
-typedef unsigned char uuid_t[16];
-
-struct uuid {
-        __u32   time_low;
-        __u16   time_mid;
-        __u16   time_hi_and_version;
-        __u16   clock_seq;
-        __u8    node[6];
-};
-
+//
+// A DCE standard UUID, can generate (multiple)
+// IDs and format them for a printed output
+//
 class Uuid
 {
+private:
+    std::string m_Fmtstr;               // Human readable format
+    __u32   time_low;                   //
+    __u16   time_mid;                   // Fields according to
+    __u16   time_hi_and_version;        // the IETF specification
+    __u16   clock_seq;                  // draft-mealling-uuid-urn-00
+    __u8    node[6];                    //
+
 public:
-    void genTime(uuid_t);
-    void genRand(uuid_t);
-    void genId(uuid_t);
-
-    void packId(const uuid *, uuid_t);
-    void unpackId(const uuid_t, uuid *);
-    void unparseId(const uuid_t, char *);
+    void genId(void);                   // Generate an UUID
+    void setString(void);               // Sets the formatted representation
+    std::string getString(void);        // Return a formatted representation
 
 private:
-    int getRandfd(void);
-    void getRandbytes(void *, int);
-    int getNodeid(unsigned char *);
-    int getClock(__u32 *, __u32 *, __u16 *);
+    void setId(const unsigned char *);  // Helper method to set data members
 };
+}
 
 #endif // UUIDGEN_H

CVSTrac 2.0.1