summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2018-05-21 14:43:16 +0200
committerMilan Crha <mcrha@redhat.com>2018-05-21 14:43:16 +0200
commitfb9401f2761cb971cb7490b284bf90b0c0400c7e (patch)
tree79e90fea261507fe1dbd1d5feb768a785ca3221c
parent22513bb41974c61b545811e3a9a753d34a2722ab (diff)
downloadevolution-data-server-fb9401f2761cb971cb7490b284bf90b0c0400c7e.tar.gz
Check for ICAL_STATUS_DELETED status enum value
-rw-r--r--CMakeLists.txt6
-rw-r--r--config.h.in3
-rw-r--r--src/calendar/libedata-cal/e-cal-backend-sexp.c4
-rw-r--r--src/calendar/libedata-cal/e-cal-cache.c4
4 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19da40b68..c167a2e0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -951,6 +951,12 @@ CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
return 0;
}" HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT)
+CHECK_C_SOURCE_COMPILES("#include <libical/ical.h>
+ int main(void) {
+ icalproperty_status_to_string (ICAL_STATUS_DELETED);
+ return 0;
+ }" HAVE_ICAL_STATUS_DELETED)
+
unset(CMAKE_REQUIRED_DEFINITIONS)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
diff --git a/config.h.in b/config.h.in
index 99481e5f3..b6e961aee 100644
--- a/config.h.in
+++ b/config.h.in
@@ -180,6 +180,9 @@
/* libical provides icaltzutil_set_exact_vtimezones_support function */
#cmakedefine HAVE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT 1
+/* libical has ICAL_STATUS_DELETED icalproperty_status value */
+#cmakedefine HAVE_ICAL_STATUS_DELETED 1
+
/* Define to 1 if you have the libgdata package */
#cmakedefine HAVE_LIBGDATA 1
diff --git a/src/calendar/libedata-cal/e-cal-backend-sexp.c b/src/calendar/libedata-cal/e-cal-backend-sexp.c
index cdbeb3c94..2d46b2931 100644
--- a/src/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/src/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -591,6 +591,10 @@ matches_status (ECalComponent *comp ,const gchar *str)
return g_str_equal (str, "PENDING");
case ICAL_STATUS_FAILED:
return g_str_equal (str, "FAILED");
+#ifdef HAVE_ICAL_STATUS_DELETED
+ case ICAL_STATUS_DELETED:
+ return g_str_equal (str, "DELETED");
+#endif
case ICAL_STATUS_X:
break;
}
diff --git a/src/calendar/libedata-cal/e-cal-cache.c b/src/calendar/libedata-cal/e-cal-cache.c
index 510bbb308..d6e2d55dc 100644
--- a/src/calendar/libedata-cal/e-cal-cache.c
+++ b/src/calendar/libedata-cal/e-cal-cache.c
@@ -810,6 +810,10 @@ ecc_get_status_as_string (icalproperty_status status)
return "pending";
case ICAL_STATUS_FAILED:
return "failed";
+#ifdef HAVE_ICAL_STATUS_DELETED
+ case ICAL_STATUS_DELETED:
+ return "deleted";
+#endif
case ICAL_STATUS_X:
break;
}