Fix typo.
[asdcplib.git] / src / KM_util.h
index f7176f6aa04457a6017bafa3322668b198fa94cf..7318de82f5f34b68f5060e3ce2ffaf3858aee929 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2005-2007, John Hurst
+Copyright (c) 2005-2008, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 namespace Kumu
 {
+  // The version number declaration and explanation are in ../configure.ac
+  const char* Version();
 
   // a class that represents the string form of a value
   template <class T, int SIZE = 16>
@@ -238,7 +240,7 @@ namespace Kumu
     public:
       Identifier() : m_HasValue(false) { memset(m_Value, 0, SIZE); }
       Identifier(const byte_t* value) : m_HasValue(true) { memcpy(m_Value, value, SIZE); }
-      Identifier(const Identifier& rhs) {
+      Identifier(const Identifier& rhs) : IArchive() {
        m_HasValue = rhs.m_HasValue;
        memcpy(m_Value, rhs.m_Value, SIZE);
       }
@@ -360,7 +362,7 @@ namespace Kumu
   void GenRandomValue(SymmetricKey&);
 
   //
-  // 2004-05-01T13:20:00-00:00
+  // 2004-05-01T13:20:00+00:00
   const ui32_t DateTimeLen = 25; //  the number of chars in the xs:dateTime format (sans milliseconds)
 
   // UTC time+date representation
@@ -385,17 +387,20 @@ namespace Kumu
       bool operator==(const Timestamp& rhs) const;
       bool operator!=(const Timestamp& rhs) const;
 
-      // Write the timestamp value to the given buffer in the form 2004-05-01T13:20:00-00:00
+      // Write the timestamp value to the given buffer in the form 2004-05-01T13:20:00+00:00
       // returns 0 if the buffer is smaller than DateTimeLen
       const char* EncodeString(char* str_buf, ui32_t buf_len) const;
+      const char* EncodeStringWithOffset(char* str_buf, ui32_t buf_len,
+                                        i32_t offset_minutes = 0) const;
 
       // decode and set value from string formatted by EncodeString
       bool        DecodeString(const char* datestr);
 
-      // Add the given number of days or hours to the timestamp value.
+      // Add the given number of days, hours, or minutes to the timestamp value.
       // Values less than zero will cause the timestamp to decrease
       void AddDays(i32_t);
       void AddHours(i32_t);
+      void AddMinutes(i32_t);
 
       // Read and write the timestamp value as a byte string having
       // the following format: