2 commits - c++/lib
Christian Mollekopf
mollekopf at kolabsys.com
Wed Feb 22 16:25:22 CET 2012
c++/lib/kolabformat.cpp | 4 ++++
c++/lib/kolabformat.h | 8 +++++++-
c++/lib/php/CMakeLists.txt | 4 ++++
c++/lib/utils.h | 28 ++++++++++++++++++++++++++--
4 files changed, 41 insertions(+), 3 deletions(-)
New commits:
commit 82a27e3c823701cd2cea35b6d68f55897c961f6c
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date: Wed Feb 22 16:25:08 2012 +0100
compile on Mac
diff --git a/c++/lib/php/CMakeLists.txt b/c++/lib/php/CMakeLists.txt
index f778f6e..f578646 100644
--- a/c++/lib/php/CMakeLists.txt
+++ b/c++/lib/php/CMakeLists.txt
@@ -15,6 +15,10 @@ ADD_CUSTOM_TARGET(generate_php_bindings ALL DEPENDS ${KOLAB_SWIG_PHP_SOURCE_FILE
#Compile PHP Bindings
# Since there is no php library we can't compile with -Wl,--no-undefined
+if (APPLE)
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flat_namespace -undefined suppress" )
+endif()
+
find_package(PHP4)
include_directories(${PHP4_INCLUDE_PATH})
add_library(phpbindings SHARED ${KOLAB_SWIG_PHP_SOURCE_FILE})
commit 9968df94ca2172051ecd0d186113056db8b57dac
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date: Wed Feb 22 16:02:19 2012 +0100
make uid available after serialization
diff --git a/c++/lib/kolabformat.cpp b/c++/lib/kolabformat.cpp
index 3e72998..1e4e33e 100644
--- a/c++/lib/kolabformat.cpp
+++ b/c++/lib/kolabformat.cpp
@@ -50,6 +50,10 @@ std::string xKolabVersion()
return Utils::kolabVersion();
}
+std::string getSerializedUID()
+{
+ return Utils::createdUid();
+}
Kolab::Event readEvent(const std::string& s, bool isUrl)
{
diff --git a/c++/lib/kolabformat.h b/c++/lib/kolabformat.h
index 0a46be7..d265bf0 100644
--- a/c++/lib/kolabformat.h
+++ b/c++/lib/kolabformat.h
@@ -44,11 +44,17 @@ std::string productId();
*/
std::string xKolabVersion();
/**
- * Returns KolabFormat version of the last deserialized xCal object.
+ * Returns xCal version of the last deserialized xCal object.
* Updated during deserialization of object.
*/
std::string xCalVersion();
+/**
+ * Returns the UID of the last serialized object.
+ * Updated during serialization of the object.
+ */
+std::string getSerializedUID();
+
Kolab::Event readEvent(const std::string& s, bool isUrl);
std::string writeEvent(const Kolab::Event &);
diff --git a/c++/lib/utils.h b/c++/lib/utils.h
index 29cacb7..a0b2283 100644
--- a/c++/lib/utils.h
+++ b/c++/lib/utils.h
@@ -42,17 +42,41 @@ void logMessage(const std::string &,const std::string &, int, ErrorSeverity s);
void logMessage(const std::string &, ErrorSeverity s = Warning);
+
+/**
+ * The following values must be updated by the serialization/deserialization functinos
+ */
+
+
+/**
+ * The error state after serialization/deserialization
+ */
void clearErrors();
ErrorSeverity getError();
std::string getErrorMessage();
+/**
+ * The uid of the last serialized object
+ */
void setCreatedUid(const std::string &);
std::string createdUid();
+
+/**
+ * The productId of the last deserialized object
+ */
void setProductId(const std::string &);
std::string productId();
+
+/**
+ * The Kolab Format Version of the last deserialized object
+ */
void setKolabVersion(const std::string &);
std::string kolabVersion();
+/**
+ * Helper functions for save conversion of integer types (so we can catch overflows)
+ */
+
template <typename T>
int convertToInt(T integer)
{
@@ -83,8 +107,8 @@ T fromInt(int integer)
return 0;
}
- }
+ } //Namespace
-}
+} //Namespace
#endif
\ No newline at end of file
More information about the commits
mailing list